From cf514470fd7d41adb4724f96c4b01c97f41ebd92 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 15 Mar 2025 17:16:15 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20difficult=C3=A9=20des=20m=C3=A9diations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La difficulté des méditations n'augmente plus en cas de réussite et d'échec normal --- changelog.md | 5 +++++ module/actor.js | 14 ++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) 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);