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 broken tests after changing default boss preset #8327

Open
wants to merge 1 commit 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
11 changes: 9 additions & 2 deletions spec/System/TestDefence_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ describe("TestDefence", function()

-- boring part
it("no armour max hits", function()
build.configTab.input.enemyIsBoss = "None"
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(60, build.calcsTab.calcsOutput.PhysicalMaximumHitTaken)
assert.are.equals(38, build.calcsTab.calcsOutput.FireMaximumHitTaken)
assert.are.equals(38, build.calcsTab.calcsOutput.ColdMaximumHitTaken)
Expand All @@ -19,6 +23,7 @@ describe("TestDefence", function()
+200 to all resistances\n\z
200% additional Physical Damage Reduction\n\z
"

build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(600, build.calcsTab.calcsOutput.PhysicalMaximumHitTaken)
Expand Down Expand Up @@ -168,6 +173,7 @@ describe("TestDefence", function()
When Hit during effect, 50% of Life loss from Damage taken occurs over 4 seconds instead\n\z
" -- 50% progenesis should just simply double the life pool
build.configTab.input.conditionUsingFlask = true
build.configTab.input.enemyIsBoss = "None"
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(600, build.calcsTab.calcsOutput.PhysicalMaximumHitTaken)
Expand All @@ -186,7 +192,6 @@ describe("TestDefence", function()
100% less intelligence\n\z
+60 to maximum energy shield\n\z
" -- progenesis should not interact with pools other than life.
build.configTab.input.conditionUsingFlask = true
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(900, build.calcsTab.calcsOutput.PhysicalMaximumHitTaken)
Expand Down Expand Up @@ -257,7 +262,6 @@ describe("TestDefence", function()
100% less intelligence\n\z
+60 to maximum energy shield\n\z
" -- wonkier numbers to test the pool reduction function
build.configTab.input.conditionUsingFlask = true
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(1300, build.calcsTab.calcsOutput.PhysicalMaximumHitTaken)
Expand Down Expand Up @@ -323,6 +327,7 @@ describe("TestDefence", function()
+940 to maximum life\n\z
+10000 to armour\n\z
" -- hit of 2000 on 10000 armour results in 50% DR which reduces the damage to 1000 - total HP
build.configTab.input.enemyIsBoss = "None"
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(1000, takenHitFromTypeMaxHit("Physical"))
Expand Down Expand Up @@ -603,6 +608,7 @@ describe("TestDefence", function()
end)

it("energy shield bypass tests #pet", function()
build.configTab.input.enemyIsBoss = "None"
-- Mastery
build.configTab.input.customMods = [[
+40 to maximum life
Expand All @@ -611,6 +617,7 @@ describe("TestDefence", function()
You have no intelligence
+60% to all resistances
]]

build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(300, build.calcsTab.calcsOutput.FireMaximumHitTaken)
Expand Down
11 changes: 10 additions & 1 deletion spec/System/TestSkills_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,17 @@ describe("TestAttacks", function()
srcInstance.skillStageCount = 8
build.modFlag = true
build.buildFlag = true
build.configTab.input.enemyIsBoss = "None"
build.configTab:BuildModList()
runCallback("OnFrame")

-- Manual stages
assert.True(build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "FireResist") < 0)

srcInstance.skillPart = 2
build.modFlag = true
build.buildFlag = true
runCallback("OnFrame")
-- Automatic maximum sustainable stages
assert.True(build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "FireResist") < 0)
end)

Expand Down
Loading