From 45398e612423521ead380ad87e0a3f0e92b85846 Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Sun, 28 Dec 2025 20:01:27 -0800 Subject: [PATCH 1/3] Update CalcDefence.lua --- src/Modules/CalcDefence.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Modules/CalcDefence.lua b/src/Modules/CalcDefence.lua index 2d73f80dd..24e93920f 100644 --- a/src/Modules/CalcDefence.lua +++ b/src/Modules/CalcDefence.lua @@ -750,6 +750,11 @@ function calcs.defence(env, actor) local condList = modDB.conditions + -- Pre-calculate Life/Mana/Spirit and reservations to set conditions (like LowLife) before defences are calculated + -- This ensures modifiers that depend on conditions (e.g., "when on Low Life") work correctly + calcs.doActorLifeManaSpirit(actor, true) + calcs.doActorLifeManaSpiritReservation(actor) + -- Action Speed output.ActionSpeedMod = calcs.actionSpeedMod(actor) @@ -1111,8 +1116,7 @@ function calcs.defence(env, actor) end -- Primary defences: Energy shield, evasion and armour do - -- Pre-calculate Life/Mana/Spirit for mods such as Beidat's hand - calcs.doActorLifeManaSpirit(actor, true) + -- Life/Mana/Spirit already calculated above for conditions local ward = 0 local energyShield = 0 local armour = 0 From 503a03aa00ef9a73643738fc721651a9b297145e Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Thu, 15 Jan 2026 14:56:33 -0800 Subject: [PATCH 2/3] Update CalcDefence.lua CalcDefences --- src/Modules/CalcDefence.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Modules/CalcDefence.lua b/src/Modules/CalcDefence.lua index 24e93920f..a9f9501b4 100644 --- a/src/Modules/CalcDefence.lua +++ b/src/Modules/CalcDefence.lua @@ -951,9 +951,9 @@ function calcs.defence(env, actor) breakdown.Mana = { slots = { } } breakdown.Spirit = { slots = { } } end - if actor == env.minion then - calcs.doActorLifeManaSpirit(env.minion) - calcs.doActorLifeManaSpiritReservation(env.minion) + if actor == env.minion or actor == env.player then + calcs.doActorLifeManaSpirit(actor) + calcs.doActorLifeManaSpiritReservation(actor) end -- Block From b91c3ba9da3de213cb4771d6b9104c88d07a74b4 Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Thu, 15 Jan 2026 15:00:10 -0800 Subject: [PATCH 3/3] Revert "Update CalcDefence.lua" This reverts commit 45398e612423521ead380ad87e0a3f0e92b85846. --- src/Modules/CalcDefence.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Modules/CalcDefence.lua b/src/Modules/CalcDefence.lua index a9f9501b4..2e7cef515 100644 --- a/src/Modules/CalcDefence.lua +++ b/src/Modules/CalcDefence.lua @@ -750,11 +750,6 @@ function calcs.defence(env, actor) local condList = modDB.conditions - -- Pre-calculate Life/Mana/Spirit and reservations to set conditions (like LowLife) before defences are calculated - -- This ensures modifiers that depend on conditions (e.g., "when on Low Life") work correctly - calcs.doActorLifeManaSpirit(actor, true) - calcs.doActorLifeManaSpiritReservation(actor) - -- Action Speed output.ActionSpeedMod = calcs.actionSpeedMod(actor) @@ -1116,7 +1111,8 @@ function calcs.defence(env, actor) end -- Primary defences: Energy shield, evasion and armour do - -- Life/Mana/Spirit already calculated above for conditions + -- Pre-calculate Life/Mana/Spirit for mods such as Beidat's hand + calcs.doActorLifeManaSpirit(actor, true) local ward = 0 local energyShield = 0 local armour = 0