Simplifications

This commit is contained in:
Vincent Vandemeulebrouck 2024-03-09 19:12:57 +01:00
parent dffaa29fd1
commit 3b269b2baa
1 changed files with 9 additions and 11 deletions

View File

@ -99,21 +99,19 @@ export class RdDActor extends RdDBaseActorSang {
isHautRevant() { return this.system.attributs.hautrevant.value != "" }
/* -------------------------------------------- */
getAgilite() { return Number(this.system.carac.agilite?.value ?? 0) }
getChance() { return Number(this.system.carac.chance?.value ?? 0) }
getAgilite() { return this.system.carac.agilite?.value ?? 0 }
getChance() { return this.system.carac.chance?.value ?? 0 }
getReveActuel() { return Misc.toInt(this.system.reve?.reve?.value ?? this.carac.reve.value) }
getChanceActuel() { return Misc.toInt(this.system.compteurs.chance?.value ?? 10) }
getMoralTotal() { return Number(this.system.compteurs.moral?.value ?? 0) }
getReveActuel() { return this.system.reve?.reve?.value ?? this.carac.reve.value ?? 0 }
getChanceActuel() { return this.system.compteurs.chance?.value ?? 10 }
getMoralTotal() { return this.system.compteurs.moral?.value ?? 0 }
/* -------------------------------------------- */
getEtatGeneral(options = { ethylisme: false }) {
const etatGeneral = Misc.toInt(this.system.compteurs.etat?.value)
if (options.ethylisme) {
// Pour les jets d'Ethylisme, on retire le malus d'éthylisme (p.162)
return etatGeneral - this.malusEthylisme()
}
return etatGeneral
const etatGeneral = this.system.compteurs.etat?.value ?? 0
// Pour les jets d'Ethylisme, on retire le malus d'éthylisme (p.162)
const annuleMalusEthylisme = options.ethylisme ? this.malusEthylisme() : 0
return etatGeneral - annuleMalusEthylisme
}
/* -------------------------------------------- */