foundryvtt-wh4-lang-fr-fr/scripts/wbM7tpw4TxvadcWm.js

19 lines
455 B
JavaScript
Raw Permalink Normal View History

2024-05-16 17:57:51 +02:00
let items = this.effect.itemTargets;
let msg = "";
for(let item of items)
{
if (item.system.properties.qualities.durable)
{
await item.update({"system.qualities.value" : []});
msg += `<p>${item.name} per toutes ses Qualités</p>`
2024-05-16 17:57:51 +02:00
}
else
{
msg += `<p>${item.name} tombe en poussière!</p>`
await item.update({name : item.name + " (Poussières)"})
2024-05-16 17:57:51 +02:00
}
}
if(msg)
{
this.script.scriptMessage(msg);
}