Skip to content

Commit 2416cd4

Browse files
Fix misc calculations based on spell suppression when evasion mastery is active (#9405)
* Move armour defence type calculation for conditionals before misc calculations A few conditionals in the misc calculation use these, for example the ailment calculation via spell suppression via the evasion mastery that grants suppression based on evasion on items. * Fix typo
1 parent 5f2d78a commit 2416cd4

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

src/Modules/CalcDefence.lua

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -471,18 +471,11 @@ local function incomingDamageBreakdown(breakdownTable, poolsRemaining, output)
471471
return breakdownTable
472472
end
473473

474-
-- Performs all ingame and related defensive calculations
475-
function calcs.defence(env, actor)
474+
-- Performs defensive calculations used by conditionals
475+
function calcs.defenceForConditionals(env, actor)
476476
local modDB = actor.modDB
477-
local enemyDB = actor.enemy.modDB
478477
local output = actor.output
479-
local breakdown = actor.breakdown
480-
481-
local condList = modDB.conditions
482478

483-
-- Action Speed
484-
output.ActionSpeedMod = calcs.actionSpeedMod(actor)
485-
486479
-- Armour defence types for conditionals
487480
for _, slot in pairs({"Helmet","Gloves","Boots","Body Armour","Weapon 2","Weapon 3"}) do
488481
local armourData = actor.itemList[slot] and actor.itemList[slot].armourData
@@ -505,6 +498,19 @@ function calcs.defence(env, actor)
505498
end
506499
end
507500
end
501+
end
502+
503+
-- Performs all ingame and related defensive calculations
504+
function calcs.defence(env, actor)
505+
local modDB = actor.modDB
506+
local enemyDB = actor.enemy.modDB
507+
local output = actor.output
508+
local breakdown = actor.breakdown
509+
510+
local condList = modDB.conditions
511+
512+
-- Action Speed
513+
output.ActionSpeedMod = calcs.actionSpeedMod(actor)
508514

509515
-- Resistances
510516
output["PhysicalResist"] = 0

src/Modules/CalcPerform.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,6 +3212,12 @@ function calcs.perform(env, skipEHP)
32123212
modDB:AddList(env.weaponModList1)
32133213
end
32143214

3215+
-- Process prerequisites for conditionals
3216+
calcs.defenceForConditionals(env, env.player)
3217+
if env.minion then
3218+
calcs.defenceForConditionals(env, env.minion)
3219+
end
3220+
32153221
-- Process misc buffs/modifiers
32163222
doActorCharges(env, env.player)
32173223
doActorMisc(env, env.player)

0 commit comments

Comments
 (0)