diff --git a/changelog.md b/changelog.md
index 49eaa2d5..acf5a442 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,13 @@
# 12.0
+## 12.0.46 - Le double demi d'Astrobazzarh
+- correction des raffraîchissement lors du sommeil qui empêchait de dormir
+ plusieurs heures
+- Si la fatigue n'est pas utilisée, les rounds dans les TMR font perdre de l'endurance (au lieu d'en gagner)
+- les TMRs se ferment correctement quand la fatigue maximale est dépassée
+- le message de lancement de sort en réserve donne la description du sort
+- suppression de double-messages lors de la fermeture des TMR
+
## 12.0.45 - Les errements d'Astrobazzarh, encore
- La difficulté des méditations n'augmente plus en cas de réussite et d'échec normal
diff --git a/module/actor.js b/module/actor.js
index 8dfdc1d2..b5fc7302 100644
--- a/module/actor.js
+++ b/module/actor.js
@@ -279,30 +279,34 @@ export class RdDActor extends RdDBaseActorSang {
/* -------------------------------------------- */
async dormirChateauDormant() {
if (!ReglesOptionnelles.isUsing("chateau-dormant-gardien") || !this.system.sommeil || this.system.sommeil.nouveaujour) {
- const message = {
- whisper: ChatUtility.getOwners(this),
- content: ""
- };
-
- await this._recuperationSante(message)
- await this._recupereMoralChateauDormant(message)
- await this._recupereChance()
- await this.transformerStress()
- await this.retourSeuilDeReve(message)
- await this.setBonusPotionSoin(0)
- await this.retourSust(message)
- await this.$perteReveEnchantementsChateauDormants()
- await this.$suppressionLancementsSort()
- await RdDCoeur.applyCoeurChateauDormant(this, message)
- if (message.content != "") {
- message.content = `A la fin Chateau Dormant, ${message.content}
Un nouveau jour se lève`;
- ChatMessage.create(message);
- }
- await this.resetInfoSommeil();
+ await this.$dormirChateauDormant();
setTimeout(() => this.sheet.render(), 20)
}
}
+ async $dormirChateauDormant() {
+ const message = {
+ whisper: ChatUtility.getOwners(this),
+ content: ""
+ };
+
+ await this._recuperationSante(message);
+ await this._recupereMoralChateauDormant(message);
+ await this._recupereChance();
+ await this.transformerStress();
+ await this.retourSeuilDeReve(message);
+ await this.setBonusPotionSoin(0);
+ await this.retourSust(message);
+ await this.$perteReveEnchantementsChateauDormants();
+ await this.$suppressionLancementsSort();
+ await RdDCoeur.applyCoeurChateauDormant(this, message);
+ if (message.content != "") {
+ message.content = `A la fin Chateau Dormant, ${message.content}
Un nouveau jour se lève`;
+ ChatMessage.create(message);
+ }
+ await this.resetInfoSommeil();
+ }
+
async resetInfoSommeil() {
await this.update({
'system.sommeil': {
@@ -457,11 +461,9 @@ export class RdDActor extends RdDBaseActorSang {
ChatMessage.create(message);
}
if (options.chateauDormant) {
- await this.dormirChateauDormant();
- }
- else {
- setTimeout(() => this.sheet.render(), 20)
+ await this.$dormirChateauDormant();
}
+ setTimeout(() => this.sheet.render(), 20)
}
async reveilReveDeDragon(message, heures) {
@@ -541,7 +543,6 @@ export class RdDActor extends RdDBaseActorSang {
max = Math.floor(max / 2);
}
const manquant = max - this.system.sante.endurance.value;
-
if (manquant > 0) {
await this.santeIncDec("endurance", manquant);
message.content += `Vous récuperez ${manquant} points d'endurance. `;
@@ -558,7 +559,6 @@ export class RdDActor extends RdDBaseActorSang {
}
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue))
await this.update({ 'system.sante.fatigue.value': fatigue });
- await new Promise(resolve => setTimeout(resolve, 200));
if (fatigue == 0) {
message.content += "Vous êtes complêtement reposé. ";
}