Skip to content

Commit 611cc90

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Arcane Surge effect per Summoned Totem mod not working (#8102)
The calculation for active totems was done far later than the calc for ArcaneSurgeEffect causing it to not apply I believe moving this code should't cause any issues Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 516484c commit 611cc90

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/Modules/CalcPerform.lua

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,12 @@ function calcs.perform(env, skipEHP)
10831083
modDB.multipliers["BrandsAttachedToEnemy"] = m_max(actual, modDB.multipliers["BrandsAttachedToEnemy"] or 0)
10841084
enemyDB.multipliers["BrandsAttached"] = m_max(actual, enemyDB.multipliers["BrandsAttached"] or 0)
10851085
end
1086+
if activeSkill.skillFlags.totem then
1087+
local limit = env.player.mainSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, "ActiveTotemLimit", "ActiveBallistaLimit" )
1088+
output.ActiveTotemLimit = m_max(limit, output.ActiveTotemLimit or 0)
1089+
output.TotemsSummoned = modDB:Override(nil, "TotemsSummoned") or output.ActiveTotemLimit
1090+
enemyDB.multipliers["TotemsSummoned"] = m_max(output.TotemsSummoned or 0, enemyDB.multipliers["TotemsSummoned"] or 0)
1091+
end
10861092
-- The actual hexes as opposed to hex related skills all have the curse flag. TotemCastsWhenNotDetached is to remove blasphemy
10871093
-- Note that this doesn't work for triggers yet, insufficient support
10881094
if activeSkill.skillFlags.hex and activeSkill.skillFlags.curse and not activeSkill.skillTypes[SkillType.TotemCastsWhenNotDetached] and activeSkill.skillModList:Sum("BASE", nil, "MaxDoom") then
@@ -2996,15 +3002,6 @@ function calcs.perform(env, skipEHP)
29963002
doActorCharges(env, env.enemy)
29973003
doActorMisc(env, env.enemy)
29983004

2999-
for _, activeSkill in ipairs(env.player.activeSkillList) do
3000-
if activeSkill.skillFlags.totem then
3001-
local limit = env.player.mainSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, "ActiveTotemLimit", "ActiveBallistaLimit" )
3002-
output.ActiveTotemLimit = m_max(limit, output.ActiveTotemLimit or 0)
3003-
output.TotemsSummoned = modDB:Override(nil, "TotemsSummoned") or output.ActiveTotemLimit
3004-
enemyDB.multipliers["TotemsSummoned"] = m_max(output.TotemsSummoned or 0, enemyDB.multipliers["TotemsSummoned"] or 0)
3005-
end
3006-
end
3007-
30083005
local major, minor = env.spec.treeVersion:match("(%d+)_(%d+)")
30093006

30103007
-- Apply exposures

0 commit comments

Comments
 (0)