Fix: jet de volonté éthylisme

Dans certains cas, les jets d'éthylisme concaténaient
moral et éthylisme
This commit is contained in:
Vincent Vandemeulebrouck 2023-01-13 01:38:14 +01:00
parent 484530d67d
commit 2dc86e6679
1 changed files with 6 additions and 6 deletions

View File

@ -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);