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

18 lines
592 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

if (args.totalWoundLoss <= 7) return;
let options = {
appendTitle : " " + this.effect.name,
skipTargets: true,
fields: {difficulty: 'average'},
characteristic: 'wp',
}
let test = await args.actor.setupSkill('Calme', options);
await test.roll();
if (!test.succeeded) {
const targetId = this.effect.getFlag("wfrp4e", "target");
const target = canvas.scene.tokens.get(targetId);
await this.effect.delete();
args.extraMessages.push(`<b>${args.actor.name}</b> perd ${args.totalWoundLoss} Blessures de l'attaque, ce qui l'a amené à lâcher prise <b>${target.name}</b>.`);
}