Skip to content

Fix impale DPS with zero duration#9862

Merged
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
KenManDev:fix-zero-impale-duration-dps
Jul 23, 2026
Merged

Fix impale DPS with zero duration#9862
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
KenManDev:fix-zero-impale-duration-dps

Conversation

@KenManDev

Copy link
Copy Markdown
Contributor

Adds tests for zero impale duration and prevents ImpaleDPS from contributing when ImpaleDuration is 0.

Fixes #9499 .

Description of the problem being solved:

Impale DPS was still being calculated and displayed when Impale Duration was 0.

Steps taken to verify a working solution:

  • Added a test for zero Impale Duration.
  • Ran busted --lua=luajit
    • Result: 225 successes / 0 failures / 0 errors / 0 pending
  • Imported the build from Impale is being calculated with 0 impale duration #9499 and verified the behavior before and after the change.
  • Confirmed Impale Duration = 0s and Impale DPS = 0 after the fix.

Link to a build that showcases this PR:

https://pobb.in/zjvK1N9gCoT8

Before screenshot:

image image image

After screenshot:

image image image

KenManDev added 2 commits May 19, 2026 13:23
Adds a regression test for zero impale duration and prevents ImpaleDPS from contributing when ImpaleDuration is 0.
Added explanation in breakdown for easier user understanding
Comment thread src/Modules/CalcOffence.lua Outdated
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
Contributor 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.

Fix indentation on line 5878
@LocalIdentity LocalIdentity added the bug: calculation Numerical differences label Jul 23, 2026
@LocalIdentity
LocalIdentity merged commit 9a62cb9 into PathOfBuildingCommunity:dev Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: calculation Numerical differences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impale is being calculated with 0 impale duration

3 participants