Skip to content

Fix dual wield skills with "both weapons hit..." combining into a single hit#2006

Open
majochem wants to merge 4 commits into
PathOfBuildingCommunity:devfrom
majochem:fix/dualWield
Open

Fix dual wield skills with "both weapons hit..." combining into a single hit#2006
majochem wants to merge 4 commits into
PathOfBuildingCommunity:devfrom
majochem:fix/dualWield

Conversation

@majochem
Copy link
Copy Markdown
Contributor

@majochem majochem commented May 29, 2026

Description of the problem being solved:

PoB2 until now assumed that the doubleHitsWhenDualWielding behaved similar to PoE1, where both weapons do a single combined hit. However, as confirmed by Viperesque from GGG and in-game testing, the skills actually perform two separate near simultaneous hits. As a result, Average Damage, Attack Rate and the Effective Crit Chance are all currently wrong (combined hit makes the hit count as critical, as long as one of the weapons crits)

This PR:

  • Adjusts interpretation of doubleHitsWhenDualWielding to instead perform two hits
  • Changes the existing logic for combined hits to look for combinesHitsWhenDualWielding. *(Note: There's currently no skill in the game that has such behavior, but it is likely to be included with future weapon types, so we will still need the logic)

Steps taken to verify a working solution:

  • Hit rate correctly gets doubled
  • Hit damage no longer gets combined
  • Doesn't apply to "Armour Breaker" skill which alternates weapons
  • Doesn't double mana costs or other "per use" mechanics

Link to a build that showcases this PR:

Somewhat random test build

Limitations:

  • The doubling of the attack rate is not technically accurate because there is a slight delay between first and second hit, which would screw up any trigger calculations that rely on precise timing. Those values likely depend on animation length though, so we don't have any data yet and we don't support triggers so far anyways 🤷
  • We don't have a great breakdown for "DPS" i.e. hit rate multiplier mods. The current one shows that it's multiplying the "Average Damage", but that value is also affected by "Eff. DPS Mod" like Armour, which is why the values don't add up properly. That should be its own separate PR though because it's not limited to dual wielding.

Before screenshot:

Average hit wrongly combines damage
image

No DPS Multiplier
image

After screenshot:

Average hit corrected
image

New DPS Multiplier
image

Note: Hit DPS is lower because the individual hits are smaller and therefore more strongly affected by enemy Armour. Poison DPS is higher because hitting more often increases the "Stack Potential"

majochem added 4 commits May 29, 2026 11:06
In PoE2 `doubleHitsWhenDualWielding` does not actually cause a combined
hit from both weapons, but instead causes two separate near simultaneous
hits.

In order to still be able to reuse the old logic, I changed all checks
for `doublenHitsWhenDualWielding` to `combinesHitsWhenDualWielding`
instead. Support for the old flag will be in separate commit.
Now correctly reflects behavior of the three possible dual wield hitRate
scenarios:
1. One combined hit from both weapons (Harmonic Mean)
2. Two separate simultaneous hits from each weapon (2x Harmonic Mean)
3. Alternating between Mainhand and Offhand (Harmonic Mean)
This is still not ideal imo, but it's mostly due to the fact that
we don't have a good breakdown for "DPS" mods
@majochem majochem marked this pull request as ready for review May 29, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant