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

14 lines
414 B
JavaScript
Raw Permalink Normal View History

2024-06-06 22:07:28 +02:00
let test = await this.actor.setupSkill('Résistance', {
appendTitle: ` ${this.effect.name}`,
skipTargets: true,
fields: {difficulty: 'easy'},
characteristic: 't',
context: {failure: "Mast shattered!"}
});
await test.roll();
if (test.failed) {
let crit = await fromUuid("Item.d4bCnR1zINTNF9VC");
await this.actor.createEmbeddedDocuments("Item", [crit]);
this.effect.update({disabled: true});
}