From e75a632a390e3ea5c311d2290dc8e22620541399 Mon Sep 17 00:00:00 2001 From: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com> Date: Wed, 13 Dec 2023 07:34:56 +1100 Subject: [PATCH] Fix ES from Tricksters Escape Artist when using Oath of the Maji (#7018) The calculation for Escape Artist use the final doubled value after Maji has affected the armour Co-authored-by: LocalIdentity --- src/Modules/CalcDefence.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Modules/CalcDefence.lua b/src/Modules/CalcDefence.lua index 241372e3b8..e74d17fe29 100644 --- a/src/Modules/CalcDefence.lua +++ b/src/Modules/CalcDefence.lua @@ -275,18 +275,30 @@ function calcs.defence(env, actor) if armourData then wardBase = armourData.Ward or 0 if wardBase > 0 then + if slot == "Body Armour" and modDB:Flag(nil, "DoubleBodyArmourDefence") then + wardBase = wardBase * 2 + end output["WardOn"..slot] = wardBase end energyShieldBase = armourData.EnergyShield or 0 if energyShieldBase > 0 then + if slot == "Body Armour" and modDB:Flag(nil, "DoubleBodyArmourDefence") then + energyShieldBase = energyShieldBase * 2 + end output["EnergyShieldOn"..slot] = energyShieldBase end armourBase = armourData.Armour or 0 if armourBase > 0 then + if slot == "Body Armour" and (modDB:Flag(nil, "Unbreakable") or modDB:Flag(nil, "DoubleBodyArmourDefence")) then + armourBase = armourBase * 2 + end output["ArmourOn"..slot] = armourBase end evasionBase = armourData.Evasion or 0 if evasionBase > 0 then + if slot == "Body Armour" and ((modDB:Flag(nil, "Unbreakable") and modDB:Flag(nil, "IronReflexes")) or modDB:Flag(nil, "DoubleBodyArmourDefence")) then + evasionBase = evasionBase * 2 + end output["EvasionOn"..slot] = evasionBase end end