Skip to content

Commit

Permalink
Fix numerous issues in bleed calculations (#7771)
Browse files Browse the repository at this point in the history
* Fix numerous issues in bleed calculations

- Chance to bleed was applied in the incorrect location
- Chance to hit was applied incorrectly
- Bleed stacks and stack potential was overwritten with incorrect values at times
- Crimson Dance calculations were broken
- Bleed stack potential was incorrectly applied to per-stack bleed damage
- Multiple damage formulas were used simultaneously
- Output from multiple formulas did not align with numbers displayed to user

* Add test for bleed fix

* Fix ailment test

* fix bleed not reflecting different chances on crits

* Apply ailment chance and stack fixes to ignite and poison

* Fix Bleed/Ignite chance breakdown

* Apply instant ability ailment fix

-fixes nan / divide by 0 for hit like corpse explosion

* Move poison stacks affect into calcs tab

* Integrate new formula for average roll

---------

Co-authored-by: Wires77 <[email protected]>
Co-authored-by: LocalIdentity <[email protected]>
  • Loading branch information
3 people authored Jul 29, 2024
1 parent 46305c3 commit 4b8ede6
Show file tree
Hide file tree
Showing 4 changed files with 242 additions and 182 deletions.
20 changes: 20 additions & 0 deletions spec/System/TestAilments_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,24 @@ describe("TestAilments", function()
runCallback("OnFrame")
assert.are.equals(round(50 + 10 + 40), build.calcsTab.mainOutput.MaximumShock)
end)

it("bleed is buffed by bleed chance", function()
build.itemsTab:CreateDisplayItemFromRaw("New Item\nKarui Chopper")
build.itemsTab:AddDisplayItem()
build.skillsTab:PasteSocketGroup("Slot: Weapon 1\nHeavy Strike 1/0 Default 1\n")
build.configTab.input.customMods = "\z
attacks have 10% chance to cause bleeding\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
local badDps = build.calcsTab.mainOutput.BleedDPS

build.configTab.input.customMods = "\z
attacks have 100% chance to cause bleeding\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
local goodDps = build.calcsTab.mainOutput.BleedDPS
assert.True(goodDps > badDps)
end)
end)
Loading

0 comments on commit 4b8ede6

Please sign in to comment.