diff --git a/module/applications/dialogs/damageDialog.mjs b/module/applications/dialogs/damageDialog.mjs index 7a748cff..46d3d41f 100644 --- a/module/applications/dialogs/damageDialog.mjs +++ b/module/applications/dialogs/damageDialog.mjs @@ -78,9 +78,9 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application this.config.selectedMessageMode = data.selectedMessageMode; if (data.damageOptions) { - const groupAttackNr = data.damageOptions.groupAttack?.nr; - if (typeof groupAttackNr !== 'number' || groupAttackNr % 1 !== 0) { - data.damageOptions.groupAttack.nr = null; + const numAttackers = data.damageOptions.groupAttack?.numAttackers; + if (typeof numAttackers !== 'number' || numAttackers % 1 !== 0) { + data.damageOptions.groupAttack.numAttackers = null; } foundry.utils.mergeObject(this.config.damageOptions, data.damageOptions); @@ -98,7 +98,7 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application const range = this.config.damageOptions.groupAttack.range; const groupAttackTokens = game.system.api.fields.ActionFields.DamageField.getGroupAttackTokens(actorId, range); - this.config.damageOptions.groupAttack.nr = groupAttackTokens.length; + this.config.damageOptions.groupAttack.numAttackers = groupAttackTokens.length; this.render(); } diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index 7b725a7d..14b94120 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -294,7 +294,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel config.damageOptions = { groupAttack: this.damage.groupAttack ? { - nr: Math.max(groupAttackTokens.length, 1), + numAttackers: Math.max(groupAttackTokens.length, 1), range: this.damage.groupAttack } : null diff --git a/module/dice/damageRoll.mjs b/module/dice/damageRoll.mjs index a12f9d92..98fd8401 100644 --- a/module/dice/damageRoll.mjs +++ b/module/dice/damageRoll.mjs @@ -170,11 +170,11 @@ export default class DamageRoll extends DHRoll { ); } - if (config.damageOptions.groupAttack?.nr > 1 && isHitpointPart) { + if (config.damageOptions.groupAttack?.numAttackers > 1 && isHitpointPart) { const damageTypes = [foundry.dice.terms.Die, foundry.dice.terms.NumericTerm]; for (const term of part.roll.terms) { if (damageTypes.some(type => term instanceof type)) { - term.number *= config.damageOptions.groupAttack.nr; + term.number *= config.damageOptions.groupAttack.numAttackers; } } } diff --git a/templates/dialogs/dice-roll/damageSelection.hbs b/templates/dialogs/dice-roll/damageSelection.hbs index c1b1fcbe..915061a0 100644 --- a/templates/dialogs/dice-roll/damageSelection.hbs +++ b/templates/dialogs/dice-roll/damageSelection.hbs @@ -48,7 +48,7 @@