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

8 lines
392 B
JavaScript
Raw Normal View History

2024-05-16 17:57:51 +02:00
if (args.test.result.SL < 0)
{
this.script.scriptMessage(`Reçoit ${Math.abs(args.test.result.SL)} Points de Corruption`, {whisper : ChatMessage.getWhisperRecipients("GM")})
2024-05-16 17:57:51 +02:00
if (args.test.failed && this.actor.type == "character")
{
this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + Math.abs(args.test.result.SL)})
}
}