Files
foundryvtt-wh4-lang-fr-fr/scripts/4AO7Fowek5sSmE4g.js

14 lines
491 B
JavaScript

const venomUUID = "Compendium.wfrp4e-core.items.gFkRm9wS65qe18Xv";
const venom = this.actor.itemTags.trait.find(t => t.name === "Venin");
if (venom) {
await this.effect.setFlag("wfrp4e-tribes", "venom", {
_id: venom.id,
"system.specification.value": venom.system.specification.value
});
await venom.update({"system.specification.value": "Difficult"});
} else {
await this.actor.addEffectItems(venomUUID, this.effect, {
"system.specification.value": "Challenging"
});
}