Nettoyage des status effects
* Recherche et suppression toujours par flags.core.statusId * l'ajout d'un status depuis le token est maintenant équivallent à l'ajout par le code * Correction des demi-surprises * Correction du Demi-rêve (qui ne disparaissait pas) * fix de la selection dans la configuration système
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import { SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { RollDataAjustements } from "./rolldata-ajustements.js";
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
import { TMRUtility } from "./tmr-utility.js";
|
||||
@ -16,6 +15,7 @@ import { Misc } from "./misc.js";
|
||||
import { HtmlUtility } from "./html-utility.js";
|
||||
import { ReglesOptionelles } from "./regles-optionelles.js";
|
||||
import { RdDDice } from "./rdd-dice.js";
|
||||
import { STATUSES } from "./status-effects.js";
|
||||
/* -------------------------------------------- */
|
||||
|
||||
export class RdDTMRDialog extends Dialog {
|
||||
@ -277,15 +277,16 @@ export class RdDTMRDialog extends Dialog {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
close() {
|
||||
if ( this.actor.tmrApp ) {
|
||||
async close() {
|
||||
if (this.actor.tmrApp) {
|
||||
this.actor.tmrApp = undefined; // Cleanup reference
|
||||
if ( !this.viewOnly ) {
|
||||
this.actor.setStatusEffect("EFFECT.StatusDemiReve", false);
|
||||
if (!this.viewOnly) {
|
||||
await this.actor.setEffect(STATUSES.StatusDemiReve, false)
|
||||
this._tellToGM(this.actor.name + " a quitté les terres médianes");
|
||||
}
|
||||
this.actor.santeIncDec("fatigue", this.cumulFatigue).then(super.close()); // moving 1 cell costs 1 fatigue
|
||||
await this.actor.santeIncDec("fatigue", this.cumulFatigue)
|
||||
}
|
||||
await super.close(); // moving 1 cell costs 1 fatigue
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user