Fix TMR up/down
This commit is contained in:
parent
879ae14b11
commit
c6b571b788
@ -2987,6 +2987,7 @@ export class RdDActor extends Actor {
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.setStatusDemiReve(true);
|
||||
}
|
||||
|
||||
const actorData = Misc.data(this);
|
||||
@ -3969,7 +3970,7 @@ export class RdDActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
async addStatusEffect(statusEffect) {
|
||||
const effet = Misc.data(statusEffect);
|
||||
await this.deleteStatusEffectById(effet.id);
|
||||
//await this.deleteStatusEffectById(effet.id);
|
||||
//effet.flags = effet.flags ?? { core: {} };
|
||||
//effet.flags.core.statusId = effet.id;
|
||||
let effectArray = await this.createEmbeddedDocuments('ActiveEffect', [effet]);
|
||||
|
@ -65,7 +65,6 @@ export class RdDTMRDialog extends Dialog {
|
||||
|
||||
this.callbacksOnAnimate = [];
|
||||
if (!this.viewOnly) {
|
||||
this.actor.setStatusDemiReve(true);
|
||||
this._tellToGM(this.actor.name + " monte dans les terres médianes (" + tmrData.mode + ")");
|
||||
}
|
||||
|
||||
@ -271,12 +270,12 @@ export class RdDTMRDialog extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
close() {
|
||||
this.actor.santeIncDec("fatigue", this.cumulFatigue).then(super.close()); // moving 1 cell costs 1 fatigue
|
||||
this.actor.tmrApp = undefined; // Cleanup reference
|
||||
if ( !this.viewOnly ) {
|
||||
this.actor.setStatusDemiReve(false);
|
||||
this.actor.setStatusDemiReve();
|
||||
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
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -608,6 +607,7 @@ export class RdDTMRDialog extends Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async souffleSiEchecTotal(rollData) {
|
||||
if (rollData.rolled.isETotal) {
|
||||
rollData.souffle = await this.actor.ajouterSouffle({ chat: false });
|
||||
|
Loading…
Reference in New Issue
Block a user