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

Implement follow-up attacks and update virtue stone weapons to use follow-up attacks #6560

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

Dukilles
Copy link
Contributor

@Dukilles Dukilles commented Dec 19, 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?

Based on retail research, makes some adjustments to attackround and implements follow-up attacks. Update virtue stone weapons to use follow-up attacks.

H2H attack round

  • Using Cichol's Mantle, we were able to prove that each fist is rolled one after the other, with double/triple attacks following, but only the animation is changed to make the second swing a right hand.
  • Video
  • Left/Right/Left (DOUBLE, DOUBLE, NORMAL)
    • Screenshot proved too difficult to get here, but at ~43 seconds in you see 213, 214, 180
  • Left/Right/Left (NORMAL, DOUBLE, DOUBLE)
    • image
  • Left/Right/Left/Left (DOUBLE, DOUBLE, DOUBLE, DOUBLE)
    • image
  • My solution to this is to CreateAttacks with the left hand twice, and force the animation of the second swing to RIGHTATTACK in AddAttackSwings
  • I must admit that one out of every ~100 attack rounds will do something I can't explain like 4 consecutive right hands. I don't have an answer for that outlier.
  • Mob's H2H direction on retail seems to be random, but for this PR they will follow players as they did before.

Iga mod

  • Iga mod adds to double attack rate for the offhand attack.
  • If I need to remove this as out of scope, I certainly understand. Using !isMainHand while keeping the mod check where it was would admittedly be more in scope for this PR.

Follow-up attacks

  • Virtue Stones create follow-up attacks. Per retail testing, this bg page seems to be the most accurate.
  • After the standard attack round is created, ProcFollowUpAttacks will iterate through the swings and check for eligibility to store a follow-up swing. If a swing is eligible to proc a follow-up and does so successfully, it will be stored in order. Once all of the attack swings have been checked, follow-up attacks will be appended to the attack round in the order that they triggered.
  • Normal, Double, Triple, Quad, and Samba type attacks are all eligible to proc virtue stone follow-ups. I am unsure about the others but added a method of type checking.
  • Virtue Stones will be consumed as soon as they proc and are stored, even if the swing doesnt fire. (such as mob dying early in the attack round)
  • I tried to do this in a way that would create some scaffolding for Dynamis [D] and Raetic weapons to be added in the future as follow-up attacks.

Steps to test these changes

Faith Baghnakhs - H2H

  • !additem 5410 99 -- Virtue Stone Pouch
  • !additem 18360 -- Faith Baghnakhs
  • standard h2h attack is two normal swings: Left/Right
  • each fist will roll da/ta/qa and be added as single swings.
  • Kicks proc next
  • Each hand can use a stone and proc an additional follow-up attack.

Example Key

  • X = standard, first two swings of the H2H attack round (can proc da/ta)
  • l = additional swings from double/triple attack
  • K = kick attack
  • L = Follow-up Left
  • R = Follow-up Right

Attack Order

  • The structure looks like this: X l K L R ( L R can be R L, it depends on the order it was triggered)

Examples

No stones

  • X (No procs)
  • Xl (One fist double)
  • Xll (One fist triple OR both fists double)
  • Xlll (One fist double, one fist triple)
  • Xllll (both fists triple)

After this, kick attacks will be added if they trigger

  • XK (No procs)
  • XlK (One fist double)
  • XllK (One fist triple OR both fists double)
  • XlllK (One fist double, one fist triple)
  • XllllK (both fists triple)

Next, all attacks from the knuckles will try to proc a follow-up

  • Follow-ups will be added in the order that they proc. Max one per hand.
  • XKLR
  • XlKLR OR XlKRL
  • XllKLR OR XllKRL
  • XlllKLR OR XlllKRL
  • XllllKL OR XllllKR (caps at 8, although both stones will be consumed)

Fortitude Axe - 2H

Example Key

  • !additem 18222
  • R - Right handed swing (2 Handed weapons are all RIGHTATTACK)

Examples

  • Stone can proc on base attack or the da, or both ta
  • R (no proc)
  • RR (da)
  • RRR (ta)
  • Follow up will try to proc on all of these attacks and append to the end
  • R(R) (no proc + stone)
  • RR(R) (da + stone)
  • RRR(R) (ta + stone)

Justice Sword - 1H

Example Key

  • !additem 17710
  • you will need another sword to test the opposite hand
  • R - Right handed swing
  • L - Left handed swing

Examples

  • Stone proc will add a follow-up attack to the same hand and append to the end of the round
  • For the attacks below, assume that Justice Sword is in the right hand.
  • R L
  • R LL (left hand da)
  • RR L (right hand da)
  • RR LL (both hands da)
  • if any of the R swings proc a stone, a R will be appended to the end:
  • R L (R) (no proc + stone)
  • R LL (R) (left hand da + stone)
  • RR L (R) (right hand da + stone)
  • RR LL (R) (both hands da + stone)
  • If the Justice Sword is in the left hand, it will append to the end like this
  • R L
  • R LL (left hand da)
  • RR L (right hand da)
  • RR LL (both hands da)
  • if any of the L swings proc a stone, a L will be appended to the end:
  • R L (L) (no proc + stone)
  • R LL (L) (left hand da + stone)
  • RR L (L) (right hand da + stone)
  • RR LL (L) (both hands da + stone)

Final Notes

  • Special thanks to @siknoz for helping with the research
  • I am not sure if the indexes need to be adjusted in gear_sets.lua
  • Please feel free to ask for any research. I have not yet uploaded any of it but certainly could.

Copy link
Contributor

@zach2good zach2good left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very well researched and well laid out to me, thanks!

src/map/attackround.cpp Outdated Show resolved Hide resolved
src/map/attack.h Outdated Show resolved Hide resolved
Copy link
Member

@WinterSolstice8 WinterSolstice8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, thanks for all the effort here and thanks to Siknoz as well

@zach2good zach2good added the squash Reminder to squash commits before/on merge (you can do this, or maintainers will do this for you) label Dec 19, 2024
Implement follow-up attacks; add to virtue weapons

add trailing comma to new type

add parenthesis to isMainHand condition

refactor attackround logic to remove redundant dynamic cast
@WinterSolstice8 WinterSolstice8 removed the squash Reminder to squash commits before/on merge (you can do this, or maintainers will do this for you) label Dec 21, 2024
@zach2good zach2good merged commit 2247f1d into LandSandBoat:base Dec 21, 2024
12 of 13 checks passed
@zach2good
Copy link
Contributor

Nice work 👍

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.

4 participants