Skip to content

Commit

Permalink
Revert "Fix ES on Block Calcs (#3778)"
Browse files Browse the repository at this point in the history
This reverts commit 58abee2.
  • Loading branch information
randomflyingtaco authored and LocalIdentity committed Nov 24, 2021
1 parent 58abee2 commit e31a92b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ function calcs.defence(env, actor)
output.ShowBlockEffect = true
output.DamageTakenOnBlock = 100 - output.BlockEffect
end
output.LifeOnBlock = modDB:Sum("BASE", nil, "LifeOnBlock")
output.ManaOnBlock = modDB:Sum("BASE", nil, "ManaOnBlock")
output.EnergyShieldOnBlock = modDB:Sum("BASE", nil, "EnergyShieldOnBlock")
output.EnergyShieldOnSpellBlock = modDB:Sum("BASE", nil, "EnergyShieldOnSpellBlock")

-- Primary defences: Energy shield, evasion and armour
do
Expand Down Expand Up @@ -700,12 +704,6 @@ function calcs.defence(env, actor)
output.BlindEffectMod = calcLib.mod(enemyDB, nil, "BlindEffect", "BuffEffectOnSelf") * 100
end

-- recovery on block, needs to be after primary defences
output.LifeOnBlock = modDB:Sum("BASE", nil, "LifeOnBlock")
output.ManaOnBlock = modDB:Sum("BASE", nil, "ManaOnBlock")
output.EnergyShieldOnBlock = modDB:Sum("BASE", nil, "EnergyShieldOnBlock")
output.EnergyShieldOnSpellBlock = modDB:Sum("BASE", nil, "EnergyShieldOnSpellBlock")

-- damage avoidances
for _, damageType in ipairs(dmgTypeList) do
output["Avoid"..damageType.."DamageChance"] = m_min(modDB:Sum("BASE", nil, "Avoid"..damageType.."DamageChance"), data.misc.AvoidChanceCap)
Expand Down
2 changes: 0 additions & 2 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2630,10 +2630,8 @@ local specialModList = {
["recover (%d+) life when you block"] = function(num) return { mod("LifeOnBlock", "BASE", num) } end,
["recover (%d+) energy shield when you block spell damage"] = function(num) return { mod("EnergyShieldOnSpellBlock", "BASE", num) } end,
["recover (%d+)%% of life when you block"] = function(num) return { mod("LifeOnBlock", "BASE", 1, { type = "PerStat", stat = "Life", div = 100 / num }) } end,
["recover (%d+)%% of life when you block attack damage while wielding a staff"] = function(num) return { mod("LifeOnBlock", "BASE", 1, { type = "PerStat", stat = "Life", div = 100 / num }, { type = "Condition", var = "UsingStaff" }) } end,
["recover (%d+)%% of your maximum mana when you block"] = function(num) return { mod("ManaOnBlock", "BASE", 1, { type = "PerStat", stat = "Mana", div = 100 / num }) } end,
["recover (%d+)%% of energy shield when you block"] = function(num) return { mod("EnergyShieldOnBlock", "BASE", 1, { type = "PerStat", stat = "EnergyShield", div = 100 / num }) } end,
["recover (%d+)%% of energy shield when you block spell damage while wielding a staff"] = function(num) return { mod("EnergyShieldOnSpellBlock", "BASE", 1, { type = "PerStat", stat = "EnergyShield", div = 100 / num }, { type = "Condition", var = "UsingStaff" }) } end,
["replenishes energy shield by (%d+)%% of armour when you block"] = function(num) return { mod("EnergyShieldOnBlock", "BASE", 1, { type = "PerStat", stat = "Armour", div = 100 / num }) } end,
["cannot leech or regenerate mana"] = { flag("NoManaRegen"), flag("CannotLeechMana") },
["right ring slot: you cannot regenerate mana" ] = { flag("NoManaRegen", { type = "SlotNumber", num = 2 }) },
Expand Down

0 comments on commit e31a92b

Please sign in to comment.