forked from public/foundryvtt-wh4-lang-fr-fr
Ajout de la commande /voyage et grosse MAJK de la commande /auberge
This commit is contained in:
67
scripts/bNhpJPWwoHLq68zD.js
Normal file
67
scripts/bNhpJPWwoHLq68zD.js
Normal file
@@ -0,0 +1,67 @@
|
||||
let actor = await DragDialog.create({title : this.effect.name, text : "Fournissez un Acteur tatoueur (fermer pour ignorer les Tests)"})
|
||||
|
||||
if (!actor)
|
||||
{
|
||||
this.script.notification("Tests ignorés pour appliquer les tatouages");
|
||||
if (await foundry.applications.api.Dialog.confirm({
|
||||
window: {title: this.effect.name},
|
||||
content : "<p>Apply Ward of Grimnir effet?</p>"
|
||||
}))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let failed = false;
|
||||
if (this.actor.itemTags.skill.find(i => i.name == "Savoir (Théologie)"))
|
||||
{
|
||||
let test = await this.actor.setupSkill("Savoir (Théologie)", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "vhard"}})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.script.notification("Compétence Savoir (Théologie) introuvable, impossible de continuer.")
|
||||
failed = true;
|
||||
}
|
||||
|
||||
if (this.actor.itemTags.skill.find(i => i.name == "Lore (Runes)"))
|
||||
{
|
||||
let test = await this.actor.setupSkill("Lore (Runes)", {appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "hard"}})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.script.notification("Compétence Savoir (Runes) introuvable, impossible de continuer.")
|
||||
failed = true;
|
||||
}
|
||||
|
||||
|
||||
let test = await this.actor.setupSkill("Art (Tattooing)", {appendTitle : ` - ${this.effect.name}`})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
failed = true;
|
||||
}
|
||||
|
||||
if (failed)
|
||||
{
|
||||
this.script.message("Un ou plusieurs Tests pour appliquer les tatouages ont échoué.")
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user