fix power effect creation
This commit is contained in:
parent
a0bc314e0d
commit
f93418009d
@ -157,6 +157,10 @@ export class PowerEffect {
|
||||
changes,
|
||||
description: `<p>From <strong>${this.source.name}</strong> casting <em>${this.name}</em></p>`,
|
||||
duration: {},
|
||||
system: {
|
||||
loseTurnOnHold: false,
|
||||
expiration: null,
|
||||
},
|
||||
flags: {
|
||||
[moduleName]: {
|
||||
powerEffect: true,
|
||||
@ -458,6 +462,7 @@ export class PowerEffect {
|
||||
// turn
|
||||
doc.duration.rounds = 1;
|
||||
doc.flags.swade.expiration = CONFIG.SWADE.CONST.STATUS_EFFECT_EXPIRATION.EndOfTurnAuto;
|
||||
doc.system.expiration = doc.flags.swade.expiration;
|
||||
} else {
|
||||
doc.flags[moduleName].maintId = maintId;
|
||||
if (moduleHelpers.useVAE) {
|
||||
@ -580,6 +585,8 @@ export class PowerEffect {
|
||||
doc.description += this.description;
|
||||
doc.flags.swade.expiration = CONFIG.SWADE.CONST.STATUS_EFFECT_EXPIRATION.EndOfTurnPrompt;
|
||||
doc.flags.swade.loseTurnOnHold = true;
|
||||
doc.system.expiration = doc.flags.swade.expiration;
|
||||
doc.system.loseTurnOnHold = true;
|
||||
doc.flags[moduleName].maintainingId = maintId;
|
||||
if (this.isTargeted) {
|
||||
doc.flags[moduleName].targetIds = this.targets.map((t) => t.id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user