Skip to content

Commit aa3c954

Browse files
authored
Fix Beidat's Hand Energy Shield per Max Life mod not working (#1113)
* FIX: Beidat's Hand order of calcs issue The PerStat mod from the Beidat's Hand Infernalist ascendancy notable did not work due to Life amount not being present in the output at the time of calculation of globalBase EnergyShield. This pr attempts to fix this by running the doActorLifeManaSpirit before calculating the primary defences and then again after to account for potential conversion mods. This should work correctly as any values written by doActorLifeManaSpirit should be overwritten by the second call. I'm currently unsure whether there are edge cases that could cause issues with this proposed solution. Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FIX: skip breakdown on first call to doActorLifeManaSpirit --------- Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
1 parent b392f69 commit aa3c954

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Modules/CalcDefence.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ end
5353

5454
-- Calculate life/mana/spirit pools
5555
---@param actor table
56-
function calcs.doActorLifeManaSpirit(actor)
56+
function calcs.doActorLifeManaSpirit(actor, skipBreakdown)
5757
local modDB = actor.modDB
5858
local output = actor.output
59-
local breakdown = actor.breakdown
59+
local breakdown = (not skipBreakdown) and actor.breakdown
6060
local condList = modDB.conditions
6161

6262
local lowLifePerc = modDB:Sum("BASE", nil, "LowLifePercentage")
@@ -1065,6 +1065,8 @@ function calcs.defence(env, actor)
10651065
end
10661066
-- Primary defences: Energy shield, evasion and armour
10671067
do
1068+
-- Pre-calculate Life/Mana/Spirit for mods such as Beidat's hand
1069+
calcs.doActorLifeManaSpirit(actor, true)
10681070
local ward = 0
10691071
local energyShield = 0
10701072
local armour = 0

0 commit comments

Comments
 (0)