Files
foundryvtt-wh4-lang-fr-fr/scripts/v5K5HaHTZmVSJBdr.js
T
uberwald 38d88c2f19
Validation JSON / validate (push) Successful in 13s
Mise àjour vers 9.6.0
2026-05-18 07:23:40 +02:00

25 lines
564 B
JavaScript

let bane = this.effect.specifier;
if (bane)
return;
if (await this.script.dialog("Lancer le Fléau ?"))
{
let table = await fromUuid("Compendium.wfrp4e-archives2.tables.RollTable.wRfrOW5pRXRWM8Lb");
if (table)
{
bane = (await table.draw()).results[0].name;
}
else
{
this.script.notification("Table de créatures aléatoires introuvable !", "error");
}
}
if (!bane)
{
bane = await ValueDialog.create({text: "Entrez le Fléau", title: this.effect.name})
}
if (bane)
{
this.effect.updateSource({name: this.effect.setSpecifier(bane)});
}