From 2dc86e6679c7792b5adf7fffdb2ab99864e97405 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Fri, 13 Jan 2023 01:38:14 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20jet=20de=20volont=C3=A9=20=C3=A9thylisme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dans certains cas, les jets d'éthylisme concaténaient moral et éthylisme --- module/actor.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/actor.js b/module/actor.js index dcf92e44..7624b3df 100644 --- a/module/actor.js +++ b/module/actor.js @@ -184,19 +184,19 @@ export class RdDActor extends RdDBaseActor { } /* -------------------------------------------- */ getChance() { - return Misc.toInt(this.system.carac.chance?.value ?? 10); + return Number(this.system.carac.chance?.value ?? 10); } getMoralTotal() { - return Misc.toInt(this.system.compteurs.moral?.value); + return Number(this.system.compteurs.moral?.value ?? 0); } /* -------------------------------------------- */ getBonusDegat() { // TODO: gérer séparation et +dom créature/entité indépendament de la compétence - return Misc.toInt(this.system.attributs.plusdom.value); + return Number(this.system.attributs.plusdom.value ?? 0); } /* -------------------------------------------- */ getProtectionNaturelle() { - return Misc.toInt(this.system.attributs.protection.value); + return Number(this.system.attributs.protection.value ?? 0); } /* -------------------------------------------- */ @@ -1799,8 +1799,8 @@ export class RdDActor extends RdDBaseActor { ethylismeData.jetVolonte = { selectedCarac: this.system.carac.volonte, caracValue: this.system.carac.volonte.value, - ethylisme: ethylisme.value, - finalLevel: ethylisme.value + this.system.compteurs.moral.value + ethylisme: Number(ethylisme.value), + finalLevel: Number(ethylisme.value) + Number(this.system.compteurs.moral.value) } await RdDResolutionTable.rollData(ethylismeData.jetVolonte); this._appliquerExperienceRollData(ethylismeData.jetVolonte);