before fixing damage roll on main

This commit is contained in:
Dapoolp 2025-07-26 14:02:45 +02:00
parent af01f8f1b2
commit 27c4626a15
4 changed files with 12 additions and 6 deletions

View file

@ -442,6 +442,9 @@
"title": "Ownership Selection - {name}", "title": "Ownership Selection - {name}",
"default": "Default Ownership" "default": "Default Ownership"
}, },
"ReactionRoll": {
"title": "Reaction Roll: {trait}"
},
"ResourceDice": { "ResourceDice": {
"title": "{name} Resource", "title": "{name} Resource",
"rerollDice": "Reroll Dice" "rerollDice": "Reroll Dice"

View file

@ -13,7 +13,7 @@ export default class ReactionRollDialog extends HandlebarsApplicationMixin(Appli
static DEFAULT_OPTIONS = { static DEFAULT_OPTIONS = {
tag: 'form', tag: 'form',
classes: ['daggerheart', 'views', 'damage-reduction'], classes: ['daggerheart', 'views'],
position: { position: {
width: 240, width: 240,
height: 'auto' height: 'auto'
@ -32,9 +32,9 @@ export default class ReactionRollDialog extends HandlebarsApplicationMixin(Appli
/** @override */ /** @override */
static PARTS = { static PARTS = {
damageSelection: { reactionRoll: {
id: 'damageReduction', id: 'reactionRoll',
template: 'systems/daggerheart/templates/dialogs/damageReduction.hbs' template: 'systems/daggerheart/templates/dialogs/reactionRoll.hbs'
} }
}; };
@ -42,7 +42,7 @@ export default class ReactionRollDialog extends HandlebarsApplicationMixin(Appli
/** @inheritDoc */ /** @inheritDoc */
get title() { 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) { async _prepareContext(_options) {

View file

@ -12,7 +12,7 @@ export default class DamageRoll extends DHRoll {
static async buildEvaluate(roll, config = {}, message = {}) { static async buildEvaluate(roll, config = {}, message = {}) {
if (config.evaluate !== false) { 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(); for (const roll of config.roll) await roll.roll.evaluate();
} }
roll._evaluated = true; roll._evaluated = true;

View file

@ -0,0 +1,3 @@
<div>
Reaction Roll
</div>