Repository navigation
Conversation
ModStore:More(cfg, ...) takes the cfg as its first argument, but four call sites in CalcOffence passed the string "MORE" there. That made the query run with flags and keywordFlags of 0 and no skill cfg, so MORE modifiers with a ModFlag, a KeywordFlag or a cfg-dependent condition were dropped: - Accuracy and AccuracyVsEnemy - ReloadSpeed - CritMultiplier For example, Unerring Power's more Accuracy while Empowered was lost when attacks were Empowered by The Empty Roar, and "50% more Critical Damage Bonus with Attacks" did not apply to attacks.
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.
Fixes #2569 .
Description of the problem being solved:
ModStore:More(cfg, ...)takes the cfg as its first argument, but four calls inCalcOffence.luapassed"MORE"there: Accuracy, AccuracyVsEnemy, ReloadSpeed and CritMultiplier. Those queries ran with no flags, keyword flags or skill cfg, so MORE modifiers that depend on them were dropped. Examples are Unerring Power's more Accuracy while Empowered by The Empty Roar, and "more Critical Damage Bonus with Attacks".This removes the stray argument.
Steps taken to verify a working solution:
Added two specs to
spec/System/TestAttacks_spec.lua:Both fail on
devand pass with this change.Ran every
spec/Systemspec inghcr.io/pathofbuildingcommunity/pathofbuilding-tests:latest, the same way CI does: 52 files, 905 tests, 0 failures.Loaded the build from Conditional or attack-only MORE Accuracy, Critical Damage Bonus and Reload Speed mods are ignored (e.g. Unerring Power with The Empty Roar) #2569: Accuracy goes from 90 to 117 (25% → 31% chance to hit), which matches the Configuration Empowered result.
No parser changes, so
ModCache.luais unaffected.Link to a build that showcases this PR:
See the build code in #2569.
Before screenshot:
Calcs: Accuracy 90, 25% chance to hit.
After screenshot:
Calcs: Accuracy 117, 31% chance to hit.