Correction d'ajustements et difficulté finale

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
This commit is contained in:
Vincent Vandemeulebrouck 2021-11-10 23:12:00 +01:00
parent 8b4f87062c
commit 00cab09f6e
2 changed files with 2 additions and 2 deletions

View File

@ -2464,11 +2464,11 @@ export class RdDActor extends Actor {
caracValue: Number(carac.value), caracValue: Number(carac.value),
selectedCarac: carac, selectedCarac: carac,
competence: competence, competence: competence,
finalLevel: (Misc.templateData(competence)?.niveau ?? 0) + diff,
diffLibre: diff, diffLibre: diff,
showDice: true, showDice: true,
show: { title: options?.title ?? '' } show: { title: options?.title ?? '' }
}; };
RollDataAjustements.calcul(rollData, this);
await RdDResolutionTable.rollData(rollData); await RdDResolutionTable.rollData(rollData);
this._appliquerExperienceRollData(rollData); this._appliquerExperienceRollData(rollData);
RdDResolutionTable.displayRollData(rollData, this) RdDResolutionTable.displayRollData(rollData, this)

View File

@ -157,10 +157,10 @@ export class RollDataAjustements {
descr: reference.getDescr && reference.getDescr(rollData, actor) descr: reference.getDescr && reference.getDescr(rollData, actor)
} }
} }
rollData.finalLevel = RollDataAjustements.sum(rollData.ajustements);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static sum(ajustements) { static sum(ajustements) {
let sum = 0; let sum = 0;
for (var key in ajustements) { for (var key in ajustements) {