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 Seething Fury not working with Perfect Agony #7812

Merged
merged 2 commits into from
Jul 22, 2024
Merged
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
30 changes: 18 additions & 12 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -854,18 +854,6 @@ function calcs.offence(env, actor, activeSkill)
end
end
end
if skillModList:Sum("BASE", nil, "CritMultiplierAppliesToDegen") > 0 then
for i, value in ipairs(skillModList:Tabulate("BASE", skillCfg, "CritMultiplier")) do
local mod = value.mod
if mod.source ~= "Base" then -- The global base Crit Multi doesn't apply to ailments with Perfect Agony
skillModList:NewMod("DotMultiplier", "BASE", m_floor(mod.value / 2), mod.source, ModFlag.Ailment, { type = "Condition", var = "CriticalStrike" }, unpack(mod))
end
end
end
if skillModList:Flag(nil, "DotMultiplierIsCritMultiplier") then
-- On enemy crit multiplier effects also apply for Perfect Agony: https://www.pathofexile.com/forum/view-thread/3532389#13
skillModList:NewMod("DotMultiplier", "OVERRIDE", skillModList:Sum("BASE", skillCfg, "CritMultiplier") + enemyDB:Sum("BASE", skillCfg, "SelfCritMultiplier"), "Perfect Agony", ModFlag.Ailment)
end

if skillModList:Flag(nil, "HasSeals") and activeSkill.skillTypes[SkillType.CanRapidFire] and not skillModList:Flag(nil, "NoRepeatBonuses") then
-- Applies DPS multiplier based on seals count
Expand Down Expand Up @@ -3579,6 +3567,24 @@ function calcs.offence(env, actor, activeSkill)
globalOutput, globalBreakdown = output, breakdown
local source, output, cfg, breakdown = pass.source, pass.output, pass.cfg, pass.breakdown

do -- Perfect Agony
local handCondition = pass.label == "Off Hand" and { type = "Condition", var = "OffHandAttack" } or pass.label == "Main Hand" and { type = "Condition", var = "MainHandAttack" }

if skillModList:Sum("BASE", nil, "CritMultiplierAppliesToDegen") > 0 then
for i, value in ipairs(skillModList:Tabulate("BASE", cfg, "CritMultiplier")) do
local mod = value.mod
if mod.source ~= "Base" then -- The global base Crit Multi doesn't apply to ailments with Perfect Agony
skillModList:NewMod("DotMultiplier", "BASE", m_floor(mod.value / 2), mod.source, ModFlag.Ailment, { type = "Condition", var = "CriticalStrike" }, handCondition, unpack(mod))
end
end
end

if skillModList:Flag(nil, "DotMultiplierIsCritMultiplier") then
-- On enemy crit multiplier effects also apply for Perfect Agony: https://www.pathofexile.com/forum/view-thread/3532389#13
skillModList:NewMod("DotMultiplier", "OVERRIDE", skillModList:Sum("BASE", cfg, "CritMultiplier") + enemyDB:Sum("BASE", cfg, "SelfCritMultiplier"), "Perfect Agony", ModFlag.Ailment, handCondition)
end
end

-- Calculate chance to inflict secondary dots/status effects
cfg.skillCond["CriticalStrike"] = true
if not skillFlags.attack or skillModList:Flag(cfg, "CannotBleed") then
Expand Down
Loading