diff --git a/module/applications/dialogs/deathMove.mjs b/module/applications/dialogs/deathMove.mjs index 1b85d0d2..abd7e15a 100644 --- a/module/applications/dialogs/deathMove.mjs +++ b/module/applications/dialogs/deathMove.mjs @@ -1,3 +1,6 @@ +import { enrichedFateRoll } from '../../enrichers/FateRollEnricher.mjs'; + + const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV2) { @@ -40,12 +43,14 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV async handleAvoidDeath() { console.log("Avoid Death!"); - if (game.modules.get('dice-so-nice')?.active) { - - const { diceSoNice } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance); - - const hopeDice = await getDiceSoNicePreset(diceSoNice.hope, 12); - } + const target = this.actor.uuid; + await enrichedFateRoll({ + target, + title: "Avoid Death Hope Fate Roll", + label: 'test', + fateType: "Hope" + }); + console.log("enrichedFateRoll done..."); } handleRiskItAll() { @@ -87,6 +92,8 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV cls.create(msg); + this.close(); + if (CONFIG.DH.GENERAL.deathMoves.avoidDeath === this.selectedMove) { this.handleAvoidDeath(); return; @@ -97,8 +104,5 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV return; } - - this.close(); - } }