Fixes suite aux test de combat #289

Merged
vincent.vandeme merged 1 commits from combat-extract into dev_1.1 2020-12-15 08:34:01 +01:00

View File

@ -1569,8 +1569,15 @@ export class RdDActor extends Actor {
let xp = Math.abs(rolled.finalLevel);
let xpCarac = Math.floor(xp / 2); // impair: arrondi inférieur en carac
xpCarac = Math.max(xpCarac, 1);
let xpComp = xp - xpCarac;
let xpComp;
if (competenceName) {
xpComp = xp - xpCarac;
}
else {
xpComp = 0;
xpCarac = Math.max(xpCarac, 1);
}
if ( competenceName ) {
let competence = duplicate( RdDUtility.findCompetence( this.data.items, competenceName ) );