Fix misc calculations based on spell suppression when evasion mastery is active#9405
Open
danielztolnai wants to merge 2 commits intoPathOfBuildingCommunity:devfrom
Conversation
…culations A few conditionals in the misc calculation use these, for example the ailment calculation via spell suppression via the evasion mastery that grants suppression based on evasion on items.
Author
|
I fixed the spell checker typo, please run the actions again when you have the time. |
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 #9385 .
Description of the problem being solved:
Spell suppression is used for ailment avoidance calculation in
doActorMisc()whenSpellSuppressionAppliesToAilmentAvoidance. However, spell suppression from the evasion mastery+15% chance to Suppress Spell Damage if Equipped Helmet, Body Armour, Gloves, and Boots all have Evasion Ratingwas only calculated in a later step, at the beginning ofcalcs.defence(). This lead to incorrect results.To fix in the safest way possible, I moved the execution of as minimal code as possible as little as possible. I moved code from
calcs.defence()to a separate function that is called right before thedoActorMisc()step.If this is not the correct way to address this, let me know and I will change my implementation.
Steps taken to verify a working solution:
modDBis correct right before the ailment avoidance calculation step, while it wasn't before.Link to a build that showcases this PR:
https://pobb.in/mLdCGe4ojsq-
Before and after screenshots:
You can see that the ailments are wrongly applied before the change, but not applied after.