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 Knockback #7093

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

kphoenix137
Copy link
Collaborator

@kphoenix137 kphoenix137 commented Apr 18, 2024

This fixes the problem with knockback. Knockback always pushes monsters in the opposite direction that the monster is facing. This can result in monsters being pushed in the wrong direction if they aren't facing the attacking player/missile.

Melee attacks and Telekinesis will calculate a direction based on the player tile and monster future tile upon initiating knockback.

Missiles will calculate a direction based on the missile start tile and monster future tile upon initiating knockback.

@AJenbo
Copy link
Member

AJenbo commented Apr 18, 2024

Are they also to fast for you to turn around?

Was it not possible to calculate the arrow direction?

@DakkJaniels
Copy link
Contributor

Are they also to fast for you to turn around?

Would that matter? Isn't it based on your current position, not which way you are facing?

Was it not possible to calculate the arrow direction?

I would agree that using missile velocity (would need to figure out the direction component, I guess?) would be a better solution.

@kphoenix137
Copy link
Collaborator Author

kphoenix137 commented Apr 18, 2024

Maybe player facing direction was a bit inaccurate. It calculates direction using the player occupied tile and monster occupied tile, Which generally is whatever direction the player is facing.

@AJenbo
Copy link
Member

AJenbo commented Apr 18, 2024

Would that matter? Isn't it based on your current position, not which way you are facing?

I only read the description so fare, I was mislead apparently.

@kphoenix137
Copy link
Collaborator Author

Would that matter? Isn't it based on your current position, not which way you are facing?

I only read the description so fare, I was mislead apparently.

I just revised it to solve the potential edge case in the first post. I will revise the first post as well.

@kphoenix137 kphoenix137 marked this pull request as ready for review April 18, 2024 21:41
@kphoenix137 kphoenix137 marked this pull request as draft April 18, 2024 21:58
@kphoenix137 kphoenix137 marked this pull request as ready for review April 18, 2024 22:36
@kphoenix137 kphoenix137 marked this pull request as draft April 18, 2024 22:38
@kphoenix137 kphoenix137 marked this pull request as ready for review April 18, 2024 22:42
@kphoenix137 kphoenix137 marked this pull request as draft April 18, 2024 22:49
@kphoenix137 kphoenix137 marked this pull request as ready for review April 18, 2024 23:12
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