From 27c4626a15cb8f5f2e05d799213935cfc89bcbd8 Mon Sep 17 00:00:00 2001 From: Dapoolp Date: Sat, 26 Jul 2025 14:02:45 +0200 Subject: [PATCH] before fixing damage roll on main --- lang/en.json | 3 +++ module/applications/dialogs/reactionRollDialog.mjs | 10 +++++----- module/dice/damageRoll.mjs | 2 +- templates/dialogs/reactionRoll.hbs | 3 +++ 4 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 templates/dialogs/reactionRoll.hbs diff --git a/lang/en.json b/lang/en.json index 182c7419..a8eece96 100755 --- a/lang/en.json +++ b/lang/en.json @@ -442,6 +442,9 @@ "title": "Ownership Selection - {name}", "default": "Default Ownership" }, + "ReactionRoll": { + "title": "Reaction Roll: {trait}" + }, "ResourceDice": { "title": "{name} Resource", "rerollDice": "Reroll Dice" diff --git a/module/applications/dialogs/reactionRollDialog.mjs b/module/applications/dialogs/reactionRollDialog.mjs index 215cc85e..b1765317 100644 --- a/module/applications/dialogs/reactionRollDialog.mjs +++ b/module/applications/dialogs/reactionRollDialog.mjs @@ -13,7 +13,7 @@ export default class ReactionRollDialog extends HandlebarsApplicationMixin(Appli static DEFAULT_OPTIONS = { tag: 'form', - classes: ['daggerheart', 'views', 'damage-reduction'], + classes: ['daggerheart', 'views'], position: { width: 240, height: 'auto' @@ -32,9 +32,9 @@ export default class ReactionRollDialog extends HandlebarsApplicationMixin(Appli /** @override */ static PARTS = { - damageSelection: { - id: 'damageReduction', - template: 'systems/daggerheart/templates/dialogs/damageReduction.hbs' + reactionRoll: { + id: 'reactionRoll', + template: 'systems/daggerheart/templates/dialogs/reactionRoll.hbs' } }; @@ -42,7 +42,7 @@ export default class ReactionRollDialog extends HandlebarsApplicationMixin(Appli /** @inheritDoc */ get title() { - return game.i18n.localize('DAGGERHEART.APPLICATIONS.DamageReduction.title'); + return game.i18n.format('DAGGERHEART.APPLICATIONS.ReactionRoll.title', { trait: game.i18n.localize(`DAGGERHEART.CONFIG.Traits.${this.trait}.name`) }); } async _prepareContext(_options) { diff --git a/module/dice/damageRoll.mjs b/module/dice/damageRoll.mjs index 6c99dae4..7b3978f6 100644 --- a/module/dice/damageRoll.mjs +++ b/module/dice/damageRoll.mjs @@ -12,7 +12,7 @@ export default class DamageRoll extends DHRoll { static async buildEvaluate(roll, config = {}, message = {}) { if (config.evaluate !== false) { - if (config.dialog.configure === false) roll.constructFormula(config); + // if (config.dialog.configure === false) roll.constructFormula(config); for (const roll of config.roll) await roll.roll.evaluate(); } roll._evaluated = true; diff --git a/templates/dialogs/reactionRoll.hbs b/templates/dialogs/reactionRoll.hbs new file mode 100644 index 00000000..98c94f16 --- /dev/null +++ b/templates/dialogs/reactionRoll.hbs @@ -0,0 +1,3 @@ +
+ Reaction Roll +
\ No newline at end of file