Skip to content

Fix "+% to Critical Damage Bonus" mods on weapons applying to Spells#2247

Merged
LocalIdentity merged 1 commit into
PathOfBuildingCommunity:devfrom
luther-rotmg:fix/2199-local-crit-damage-bonus
Jun 20, 2026
Merged

Fix "+% to Critical Damage Bonus" mods on weapons applying to Spells#2247
LocalIdentity merged 1 commit into
PathOfBuildingCommunity:devfrom
luther-rotmg:fix/2199-local-crit-damage-bonus

Conversation

@luther-rotmg

Copy link
Copy Markdown
Contributor

Closes #2199.

Problem

A weapon's +X% to Critical Damage Bonus was parsed as a global CritMultiplier mod, so it incorrectly boosted skills that don't use the weapon — spells, shield skills, and own-base-damage skills (e.g. Bloodhound's Mark's explosion). In-game it's a local weapon affix that only applies to attacks using that weapon.

Fix

In ItemClass:BuildModListForSlotNum, localize a plain weapon CritMultiplier mod (flags 0) the same way weapon Accuracy / leech already are — scoping it to MainHandAttack / OffHandAttack so it only applies to attacks using that weapon.

Testing

Adds a regression test in spec/System/TestAttacks_spec.lua: a Fireball spell's crit multiplier is unchanged by +50% to Critical Damage Bonus on the equipped quarterstaff. The existing test that a weapon attack does gain the bonus still passes, and the full suite + ModCache check are green.

A weapon's "+X% to Critical Damage Bonus" was parsed as a global CritMultiplier
mod, so it incorrectly boosted skills that don't use the weapon (spells, shield
skills, and own-base-damage skills like Bloodhound's Mark's explosion).

Localize it the same way weapon accuracy/leech already are: in
BuildModListForSlotNum, scope a plain weapon CritMultiplier mod (flags 0) to that
weapon's hand via a MainHandAttack/OffHandAttack condition, so it only applies to
attacks using the weapon.

Add a regression test: a weapon's local crit damage bonus does not change a
Fireball spell's crit multiplier.

Closes PathOfBuildingCommunity#2199
@LocalIdentity LocalIdentity added the bug: calculation Numerical differences label Jun 20, 2026
@LocalIdentity LocalIdentity changed the title Make weapon "+% to Critical Damage Bonus" local to that weapon Fix "+% to Critical Damage Bonus" mods on weapons applying to Spells Jun 20, 2026
@LocalIdentity LocalIdentity merged commit 523225e into PathOfBuildingCommunity:dev Jun 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: calculation Numerical differences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"+% to Critical Damage Bonus" (local) being applied as global in PoB

3 participants