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

12 lines
491 B
JavaScript
Raw Permalink Normal View History

2024-05-16 17:57:51 +02:00
let item = await fromUuid("Compendium.wfrp4e-core.items.3S4OYOZLauXctmev")
let data = item.toObject();
data.system.location.key = this.item.system.location.key
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id})
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
await test.roll();
if (test.failed)
{
this.actor.addCondition("unconscious")
}