Skip to content

[#6261] Add modifiers to DamageData#6834

Merged
arbron merged 5 commits into
6.0.xfrom
damage/modifiers
Jun 16, 2026
Merged

[#6261] Add modifiers to DamageData#6834
arbron merged 5 commits into
6.0.xfrom
damage/modifiers

Conversation

@arbron

@arbron arbron commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Adds a new modifiers field for damage that is applied automatically to the formula. The DamageData model now automatically adds these modifiers to the formula, attaching to the first roll (if one can be found when using a custom formula).

The DamageData#scaledFormula supports passing in additional modifiers that are also appended. This is to support a future Rule active effect that adds modifiers to certain rolls at evaluation time (such as Elemental Adept, which would add min2 to all damage rolls from spells that deal a certain damage type).

Closes #6261

@arbron arbron added this to the D&D5E 6.0.0 milestone Mar 16, 2026
@arbron arbron self-assigned this Mar 16, 2026
@arbron arbron changed the base branch from 5.3.x to 6.0.x June 2, 2026 17:49
@arbron arbron force-pushed the damage/modifiers branch from a4ec673 to 62e3180 Compare June 2, 2026 18:09
Comment thread module/data/shared/damage-field.mjs Outdated
Comment thread module/data/shared/damage-field.mjs Outdated
@arbron arbron requested a review from Fyorl June 5, 2026 20:58
Comment thread module/data/shared/damage-field.mjs
@arbron arbron requested a review from Fyorl June 5, 2026 21:53
Comment thread module/data/shared/damage-field.mjs Outdated
Comment thread module/data/shared/damage-field.mjs Outdated
Comment thread module/data/shared/damage-field.mjs Outdated
arbron added 5 commits June 16, 2026 10:03
Adds a new modifiers field for damage that is applied automatically
to the formula. The `DamageData` model now automatically adds these
modifiers to the formula, attaching to the first roll (if one can
be found when using a custom formula).

The `DamageData#scaledFormula` supports passing in additional
modifiers that are also appended. This is to support a future Rule
active effect that adds modifiers to certain rolls at evaluation
time (such as Elemental Adept, which would add `min2` to all damage
rolls from spells that deal a certain damage type).

Closes #6261
@arbron arbron force-pushed the damage/modifiers branch from 84efb14 to 6709a94 Compare June 16, 2026 17:09
@arbron arbron merged commit 8aa4753 into 6.0.x Jun 16, 2026
@arbron arbron deleted the damage/modifiers branch June 16, 2026 17:09
@arbron arbron mentioned this pull request Jun 29, 2026
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add modifiers field to DamageData

2 participants