This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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)});
|
||||
}
|
||||
Reference in New Issue
Block a user