Add all systems effects scripts

This commit is contained in:
2024-05-16 17:57:51 +02:00
parent b42df99b27
commit 0b286ac994
1282 changed files with 9990 additions and 384 deletions

View File

@ -0,0 +1,40 @@
let chatData = { whisper: ChatMessage.getWhisperRecipients("GM") }
let message = ""
let wounds = duplicate(this.actor.status.wounds)
let regenRoll = await new Roll("1d10").roll();
let regen = regenRoll.total;
if (wounds.value >= wounds.max)
return
if (wounds.value > 0)
{
wounds.value += regen
if (wounds.value > wounds.max)
{
wounds.value = wounds.max
}
message += `<b>${this.actor.name}</b> regains ${regen} Wounds.`
if (regen == 10)
{
message += `<br>Additionally, they regenerate a Critical Wound.`
}
}
else if (regen >= 8)
{
message += `<b>${this.actor.name}</b> rolled a ${regen} and regains 1 Wound.`
wounds.value += 1
if (regen == 10)
{
message += `<br>Additionally, they regenerate a Critical Wound.`
}
}
else
{
message += `<b>${this.actor.name}</b> Regenerate roll of ${regen} - No effect.`
}
await this.actor.update({ "system.status.wounds": wounds })
this.script.scriptMessage(message, { whisper: ChatMessage.getWhisperRecipients("GM") })