Fix "+% to Critical Damage Bonus" mods on weapons applying to Spells#2247
Merged
LocalIdentity merged 1 commit intoJun 20, 2026
Conversation
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
approved these changes
Jun 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2199.
Problem
A weapon's
+X% to Critical Damage Bonuswas parsed as a globalCritMultipliermod, 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 weaponCritMultipliermod (flags 0) the same way weapon Accuracy / leech already are — scoping it toMainHandAttack/OffHandAttackso it only applies to attacks using that weapon.Testing
Adds a regression test in
spec/System/TestAttacks_spec.lua: aFireballspell's crit multiplier is unchanged by+50% to Critical Damage Bonuson the equipped quarterstaff. The existing test that a weapon attack does gain the bonus still passes, and the full suite + ModCache check are green.