Skip to content
Merged
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
58 changes: 31 additions & 27 deletions spec/System/TestDefence_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -458,37 +458,41 @@ describe("TestDefence", function()
assert.are.equals(1250, build.calcsTab.calcsOutput.ChaosMaximumHitTaken)
end)

it("energy shield increased by spell block chance if corresponding flag is present", function()
build.configTab.input.enemyIsBoss = "None"
build.configTab.input.customMods = "\z
You have no intelligence\n\z
100 Energy shield \n\z
energy shield is increased by chance to block spell damage\n\z
50% chance to block spell damage\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
describe("Energy shield increased by spell block chance", function()

assert.are.equals(0, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
assert.are.equals(50, build.calcsTab.calcsOutput.SpellBlockChance)
assert.are.equals(150, build.calcsTab.calcsOutput.EnergyShield)
end)
it("energy shield increased by spell block chance if corresponding 'maximum es' flag is present", function()
build.configTab.input.enemyIsBoss = "None"
build.configTab.input.customMods = "\z
You have no intelligence\n\z
100 Energy shield \n\z
maximum energy shield is increased by chance to block spell damage\n\z
50% chance to block spell damage\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")

it("energy shield increased by spell block chance if corresponding flag is present should be capped to max block", function()
build.configTab.input.enemyIsBoss = "None"
assert.are.equals(0, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
assert.are.equals(50, build.calcsTab.calcsOutput.SpellBlockChance)
assert.are.equals(150, build.calcsTab.calcsOutput.EnergyShield)
end)

build.configTab.input.customMods = "\z
You have no intelligence\n\z
100 Energy shield \n\z
energy shield is increased by chance to block spell damage\n\z
100% chance to block spell damage\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
it("energy shield increased by spell block chance if corresponding 'maximum es' flag is present should be capped to max block", function()
build.configTab.input.enemyIsBoss = "None"

build.configTab.input.customMods = "\z
You have no intelligence\n\z
100 Energy shield \n\z
maximum energy shield is increased by chance to block spell damage\n\z
100% chance to block spell damage\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(25, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
assert.are.equals(75, build.calcsTab.calcsOutput.SpellBlockChance)
assert.are.equals(175, build.calcsTab.calcsOutput.EnergyShield)
end)

assert.are.equals(25, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
assert.are.equals(75, build.calcsTab.calcsOutput.SpellBlockChance)
assert.are.equals(175, build.calcsTab.calcsOutput.EnergyShield)
end)

local function withinTenPercent(value, otherValue)
Expand Down
2 changes: 1 addition & 1 deletion src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9050,7 +9050,7 @@ c["Maximum Damage Reduction for any Damage Type is 50%"]={{[1]={flags=0,keywordF
c["Maximum Effect of Shock is 2% increased Damage taken"]={{[1]={flags=0,keywordFlags=0,name="ShockMax",type="OVERRIDE",value=2}},nil}
c["Maximum Endurance, Frenzy and Power Charges is 0"]={{[1]={flags=0,keywordFlags=0,name="EnduranceChargesMax",type="OVERRIDE",value=0},[2]={flags=0,keywordFlags=0,name="PowerChargesMax",type="OVERRIDE",value=0},[3]={flags=0,keywordFlags=0,name="FrenzyChargesMax",type="OVERRIDE",value=0}},nil}
c["Maximum Energy Shield is 0"]={{[1]={flags=0,keywordFlags=0,name="EnergyShield",type="OVERRIDE",value=0}},nil}
c["Maximum Energy Shield is increased by Chance to Block Spell Damage"]={nil,"Maximum Energy Shield is increased by Chance to Block Spell Damage "}
c["Maximum Energy Shield is increased by Chance to Block Spell Damage"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldIncreasedByChanceToBlockSpellDamage",type="FLAG",value=true}},nil}
c["Maximum Life becomes 1, Immune to Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="ChaosInoculation",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ChaosDamageTaken",type="MORE",value=-100}},nil}
c["Maximum Quality is 200%"]={{},"Maximum Quality "}
c["Maximum Quality is 200% Corrupted"]={{},"Maximum Quality Corrupted "}
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4281,7 +4281,7 @@ local specialModList = {
mod("EnemyModifier", "LIST", { mod = mod("ColdResist", "INC", num) }),
} end,
["nearby enemies are blinded while physical aegis is not depleted"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:Blinded") }, { type = "Condition", var = "PhysicalAegisDepleted", neg = true }) },
["energy shield is increased by chance to block spell damage"] = { flag("EnergyShieldIncreasedByChanceToBlockSpellDamage") },
Comment thread
Wires77 marked this conversation as resolved.
["maximum energy shield is increased by chance to block spell damage"] = { flag("EnergyShieldIncreasedByChanceToBlockSpellDamage") },
["armour is increased by uncapped fire resistance"] = { flag( "ArmourIncreasedByUncappedFireRes") },
["armour is increased by overcapped fire resistance"] = { flag( "ArmourIncreasedByOvercappedFireRes") },
["minion life is increased by t?h?e?i?r? ?overcapped fire resistance"] = { mod("MinionModifier", "LIST", { mod = mod("Life", "INC", 1, { type = "PerStat", stat = "FireResistOverCap", div = 1 }) }) },
Expand Down