diff --git a/changelog.md b/changelog.md index e67fff27..47dfc3bb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # 13.0 +## 13.0.33 - L'ébriété d'Illysis + +- le stade éméché ne cause plus de perte d'endurance + ## 13.0.32 - Le surpoids d'Illysis - Le malus d'encombrement sur jet d'Agilité avec Natation ou Acrobatie peuvent être changés, et sont correctement arrondis diff --git a/module/actor.js b/module/actor.js index 99489321..8379be15 100644 --- a/module/actor.js +++ b/module/actor.js @@ -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"); diff --git a/templates/chat-resultat-ethylisme.hbs b/templates/chat-resultat-ethylisme.hbs index 2dddd983..fe434afc 100644 --- a/templates/chat-resultat-ethylisme.hbs +++ b/templates/chat-resultat-ethylisme.hbs @@ -16,7 +16,11 @@ {{#if jetVie.rolled.isEchec}}
- {{alias}} perd {{perteEndurance.perte}} points d'endurance. {{#if perteEndurance.perteVie}}
Il tombe inconscient et perd un point de vie.{{/if}} + {{#if perteEndurance.perte}}Perte de {{perteEndurance.perte}} points d'endurance. + {{else if (eq ajustementEthylique 0)}}Pas de perte d'endurance. + {{/if}} + {{#if perteEndurance.perteVie}}{{alias}} tombe inconscient et perd un point de vie.{{/if}} + {{#if jetMoral}}
Jet de moral {{#if jetMoral.succes}}réussi{{else}}manqué{{/if}} en situation heureuse ({{jetMoral.jet}}/{{jetMoral.difficulte}}). {{#if (gt jetMoral.ajustement 0)}}L'alcool met en joie {{alias}} qui gagne un point de moral.