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

26 lines
652 B
JavaScript
Raw Normal View History

2024-05-16 17:57:51 +02:00
if (args.opposedTest?.attackerTest?.item?.system?.isRanged)
{
let choice = await Dialog.wait({
title: this.effect.name,
content: `<p>Abort damage with <strong>${this.effect.name}</strong>?`,
buttons: {
yes: {
label: "Yes",
callback: () => {
return true;
}
},
no: {
label: "No",
callback: () => {
return false;
}
}
}
})
if (choice)
{
args.abort = `<strong>${this.effect.name}</strong>: Damage cancelled`
}
}