2024-05-16 17:57:51 +02:00
|
|
|
let test = this.effect.sourceTest;
|
|
|
|
if (test.failed && (test.result.roll % 11 == 0 || test.result.roll == 100))
|
|
|
|
{
|
|
|
|
let points = await new Roll("1d10").roll();
|
|
|
|
game.dice3d?.showForRoll(points)
|
|
|
|
this.actor.update({"system.status.corruption.value" : this.actor.system.status.corruption.value + points.total})
|
2024-05-17 09:19:48 +02:00
|
|
|
this.script.scriptMessage(`Reçoit ${points.total} Point de Corruption`)
|
2024-05-16 17:57:51 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
let points = this.effect.sourceTest.result.overcast.usage.other.current;
|
|
|
|
this.actor.update({"system.status.corruption.value" : this.actor.system.status.corruption.value - points})
|
2024-05-17 09:19:48 +02:00
|
|
|
this.script.scriptMessage(`Perd ${points} Point de Corruption`)
|
2024-05-16 17:57:51 +02:00
|
|
|
}
|