Skip to content

Commit 69cddf1

Browse files
author
LocalIdentity
committed
Fix Crit Chance when hitting with 2 weapons at once
When hitting with both weapons at once, only 1 of them needs to crit for the resulting hit to count as a crit Not sure if this applies to other stats
1 parent ff2fadc commit 69cddf1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/Modules/CalcOffence.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2266,6 +2266,12 @@ function calcs.offence(env, actor, activeSkill)
22662266
output[stat] = (output.MainHand[stat] or 0) + (output.OffHand[stat] or 0)
22672267
elseif mode == "AVERAGE" then
22682268
output[stat] = ((output.MainHand[stat] or 0) + (output.OffHand[stat] or 0)) / 2
2269+
elseif mode == "CRIT" then
2270+
if skillFlags.bothWeaponAttack and skillData.doubleHitsWhenDualWielding then
2271+
output[stat] = (output.MainHand[stat] or 0) + (output.OffHand[stat] or 0) - ((output.MainHand[stat] or 0) * (output.OffHand[stat] or 0) / 100)
2272+
else
2273+
output[stat] = ((output.MainHand[stat] or 0) + (output.OffHand[stat] or 0)) / 2
2274+
end
22692275
elseif mode == 'HARMONICMEAN' then
22702276
if output.MainHand[stat] == 0 or output.OffHand[stat] == 0 then
22712277
output[stat] = 0
@@ -4104,7 +4110,7 @@ function calcs.offence(env, actor, activeSkill)
41044110
if isAttack then
41054111
-- Combine crit stats, average damage and DPS
41064112
combineStat("PreEffectiveCritChance", "AVERAGE")
4107-
combineStat("CritChance", "AVERAGE")
4113+
combineStat("CritChance", "CRIT")
41084114
combineStat("PreEffectiveCritMultiplier", "AVERAGE")
41094115
combineStat("CritMultiplier", "AVERAGE")
41104116
combineStat("CritBifurcates", "AVERAGE")

0 commit comments

Comments
 (0)