Skip to content

Commit 5460c56

Browse files
authored
FIX: Elemental overload not reducing ailment chance to 0 (#8325)
Currently, it seems the "Ailments never count as being from Critical Strikes" mod line found on the Elemental Overload keystone is implemented by simply never running the crit calculation pass when calculating ailments. This causes the ailment chance to still show up in the breakdown and cause issues with the Perfect Agony keystone which makes ailments only apply from crits.
1 parent a21593f commit 5460c56

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

src/Modules/CalcOffence.lua

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3842,6 +3842,12 @@ function calcs.offence(env, actor, activeSkill)
38423842
end
38433843
end
38443844

3845+
if modDB:Flag(nil, "AilmentsAreNeverFromCrit") then
3846+
for _, ailment in ipairs(ailmentTypeList) do
3847+
output[ailment.."ChanceOnCrit"] = 0
3848+
end
3849+
end
3850+
38453851
-- address Weapon1H interaction with Ailment for nodes like Sleight of Hand
38463852
-- bit-and on cfg.flags confirms if the skill has the 1H flag
38473853
-- if so bit-or on the targetCfg (e.g. dotCfg) to guarantee for calculations like Sum("INC") and breakdown
@@ -4050,11 +4056,8 @@ function calcs.offence(env, actor, activeSkill)
40504056
end
40514057

40524058
for sub_pass = 1, 2 do
4053-
if skillModList:Flag(dotCfg, "AilmentsAreNeverFromCrit") or sub_pass == 1 then
4054-
dotCfg.skillCond["CriticalStrike"] = false
4055-
else
4056-
dotCfg.skillCond["CriticalStrike"] = true
4057-
end
4059+
dotCfg.skillCond["CriticalStrike"] = sub_pass ~= 1
4060+
40584061
local min, max = calcAilmentSourceDamage(activeSkill, output, dotCfg, sub_pass == 1 and breakdown and breakdown.BleedPhysical, "Physical", 0)
40594062
output.BleedPhysicalMin = min
40604063
output.BleedPhysicalMax = max
@@ -4280,11 +4283,8 @@ function calcs.offence(env, actor, activeSkill)
42804283
end
42814284
end
42824285
for sub_pass = 1, 2 do
4283-
if skillModList:Flag(dotCfg, "AilmentsAreNeverFromCrit") or sub_pass == 1 then
4284-
dotCfg.skillCond["CriticalStrike"] = false
4285-
else
4286-
dotCfg.skillCond["CriticalStrike"] = true
4287-
end
4286+
dotCfg.skillCond["CriticalStrike"] = sub_pass ~= 1
4287+
42884288
local totalMin, totalMax = 0, 0
42894289
do
42904290
local min, max = calcAilmentSourceDamage(activeSkill, output, dotCfg, sub_pass == 1 and breakdown and breakdown.PoisonChaos, "Chaos", 0)
@@ -4601,11 +4601,8 @@ function calcs.offence(env, actor, activeSkill)
46014601
end
46024602

46034603
for sub_pass = 1, 2 do
4604-
if skillModList:Flag(dotCfg, "AilmentsAreNeverFromCrit") or sub_pass == 1 then
4605-
dotCfg.skillCond["CriticalStrike"] = false
4606-
else
4607-
dotCfg.skillCond["CriticalStrike"] = true
4608-
end
4604+
dotCfg.skillCond["CriticalStrike"] = sub_pass ~= 1
4605+
46094606
local totalMin, totalMax = 0, 0
46104607
if canDeal.Physical and skillModList:Flag(cfg, "PhysicalCanIgnite") then
46114608
local min, max = calcAilmentSourceDamage(activeSkill, output, dotCfg, sub_pass == 1 and breakdown and breakdown.IgnitePhysical, "Physical", dmgTypeFlags.Fire)

0 commit comments

Comments
 (0)