Repository navigation
Fix Arcane Cloak using negative unreserved mana (#5411) - #10517
Open
eduardomdalmaso wants to merge 1 commit into
Open
eduardomdalmaso wants to merge 1 commit into
eduardomdalmaso wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5411.
Description of the problem being solved:
When more than 100% of mana is reserved (
ManaUnreserved < 0),ModStoreClass:GetStat("ManaUnreserved")insrc/Classes/ModStore.luawas reverse-engineering a positive mana value larger than maximum mana instead of returning0. This caused skills that scale withManaUnreserved(such as Arcane Cloak) to grant added lightning damage, guard absorb, and mana spent recently even though0unreserved mana is available.Steps taken to verify a working solution:
Arc 20/0+Determination,Pride,Malevolenceresulting inMana: 50,ManaUnreserved: -25, where enablingArcane Cloakerroneously increasedTotalDPSfrom1788.44to1804.30).ModStoreClass:GetStatinsrc/Classes/ModStore.luato return0whenManaUnreserved < 0.spec/System/TestDefence_spec.luaand ran the full test suite viabusted --lua=luajit(746 successes / 0 failures / 0 errors / 0 pending).Link to a build that showcases this PR:
https://poe.ninja/pob/Mi1 (from #5411)
Before screenshot:
N/A (verified via headless
busted --lua=luajit)After screenshot:
N/A (verified via headless
busted --lua=luajit)