Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only check parry rate once per attack swing #5599

Merged
merged 1 commit into from
May 4, 2024

Conversation

MowFord
Copy link
Contributor

@MowFord MowFord commented May 3, 2024

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

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):
image

At any rate, I found that the function CAttack::IsParried() was checking the rate each time

It's only called in a few places, basically:

  • attack checks if it should be parried after not being evaded
  • later checked if it's parried to try to skillup
  • then checked if it wasn't parried to try an eva skillup

This PR adjusts the logic to follow the style of the other reaction checks. CAttack::IsParried() is only ever called after CAttack::CheckParried(), which sets the bool. This means that CAttack::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:
image

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

image

@claywar claywar merged commit 84ed3e2 into LandSandBoat:base May 4, 2024
12 checks passed
@CatsEyeXI CatsEyeXI deleted the parry_rate branch May 13, 2024 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants