Files
foundryvtt-wh4-lang-fr-fr/scripts/LxEhkvdSEQic8VZ6.js
T
uberwald 38d88c2f19
Validation JSON / validate (push) Successful in 13s
Mise àjour vers 9.6.0
2026-05-18 07:23:40 +02:00

33 lines
812 B
JavaScript

let ingredients = this.actor.itemTypes.trapping.filter(i => i.system.trappingType.value == "ingredient");
if (ingredients.length == 0)
{
return this.script.notification("Aucun ingrédient !");
}
this.script.notification("Affecté : " + ingredients.map(i => i.name).join(", "));
for(let i of ingredients)
{
await i.update({
name: i.setSpecifier("Souillé"),
effects: [{
name: "Souillé",
img: i.img,
system: {
transferData :{
documentType: "Item"
},
scriptData: [
{
label: "Influence Maléfique",
script: "args.fields.malignantInfluence = true;",
trigger: "dialog",
options: {
activateScript: "return true;"
}
}
]
}
}]
});
}