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

26 lines
662 B
JavaScript
Raw Permalink 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>Eviter les dégâts avec <strong>${this.effect.name}</strong>?`,
2024-05-16 17:57:51 +02:00
buttons: {
yes: {
label: "Oui",
2024-05-16 17:57:51 +02:00
callback: () => {
return true;
}
},
no: {
label: "Non",
2024-05-16 17:57:51 +02:00
callback: () => {
return false;
}
}
}
})
if (choice)
{
args.abort = `<strong>${this.effect.name}</strong>: Dégâts annulés`
2024-05-16 17:57:51 +02:00
}
}