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