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

8 lines
388 B
JavaScript
Raw Normal View History

if (args.test.result.SL < 0)
{
this.script.scriptMessage(`Gained ${Math.abs(args.test.result.SL)} Corruption points`, {whisper : ChatMessage.getWhisperRecipients("GM")})
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)})
}
}