Only check parry rate once per attack swing #5599
Merged
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.
I affirm:
What does this pull request do?
Was looking into a wildly-lucky string of parrys to see if maybe petrification changes the rate or something
I don't believe it was (I'm not convinced the issue in this PR wasn't somehow double dipping parry rate)... but the chance of this is so crazy (lvl 72 mob and lvl 75 blu):
At any rate, I found that the function
CAttack::IsParried()
was checking the rate each timeIt's only called in a few places, basically:
This PR adjusts the logic to follow the style of the other reaction checks.
CAttack::IsParried()
is only ever called afterCAttack::CheckParried()
, which sets the bool. This means thatCAttack::IsParried()
now reflects if an attack parried, not "let's check our parry rate to see if we should parry"We then replace the first call of
CAttack:IsParried()
with the new function:Other than code cleanliness/consistency, this means that eva skillups will no longer happen on a parried attack. And to those that use the old style parry skillup, this fixes a situation where you could skillup even if you didn't parry.
Steps to test these changes
Fight a mob and see that you can still parry, messages are fine, and you can skillup