Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Eldritch Battery interaction with Mind over Matter and Energy Shield bypass #6869

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
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
26 changes: 13 additions & 13 deletions spec/System/TestDefence_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ describe("TestDefence", function()

local _, takenDamages = takenHitFromTypeMaxHit("Fire", 0.8)
local poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, poolsRemaining.EnergyShield)
assert.are.equals(0, poolsRemaining.EnergyShield.remaining)
assert.are.equals(0, poolsRemaining.Life)
assert.are.equals(120, poolsRemaining.LifeLossLostOverTime)
assert.are.equals(20, poolsRemaining.LifeBelowHalfLossLostOverTime)
Expand Down Expand Up @@ -299,20 +299,20 @@ describe("TestDefence", function()
_, takenDamages = takenHitFromTypeMaxHit("Fire")
poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, poolsRemaining.Life)
assert.are.equals(0, poolsRemaining.EnergyShield)
assert.is.not_false(poolsRemaining.Mana > 0)
assert.are.equals(0, poolsRemaining.EnergyShield.remaining)
assert.is.not_false(poolsRemaining.Mana.remaining > 0)

_, takenDamages = takenHitFromTypeMaxHit("Lightning")
poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, poolsRemaining.Life)
assert.are.equals(0, poolsRemaining.EnergyShield)
assert.are.equals(0, poolsRemaining.Mana)
assert.are.equals(0, poolsRemaining.EnergyShield.remaining)
assert.are.equals(0, poolsRemaining.Mana.remaining)

_, takenDamages = takenHitFromTypeMaxHit("Chaos")
poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, poolsRemaining.Life)
assert.are.equals(0, poolsRemaining.EnergyShield)
assert.are.equals(0, poolsRemaining.Mana)
assert.are.equals(0, poolsRemaining.EnergyShield.remaining)
assert.are.equals(0, poolsRemaining.Mana.remaining)

build.skillsTab.socketGroupList = {}
end)
Expand Down Expand Up @@ -517,7 +517,7 @@ describe("TestDefence", function()
runCallback("OnFrame")
local _, takenDamages = takenHitFromTypeMaxHit("Lightning")
local poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, round(poolsRemaining.Mana))
assert.are.equals(0, round(poolsRemaining.Mana.remaining))
assert.are.not_false(poolsRemaining.Life / 100 < 0.1)

build.configTab.input.customMods = "\z
Expand All @@ -534,7 +534,7 @@ describe("TestDefence", function()
_, takenDamages = takenHitFromTypeMaxHit("Lightning")
poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, round(poolsRemaining.Life))
assert.are.equals(0, round(poolsRemaining.Mana))
assert.are.equals(0, round(poolsRemaining.Mana.remaining))

build.configTab.input.customMods = "\z
+40 to maximum life\n\z
Expand All @@ -550,7 +550,7 @@ describe("TestDefence", function()
_, takenDamages = takenHitFromTypeMaxHit("Lightning")
poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, round(poolsRemaining.Life))
assert.are.equals(1000, round(poolsRemaining.Mana))
assert.are.equals(1000, round(poolsRemaining.Mana.remaining))

-- conversion into a bigger pool
build.configTab.input.customMods = "\z
Expand All @@ -566,7 +566,7 @@ describe("TestDefence", function()
runCallback("OnFrame")
_, takenDamages = takenHitFromTypeMaxHit("Cold")
poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, round(poolsRemaining.Mana))
assert.are.equals(0, round(poolsRemaining.Mana.remaining))
assert.are.not_false(poolsRemaining.Life / 100 < 0.1)

build.configTab.input.customMods = "\z
Expand All @@ -583,7 +583,7 @@ describe("TestDefence", function()
_, takenDamages = takenHitFromTypeMaxHit("Cold")
poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, round(poolsRemaining.Life))
assert.are.equals(0, round(poolsRemaining.Mana))
assert.are.equals(0, round(poolsRemaining.Mana.remaining))

build.configTab.input.customMods = "\z
+40 to maximum life\n\z
Expand All @@ -599,6 +599,6 @@ describe("TestDefence", function()
_, takenDamages = takenHitFromTypeMaxHit("Cold")
poolsRemaining = build.calcsTab.calcs.reducePoolsByDamage(nil, takenDamages, build.calcsTab.calcsEnv.player)
assert.are.equals(0, round(poolsRemaining.Life))
assert.are.equals(1000, round(poolsRemaining.Mana))
assert.are.equals(1000, round(poolsRemaining.Mana.remaining))
end)
end)
6 changes: 3 additions & 3 deletions src/Data/Skills/act_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4829,13 +4829,13 @@ skills["FrostGlobe"] = {
div = 60,
},
["frost_globe_absorb_damage_%_enemy_in_bubble"] = {
mod("FrostGlobeDamageMitigation", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "EnemyInFrostGlobe" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
mod("FrostShieldDamageMitigation", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "EnemyInFrostGlobe" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
},
["frost_globe_absorb_damage_%_enemy_outside_bubble"] = {
mod("FrostGlobeDamageMitigation", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "EnemyInFrostGlobe", neg = true }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
mod("FrostShieldDamageMitigation", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "EnemyInFrostGlobe", neg = true }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
},
["frost_globe_health_per_stage"] = {
mod("FrostGlobeHealth", "BASE", nil, 0, 0, { type = "Multiplier", var = "FrostShieldStage", limitVar = "FrostShieldMaxStages" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
mod("FrostShieldLife", "BASE", nil, 0, 0, { type = "Multiplier", var = "FrostShieldStage", limitVar = "FrostShieldMaxStages" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
},
["frost_globe_max_stages"] = {
mod("Multiplier:FrostShieldMaxStages", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }),
Expand Down
6 changes: 3 additions & 3 deletions src/Export/Skills/act_int.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1109,13 +1109,13 @@ local skills, mod, flag, skill = ...
div = 60,
},
["frost_globe_absorb_damage_%_enemy_in_bubble"] = {
mod("FrostGlobeDamageMitigation", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "EnemyInFrostGlobe" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
mod("FrostShieldDamageMitigation", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "EnemyInFrostShield" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
},
["frost_globe_absorb_damage_%_enemy_outside_bubble"] = {
mod("FrostGlobeDamageMitigation", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "EnemyInFrostGlobe", neg = true }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
mod("FrostShieldDamageMitigation", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "EnemyInFrostShield", neg = true }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
},
["frost_globe_health_per_stage"] = {
mod("FrostGlobeHealth", "BASE", nil, 0, 0, { type = "Multiplier", var = "FrostShieldStage", limitVar = "FrostShieldMaxStages" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
mod("FrostShieldLife", "BASE", nil, 0, 0, { type = "Multiplier", var = "FrostShieldStage", limitVar = "FrostShieldMaxStages" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Frost Shield" }),
},
["frost_globe_max_stages"] = {
mod("Multiplier:FrostShieldMaxStages", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }),
Expand Down
Loading