2024-05-16 17:57:51 +02:00
|
|
|
if (args.opposedTest?.attackerTest?.item?.system?.isRanged)
|
|
|
|
{
|
|
|
|
let choice = await Dialog.wait({
|
|
|
|
title: this.effect.name,
|
2024-05-17 09:19:48 +02:00
|
|
|
content: `<p>Eviter les dégâts avec <strong>${this.effect.name}</strong>?`,
|
2024-05-16 17:57:51 +02:00
|
|
|
buttons: {
|
|
|
|
yes: {
|
2024-05-17 09:19:48 +02:00
|
|
|
label: "Oui",
|
2024-05-16 17:57:51 +02:00
|
|
|
callback: () => {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
no: {
|
2024-05-17 09:19:48 +02:00
|
|
|
label: "Non",
|
2024-05-16 17:57:51 +02:00
|
|
|
callback: () => {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
if (choice)
|
|
|
|
{
|
2024-05-17 09:19:48 +02:00
|
|
|
args.abort = `<strong>${this.effect.name}</strong>: Dégâts annulés`
|
2024-05-16 17:57:51 +02:00
|
|
|
}
|
|
|
|
}
|