22 lines
643 B
JavaScript
22 lines
643 B
JavaScript
const bloodyFluxUUID = "Compendium.wfrp4e-core.items.Item.herUmN51D9TiL2Vn";
|
|
|
|
const test = await this.actor.setupSkill(game.i18n.localize("NAME.Résistance"), {
|
|
skipTargets: true,
|
|
appendTitle: ` — ${this.effect.name}`,
|
|
fields: {difficulty: "easy"},
|
|
context: {
|
|
success: `Butcher est soigné.`,
|
|
failure: `Butcher contracte @UUID[${bloodyFluxUUID}].`
|
|
}
|
|
});
|
|
|
|
await Test.roll();
|
|
|
|
if (Test.Échoué) {
|
|
await this.actor.addEffectItems(bloodyFluxUUID, this.effet);
|
|
} else {
|
|
const SL = Test.result.SL;
|
|
const heal = 1 + SL;
|
|
await this.actor.modifyWounds(heal);
|
|
this.script.message(`Butcher a soigné ${heal} Blessures.`);
|
|
} |