correction des raffraîchissement lors du sommeil
On peut de nouveau dormir plusieurs heures
This commit is contained in:
parent
1de0806e37
commit
776d4ce9ec
@ -1,5 +1,13 @@
|
|||||||
# 12.0
|
# 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
|
## 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
|
- La difficulté des méditations n'augmente plus en cas de réussite et d'échec normal
|
||||||
|
@ -279,30 +279,34 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async dormirChateauDormant() {
|
async dormirChateauDormant() {
|
||||||
if (!ReglesOptionnelles.isUsing("chateau-dormant-gardien") || !this.system.sommeil || this.system.sommeil.nouveaujour) {
|
if (!ReglesOptionnelles.isUsing("chateau-dormant-gardien") || !this.system.sommeil || this.system.sommeil.nouveaujour) {
|
||||||
const message = {
|
await this.$dormirChateauDormant();
|
||||||
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}<br>Un nouveau jour se lève`;
|
|
||||||
ChatMessage.create(message);
|
|
||||||
}
|
|
||||||
await this.resetInfoSommeil();
|
|
||||||
setTimeout(() => this.sheet.render(), 20)
|
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}<br>Un nouveau jour se lève`;
|
||||||
|
ChatMessage.create(message);
|
||||||
|
}
|
||||||
|
await this.resetInfoSommeil();
|
||||||
|
}
|
||||||
|
|
||||||
async resetInfoSommeil() {
|
async resetInfoSommeil() {
|
||||||
await this.update({
|
await this.update({
|
||||||
'system.sommeil': {
|
'system.sommeil': {
|
||||||
@ -457,11 +461,9 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
ChatMessage.create(message);
|
ChatMessage.create(message);
|
||||||
}
|
}
|
||||||
if (options.chateauDormant) {
|
if (options.chateauDormant) {
|
||||||
await this.dormirChateauDormant();
|
await this.$dormirChateauDormant();
|
||||||
}
|
|
||||||
else {
|
|
||||||
setTimeout(() => this.sheet.render(), 20)
|
|
||||||
}
|
}
|
||||||
|
setTimeout(() => this.sheet.render(), 20)
|
||||||
}
|
}
|
||||||
|
|
||||||
async reveilReveDeDragon(message, heures) {
|
async reveilReveDeDragon(message, heures) {
|
||||||
@ -541,7 +543,6 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
max = Math.floor(max / 2);
|
max = Math.floor(max / 2);
|
||||||
}
|
}
|
||||||
const manquant = max - this.system.sante.endurance.value;
|
const manquant = max - this.system.sante.endurance.value;
|
||||||
|
|
||||||
if (manquant > 0) {
|
if (manquant > 0) {
|
||||||
await this.santeIncDec("endurance", manquant);
|
await this.santeIncDec("endurance", manquant);
|
||||||
message.content += `Vous récuperez ${manquant} points d'endurance. `;
|
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))
|
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue))
|
||||||
await this.update({ 'system.sante.fatigue.value': fatigue });
|
await this.update({ 'system.sante.fatigue.value': fatigue });
|
||||||
await new Promise(resolve => setTimeout(resolve, 200));
|
|
||||||
if (fatigue == 0) {
|
if (fatigue == 0) {
|
||||||
message.content += "Vous êtes complêtement reposé. ";
|
message.content += "Vous êtes complêtement reposé. ";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user