Skip to content

Commit 0475a3c

Browse files
committed
Fix some whitespace errors
1 parent ff262c0 commit 0475a3c

1 file changed

Lines changed: 34 additions & 1 deletion

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+
maximum 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+
maximum 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)