2024-05-16 17:57:51 +02:00
|
|
|
if (!this.actor.effects.find(e => e.isCondition))
|
|
|
|
{
|
2024-05-17 12:46:44 +02:00
|
|
|
return this.script.scriptNotification("Aucun état sur cet acteur")
|
2024-05-16 17:57:51 +02:00
|
|
|
}
|
|
|
|
|
2024-05-17 12:46:44 +02:00
|
|
|
let choice = await ItemDialog.create(this.actor.effects.filter(i => i.isCondition), 1, "Choisissez un état")
|
2024-05-16 17:57:51 +02:00
|
|
|
|
|
|
|
if (choice[0])
|
|
|
|
{
|
|
|
|
await this.actor.removeCondition(choice[0].conditionId)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.actor.effects.find(e => e.isCondition))
|
|
|
|
{
|
|
|
|
return false; // Delete the effect if there are still conditions, otherwise, effect remains and provides the bonus
|
|
|
|
}
|