Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix elemental overload not reducing ailment chance to 0 #8325

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3713,6 +3713,12 @@ function calcs.offence(env, actor, activeSkill)
end
end

if modDB:Flag(nil, "AilmentsAreNeverFromCrit") then
for _, ailment in ipairs(ailmentTypeList) do
output[ailment.."ChanceOnCrit"] = 0
end
end

-- address Weapon1H interaction with Ailment for nodes like Sleight of Hand
-- bit-and on cfg.flags confirms if the skill has the 1H flag
-- if so bit-or on the targetCfg (e.g. dotCfg) to guarantee for calculations like Sum("INC") and breakdown
Expand Down Expand Up @@ -3921,11 +3927,8 @@ function calcs.offence(env, actor, activeSkill)
end

for sub_pass = 1, 2 do
if skillModList:Flag(dotCfg, "AilmentsAreNeverFromCrit") or sub_pass == 1 then
dotCfg.skillCond["CriticalStrike"] = false
else
dotCfg.skillCond["CriticalStrike"] = true
end
dotCfg.skillCond["CriticalStrike"] = sub_pass ~= 1

local min, max = calcAilmentSourceDamage(activeSkill, output, dotCfg, sub_pass == 1 and breakdown and breakdown.BleedPhysical, "Physical", 0)
output.BleedPhysicalMin = min
output.BleedPhysicalMax = max
Expand Down Expand Up @@ -4149,11 +4152,8 @@ function calcs.offence(env, actor, activeSkill)
end
end
for sub_pass = 1, 2 do
if skillModList:Flag(dotCfg, "AilmentsAreNeverFromCrit") or sub_pass == 1 then
dotCfg.skillCond["CriticalStrike"] = false
else
dotCfg.skillCond["CriticalStrike"] = true
end
dotCfg.skillCond["CriticalStrike"] = sub_pass ~= 1

local totalMin, totalMax = 0, 0
do
local min, max = calcAilmentSourceDamage(activeSkill, output, dotCfg, sub_pass == 1 and breakdown and breakdown.PoisonChaos, "Chaos", 0)
Expand Down Expand Up @@ -4457,11 +4457,8 @@ function calcs.offence(env, actor, activeSkill)
end

for sub_pass = 1, 2 do
if skillModList:Flag(dotCfg, "AilmentsAreNeverFromCrit") or sub_pass == 1 then
dotCfg.skillCond["CriticalStrike"] = false
else
dotCfg.skillCond["CriticalStrike"] = true
end
dotCfg.skillCond["CriticalStrike"] = sub_pass ~= 1

local totalMin, totalMax = 0, 0
if canDeal.Physical and skillModList:Flag(cfg, "PhysicalCanIgnite") then
local min, max = calcAilmentSourceDamage(activeSkill, output, dotCfg, sub_pass == 1 and breakdown and breakdown.IgnitePhysical, "Physical", dmgTypeFlags.Fire)
Expand Down
Loading