Skip to content

Commit e8c1691

Browse files
AriacellWires77
andauthored
Improve flexibility in Vile Bastion keystone parsing for 3.26 (#8650)
* increase flexibility in parsing for ESIncBySpellBlock on 3.26 Vile Bastion * Update wording to not need the optional bit * Update tests --------- Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
1 parent 4405220 commit e8c1691

3 files changed

Lines changed: 33 additions & 29 deletions

File tree

spec/System/TestDefence_spec.lua

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -458,37 +458,41 @@ describe("TestDefence", function()
458458
assert.are.equals(1250, build.calcsTab.calcsOutput.ChaosMaximumHitTaken)
459459
end)
460460

461-
it("energy shield increased by spell block chance if corresponding flag is present", function()
462-
build.configTab.input.enemyIsBoss = "None"
463-
build.configTab.input.customMods = "\z
464-
You have no intelligence\n\z
465-
100 Energy shield \n\z
466-
energy shield is increased by chance to block spell damage\n\z
467-
50% chance to block spell damage\n\z
468-
"
469-
build.configTab:BuildModList()
470-
runCallback("OnFrame")
461+
describe("Energy shield increased by spell block chance", function()
471462

472-
assert.are.equals(0, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
473-
assert.are.equals(50, build.calcsTab.calcsOutput.SpellBlockChance)
474-
assert.are.equals(150, build.calcsTab.calcsOutput.EnergyShield)
475-
end)
463+
it("energy shield increased by spell block chance if corresponding 'maximum es' flag is present", function()
464+
build.configTab.input.enemyIsBoss = "None"
465+
build.configTab.input.customMods = "\z
466+
You have no intelligence\n\z
467+
100 Energy shield \n\z
468+
maximum energy shield is increased by chance to block spell damage\n\z
469+
50% chance to block spell damage\n\z
470+
"
471+
build.configTab:BuildModList()
472+
runCallback("OnFrame")
476473

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

480-
build.configTab.input.customMods = "\z
481-
You have no intelligence\n\z
482-
100 Energy shield \n\z
483-
energy shield is increased by chance to block spell damage\n\z
484-
100% chance to block spell damage\n\z
485-
"
486-
build.configTab:BuildModList()
487-
runCallback("OnFrame")
479+
it("energy shield increased by spell block chance if corresponding 'maximum es' flag is present should be capped to max block", function()
480+
build.configTab.input.enemyIsBoss = "None"
481+
482+
build.configTab.input.customMods = "\z
483+
You have no intelligence\n\z
484+
100 Energy shield \n\z
485+
maximum energy shield is increased by chance to block spell damage\n\z
486+
100% chance to block spell damage\n\z
487+
"
488+
build.configTab:BuildModList()
489+
runCallback("OnFrame")
490+
491+
assert.are.equals(25, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
492+
assert.are.equals(75, build.calcsTab.calcsOutput.SpellBlockChance)
493+
assert.are.equals(175, build.calcsTab.calcsOutput.EnergyShield)
494+
end)
488495

489-
assert.are.equals(25, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
490-
assert.are.equals(75, build.calcsTab.calcsOutput.SpellBlockChance)
491-
assert.are.equals(175, build.calcsTab.calcsOutput.EnergyShield)
492496
end)
493497

494498
local function withinTenPercent(value, otherValue)

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9050,7 +9050,7 @@ c["Maximum Damage Reduction for any Damage Type is 50%"]={{[1]={flags=0,keywordF
90509050
c["Maximum Effect of Shock is 2% increased Damage taken"]={{[1]={flags=0,keywordFlags=0,name="ShockMax",type="OVERRIDE",value=2}},nil}
90519051
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}
90529052
c["Maximum Energy Shield is 0"]={{[1]={flags=0,keywordFlags=0,name="EnergyShield",type="OVERRIDE",value=0}},nil}
9053-
c["Maximum Energy Shield is increased by Chance to Block Spell Damage"]={nil,"Maximum Energy Shield is increased by Chance to Block Spell Damage "}
9053+
c["Maximum Energy Shield is increased by Chance to Block Spell Damage"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldIncreasedByChanceToBlockSpellDamage",type="FLAG",value=true}},nil}
90549054
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}
90559055
c["Maximum Quality is 200%"]={{},"Maximum Quality "}
90569056
c["Maximum Quality is 200% Corrupted"]={{},"Maximum Quality Corrupted "}

src/Modules/ModParser.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4281,7 +4281,7 @@ local specialModList = {
42814281
mod("EnemyModifier", "LIST", { mod = mod("ColdResist", "INC", num) }),
42824282
} end,
42834283
["nearby enemies are blinded while physical aegis is not depleted"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:Blinded") }, { type = "Condition", var = "PhysicalAegisDepleted", neg = true }) },
4284-
["energy shield is increased by chance to block spell damage"] = { flag("EnergyShieldIncreasedByChanceToBlockSpellDamage") },
4284+
["maximum energy shield is increased by chance to block spell damage"] = { flag("EnergyShieldIncreasedByChanceToBlockSpellDamage") },
42854285
["armour is increased by uncapped fire resistance"] = { flag( "ArmourIncreasedByUncappedFireRes") },
42864286
["armour is increased by overcapped fire resistance"] = { flag( "ArmourIncreasedByOvercappedFireRes") },
42874287
["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 }) }) },

0 commit comments

Comments
 (0)