diff --git a/module/actor.js b/module/actor.js index 6ef742dc..3a1e915d 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2464,11 +2464,11 @@ export class RdDActor extends Actor { caracValue: Number(carac.value), selectedCarac: carac, competence: competence, - finalLevel: (Misc.templateData(competence)?.niveau ?? 0) + diff, diffLibre: diff, showDice: true, show: { title: options?.title ?? '' } }; + RollDataAjustements.calcul(rollData, this); await RdDResolutionTable.rollData(rollData); this._appliquerExperienceRollData(rollData); RdDResolutionTable.displayRollData(rollData, this) diff --git a/module/rolldata-ajustements.js b/module/rolldata-ajustements.js index 9657ea98..ea72ec0a 100644 --- a/module/rolldata-ajustements.js +++ b/module/rolldata-ajustements.js @@ -157,10 +157,10 @@ export class RollDataAjustements { descr: reference.getDescr && reference.getDescr(rollData, actor) } } + rollData.finalLevel = RollDataAjustements.sum(rollData.ajustements); } /* -------------------------------------------- */ - static sum(ajustements) { let sum = 0; for (var key in ajustements) {