Fix negative Impale DPS for dual wielding combined attacks #8554
+75
−15
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 #8472.
Description of the problem being solved:
Skills that combine both weapon's damage into one hit when dual wielding (Cleave, Dual Strike, Viper Strike, Whirling Blades) would report negative impale DPS under certain conditions like low impale chance or high enemy impale physical damage reduction.
Calculations are now done separately for each hand and then combined instead of averaging the impale base and modifier. This also fixes incorrect calculations in cases where one hand deals significantly more damage than the other (e.g. Dual Strike of Ambidexterity).
Steps taken to verify a working solution:
Link to a build that showcases this PR:
https://poe.ninja/builds/phrecia/character/Expertas%234276/ExpertInTheBin?type=exp&i=5&search=skills%3DDual%2BStrike%2Bof%2BAmbidexterity
Before screenshot:
Negative impale dps:


After screenshot:
Non-negative impale dps:


Before/After of same POB with 100% impale chance (to show corrected calculations)