Check version
Check for duplicates
Check for support
What platform are you running Path of Building on?
Windows
What is the value from the calculation in-game?
PoE does not report impale DPS.
What is the value from the calculation in Path of Building?
Currently when using Dual Strike of Ambidexterity with a non-zero chance to impale PoB reports a negative impale DPS number if certain conditions are met, usually when less than 100% chance to impale is present.
The problem seems to be around this line in CalcOffence.lua:
|
if skillFlags.attack and skillData.doubleHitsWhenDualWielding and skillFlags.bothWeaponAttack then |
|
-- due to how its being combined |
|
output.ImpaleModifier = output.ImpaleModifier / 2 |
|
end |
|
output.ImpaleDPS = output.impaleStoredHitAvg * ((output.ImpaleModifier or 1) - 1) * output.HitChance / 100 * skillData.dpsMultiplier |
In line 5545, if ImpaleModifier is smaller than 1 the DPS becomes negative.
I believe the problem results from the following. In line 5036:
|
output.ImpaleModifier = 1 + impaleDMGModifier |
Adding 1 to impaleDMGModifier seems incorrect. The modifier can take values between 0 and 1, specially if the impale chance is lower than 100% and/or if not enough impale effect is stacked.
Similarly:
|
output.ImpaleDPS = output.impaleStoredHitAvg * ((output.ImpaleModifier or 1) - 1) * output.HitChance / 100 * skillData.dpsMultiplier |
If adding 1 to impaleDMGModifier is incorrect, then substracting 1 from ImpaleModifier should also be incorrect.
Normally the above operations would not result in a noticeable effect, since adding 1 and substracting 1 cancel each other, but because Dual Strike of Ambidexterity has the flags doubleHitsWhenDualWielding and bothWeaponAttack, the modifier gets halved to account for the dual strike effect:
|
output.ImpaleModifier = output.ImpaleModifier / 2 |
This causes an imbalance in the equations and the negative DPS scenario.
I ignore what the correct calculation would look like, but if I had to guess it's probably better to calculate the output.ImpaleDPS for the main-hand and the off-hand separately, and if not possible, use the average between the main-hand and the off-hand.
How to reproduce the issue
No response
PoB for PoE1 build code
https://pobb.in/Rz44K7FGpysr
Screenshots
No response
Check version
Check for duplicates
Check for support
What platform are you running Path of Building on?
Windows
What is the value from the calculation in-game?
PoE does not report impale DPS.
What is the value from the calculation in Path of Building?
Currently when using Dual Strike of Ambidexterity with a non-zero chance to impale PoB reports a negative impale DPS number if certain conditions are met, usually when less than 100% chance to impale is present.
The problem seems to be around this line in CalcOffence.lua:
PathOfBuilding/src/Modules/CalcOffence.lua
Lines 5541 to 5545 in e5efdfc
In line 5545, if
ImpaleModifieris smaller than 1 the DPS becomes negative.I believe the problem results from the following. In line 5036:
PathOfBuilding/src/Modules/CalcOffence.lua
Line 5036 in e5efdfc
Adding 1 to
impaleDMGModifierseems incorrect. The modifier can take values between 0 and 1, specially if the impale chance is lower than 100% and/or if not enough impale effect is stacked.Similarly:
PathOfBuilding/src/Modules/CalcOffence.lua
Line 5545 in e5efdfc
If adding 1 to
impaleDMGModifieris incorrect, then substracting 1 fromImpaleModifiershould also be incorrect.Normally the above operations would not result in a noticeable effect, since adding 1 and substracting 1 cancel each other, but because Dual Strike of Ambidexterity has the flags
doubleHitsWhenDualWieldingandbothWeaponAttack, the modifier gets halved to account for the dual strike effect:PathOfBuilding/src/Modules/CalcOffence.lua
Line 5543 in e5efdfc
This causes an imbalance in the equations and the negative DPS scenario.
I ignore what the correct calculation would look like, but if I had to guess it's probably better to calculate the
output.ImpaleDPSfor the main-hand and the off-hand separately, and if not possible, use the average between the main-hand and the off-hand.How to reproduce the issue
No response
PoB for PoE1 build code
Screenshots
No response