Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
14 changes: 14 additions & 0 deletions spec/System/TestImpale_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ describe("TestAttacks", function()
assert.are.equals(150*1.3, build.calcsTab.mainOutput.ImpaleDPS) -- 5 impales * 10% stored damage * 1.3 attacks per second
end)

it("impale with zero duration has zero dps", function()
build.configTab.input.customMods = "\z
never deal critical strikes\n\z
Impale Damage dealt to Enemies Impaled by you Overwhelms 100% Physical Damage Reduction\n\z
Overwhelm 100% physical damage reduction\n\z
100% less Impale Duration\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(0, build.calcsTab.mainOutput.ImpaleDuration)
assert.are.equals(0, build.calcsTab.mainOutput.ImpaleDPS)
end)

it("impale with inc damage taken", function()
-- 0% crit
build.configTab.input.customMods = "\z
Expand Down
6 changes: 6 additions & 0 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5874,6 +5874,9 @@ function calcs.offence(env, actor, activeSkill)
else
output.ImpaleDPS = output.impaleStoredHitAvg * ((output.ImpaleModifier or 1) - 1) * output.HitChance / 100 * skillData.dpsMultiplier
end
if output.ImpaleDuration <= 0 then
output.ImpaleDPS = 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some spaces here where there should be a tab.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed the indentation.

end
if skillData.showAverage then
output.WithImpaleDPS = output.AverageDamage + output.ImpaleDPS
output.CombinedAvg = output.CombinedAvg + output.ImpaleDPS
Expand Down Expand Up @@ -5915,6 +5918,9 @@ function calcs.offence(env, actor, activeSkill)
if quantityMultiplier > 1 then
t_insert(breakdown.ImpaleDPS, s_format("x %g ^8(quantity multiplier for this skill)", quantityMultiplier))
end
if output.ImpaleDuration <= 0 then
t_insert(breakdown.ImpaleDPS, s_format("x 0 ^8(no Impale Duration)"))
end
t_insert(breakdown.ImpaleDPS, s_format("= %.1f", output.ImpaleDPS))
end
end
Expand Down