11 lines
595 B
JavaScript
11 lines
595 B
JavaScript
if (this.actor.effects.contents.filter(e => e.name === "Liquid Fortification").length === 0) {
|
|
let effectData = this.item.effects.contents[0].convertToApplied();
|
|
effectData.duration.seconds = 3600
|
|
this.actor.applyEffect({effectData : [effectData]});
|
|
this.script.notification("Durée de l'effet Liquid Fortification réglée à 1 heure.");
|
|
}
|
|
else {
|
|
let effect = this.actor.effects.contents.filter(e => e.name === "Liquid Fortification")[0];
|
|
effect.update({duration: {seconds: 3600}});
|
|
this.script.notification("Durée de l'effet Liquid Fortification réinitialisée à 1 heure.");
|
|
} |