forked from public/foundryvtt-wh4-lang-fr-fr
Add all systems effects scripts + translations
This commit is contained in:
20
reference_scripts/2sDH6RvoOAR40oqH.js
Normal file
20
reference_scripts/2sDH6RvoOAR40oqH.js
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
if (!["Goblin", "Orc"].includes(this.actor.system.details.species.value)) {
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { appendTitle: ` - ${this.effect.name}` })
|
||||
await test.roll();
|
||||
if (test.failed) {
|
||||
let infection = await fromUuid("Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg")
|
||||
this.actor.createEmbeddedDocuments("Item", [infection])
|
||||
}
|
||||
}
|
||||
|
||||
// Since wounds change when the effect is deleted, need to wait until after
|
||||
// the max wounds have been recalculated to apply damage
|
||||
game.wfrp4e.utility.sleep(1000).then(async () => {
|
||||
let roll = await new Roll("1d10").roll();
|
||||
|
||||
roll.toMessage(this.script.getChatData());
|
||||
this.script.scriptMessage(await this.actor.applyBasicDamage(roll.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true }))
|
||||
|
||||
})
|
Reference in New Issue
Block a user