diff --git a/changelog.md b/changelog.md index 517c57e0..974e3936 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # 12.0 ## 12.0.50 - Le sommeil d'Astrobazzarh - Le don de double rêve n'interrompt plus le sommeil toutes les heures +- la perte de fatigue à la descente des TMR est visible immédiatement ## 12.0.49 - La deuxième lame d'Astrobazzarh - Corrections diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index af82d87c..ffa45292 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -345,15 +345,16 @@ export class RdDTMRDialog extends Dialog { } this.descenteTMR = true; if (this.actor.tmrApp) { - this.actor.tmrApp = undefined; // Cleanup reference - if (!this.viewOnly) { - await this.actor.setEffect(STATUSES.StatusDemiReve, false); - this.$tellToUserAndGM(message) - } - const appliquerFatigue = ReglesOptionnelles.isUsing("appliquer-fatigue"); + this.actor.tmrApp = undefined // Cleanup reference + const appliquerFatigue = ReglesOptionnelles.isUsing("appliquer-fatigue") await this.actor.santeIncDec( appliquerFatigue ? "fatigue" : "endurance", - (appliquerFatigue ? 1 : -1) * this.cumulFatigue); + (appliquerFatigue ? 1 : -1) * this.cumulFatigue) + if (!this.viewOnly) { + await this.actor.setEffect(STATUSES.StatusDemiReve, false) + this.$tellToUserAndGM(message) + } + } this.pixiTMR.close(); this.pixiTMR = undefined