diff --git a/changelog.md b/changelog.md index b9a5e8e1..148fe8af 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # 12.0 +## 12.0.44 - Les errements d'Astrobazzarh, encore + +- La difficulté des méditations n'augmente plus en cas de réussite et d'échec normal + + ## 12.0.44 - Les errements d'Astrobazzarh, suite - on peut de nouveau dormir et se réveiller reposé diff --git a/module/actor.js b/module/actor.js index ff8ada59..8dfdc1d2 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2119,7 +2119,6 @@ export class RdDActor extends RdDBaseActorSang { label: "Jet de méditation", callbacks: [ this.createCallbackExperience(), - { condition: r => r.rolled.isEPart, action: r => this._meditationEPart(r) }, { action: r => this._meditationResult(r) } ] }); @@ -2128,21 +2127,16 @@ export class RdDActor extends RdDBaseActorSang { /* -------------------------------------------- */ async _meditationResult(meditationRoll) { - this.santeIncDec("fatigue", 2); - if (meditationRoll.rolled.isSuccess) { await this.createEmbeddedDocuments("Item", [RdDItemSigneDraconique.prepareSigneDraconiqueMeditation(meditationRoll.meditation, meditationRoll.rolled)]); } - + if (meditationRoll.rolled.isEPart){ + await this.updateEmbeddedDocuments('Item', [{ _id: meditationRoll.meditation._id, 'system.malus': meditationRoll.meditation.system.malus - 1 }]); + } + await this.santeIncDec("fatigue", 2); await RdDRollResult.displayRollData(meditationRoll, this.name, 'chat-resultat-meditation.hbs'); } - /* -------------------------------------------- */ - _meditationEPart(meditationRoll) { - this.updateEmbeddedDocuments('Item', [{ _id: meditationRoll.meditation._id, 'system.malus': meditationRoll.meditation.system.malus - 1 }]); - } - - /* -------------------------------------------- */ _getSignesDraconiques(coord) { const type = TMRUtility.getTMRType(coord);