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" : []});
|
2024-05-17 12:46:44 +02:00
|
|
|
msg += `<p>${item.name} per toutes ses Qualités</p>`
|
2024-05-16 17:57:51 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-05-17 12:46:44 +02:00
|
|
|
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);
|
|
|
|
}
|