2024-05-16 17:57:51 +02:00
|
|
|
let uses = this.item.getFlag("wfrp4e", "uses") || 0;
|
|
|
|
uses++;
|
2024-05-17 01:07:37 +02:00
|
|
|
this.script.scriptNotification(`Utilisé ${uses} fois`)
|
2024-05-16 17:57:51 +02:00
|
|
|
this.item.setFlag("wfrp4e", "uses", uses);
|
|
|
|
if (uses >= 3)
|
|
|
|
{
|
|
|
|
this.effect.update({"flags.wfrp4e.applicationData.type" : "other"})
|
2024-05-17 01:07:37 +02:00
|
|
|
this.script.scriptNotification(`Utilisé`);
|
2024-05-16 17:57:51 +02:00
|
|
|
}
|