Skip to content

Commit 91c1b58

Browse files
authored
Add mod parsing support for 3.26 Vile Bastion (#8643)
* Refresh mod cache at current HEAD * Add mod parsing and defence calc support for 3.26 Vile Bastion es inc by spell block * Used mod source in defence calc to fix breakdown sourcing logic on hover * Fix some whitespace errors * align es inc by spellblock mod placement and wording to similar mods
1 parent c57fd8d commit 91c1b58

4 files changed

Lines changed: 42 additions & 175 deletions

File tree

spec/System/TestDefence_spec.lua

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,40 @@ describe("TestDefence", function()
457457
assert.are.equals(1000, takenHitFromTypeMaxHit("Lightning"))
458458
assert.are.equals(1250, build.calcsTab.calcsOutput.ChaosMaximumHitTaken)
459459
end)
460-
460+
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")
471+
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)
476+
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"
479+
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")
488+
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)
492+
end)
493+
461494
local function withinTenPercent(value, otherValue)
462495
local ratio = otherValue / value
463496
return 0.9 < ratio and ratio < 1.1

0 commit comments

Comments
 (0)