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 : "
Apply Ward of Grimnir effet?
" })) { 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; }