Skip to content
Open
Show file tree
Hide file tree
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
24 changes: 15 additions & 9 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -471,18 +471,11 @@ local function incomingDamageBreakdown(breakdownTable, poolsRemaining, output)
return breakdownTable
end

-- Performs all ingame and related defensive calculations
function calcs.defence(env, actor)
-- Performs defensive calculations used by conditionals
function calcs.defenceForConditionals(env, actor)
local modDB = actor.modDB
local enemyDB = actor.enemy.modDB
local output = actor.output
local breakdown = actor.breakdown

local condList = modDB.conditions

-- Action Speed
output.ActionSpeedMod = calcs.actionSpeedMod(actor)

-- Armour defence types for conditionals
for _, slot in pairs({"Helmet","Gloves","Boots","Body Armour","Weapon 2","Weapon 3"}) do
local armourData = actor.itemList[slot] and actor.itemList[slot].armourData
Expand All @@ -505,6 +498,19 @@ function calcs.defence(env, actor)
end
end
end
end

-- Performs all ingame and related defensive calculations
function calcs.defence(env, actor)
local modDB = actor.modDB
local enemyDB = actor.enemy.modDB
local output = actor.output
local breakdown = actor.breakdown

local condList = modDB.conditions

-- Action Speed
output.ActionSpeedMod = calcs.actionSpeedMod(actor)

-- Resistances
output["PhysicalResist"] = 0
Expand Down
6 changes: 6 additions & 0 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3216,6 +3216,12 @@ function calcs.perform(env, skipEHP)
modDB:AddList(env.weaponModList1)
end

-- Process prerequisites for conditionals
calcs.defenceForConditionals(env, env.player)
if env.minion then
calcs.defenceForConditionals(env, env.minion)
end

-- Process misc buffs/modifiers
doActorCharges(env, env.player)
doActorMisc(env, env.player)
Expand Down