Pas de perte d'endurance quand éméché

This commit is contained in:
2026-03-24 20:43:15 +01:00
parent 4141eeaa4a
commit bcc1ec6a37
3 changed files with 13 additions and 3 deletions

View File

@@ -1421,6 +1421,7 @@ export class RdDActor extends RdDBaseActorSang {
actor: this,
vie: this.system.sante.vie.max,
alcool: alcool,
perteEndurance: 0,
jetVie: {
forceAlcool: forceAlcool,
nbDoses: nbDoses,
@@ -1441,8 +1442,9 @@ export class RdDActor extends RdDBaseActorSang {
ethylisme.value = Math.max(ethylisme.value - 1, -7);
ethylisme.nb_doses = 0;
let perte = await RdDDice.rollTotal("1d6");
ethylismeData.perteEndurance = await this.santeIncDec("endurance", -perte);
if (ethylisme.value > 0) {
ethylismeData.perteEndurance = await this.santeIncDec("endurance", -(await RdDDice.rollTotal("1d6")))
}
if (!ethylisme.jet_moral) {
ethylismeData.jetMoral = await this._jetDeMoral(MORAL.HEUREUX, "Ethylisme");