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

Fix Viper Lunge #7763

Merged
merged 2 commits into from
Feb 20, 2025
Merged

Fix Viper Lunge #7763

merged 2 commits into from
Feb 20, 2025

Conversation

kphoenix137
Copy link
Collaborator

@kphoenix137 kphoenix137 commented Feb 17, 2025

The initial frame for the Viper's Rhino/Lunge attack is hardcoded to start the animation at frame 7, giving context that the attack is intended to start at frame 7 and not exceed past the end of the animation. The lunge only occurs when the viper is exactly 2 tiles away from the player. The lunge also does not deal any damage, or cause knockback. This fix consistently stops the viper at the end of the animation length, which by testing has resulted in the desired behavior, where the viper will not stop short of reaching their target, but also will not continuously run into the distance if the target is missed.

Fixes: #7034

@StephenCWills
Copy link
Member

The lunge only occurs when the viper is exactly 3 tiles away from the player.

distanceToEnemy >= 2 && distanceToEnemy < 3 indicates they are exactly 2 tiles away from their target. This also matches up with my understanding of how the lunge works. They only ever do it when there is exactly one empty tile between the snake and its target.

The lunge also does not deal any damage, or cause knockback.

It seems like it could deal damage if the player is wearing +DFE gear.

This fix consistently stops the viper at the end of the animation length, which by testing has resulted in the desired behavior, where the viper will not stop short of reaching their target, but also will not continuously run into the distance if the target is missed.

How far does the viper get by the time the attack animation ends? Keep in mind, N/S/E/W are farther in missile coordinates compared to NE/NW/SE/SW.

@StephenCWills
Copy link
Member

How far does the viper get by the time the attack animation ends? Keep in mind, N/S/E/W are farther in missile coordinates compared to NE/NW/SE/SW.

If I didn't screw it up, my math suggests 1.97 tiles N/S/E/W and 2.78 tiles NE/NW/SE/SW.

Co-authored-by: Stephen C. Wills <staphen@gmail.com>
@AJenbo AJenbo merged commit fc0d8b0 into diasurgical:master Feb 20, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants