From 00cab09f6ed697bb88ba3a21d55e7c123de239bc Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 10 Nov 2021 23:12:00 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20d'ajustements=20et=20difficult?= =?UTF-8?q?=C3=A9=20finale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dans RdDActor.rollCaracCompetence : Prise en compte des ajustements manquants (moral, ajustement astrologique ou malus armure selon les cas, par exemple) Affichage des ajustements dans le message du chat --- module/actor.js | 2 +- module/rolldata-ajustements.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {