-
Notifications
You must be signed in to change notification settings - Fork 3
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
Dynamic execution duration for leap #390
Conversation
fb1646a
to
64d3dfa
Compare
apps/arena/lib/arena/game/player.ex
Outdated
## so to simplify my life an executive decision was made to take thas as a fact | ||
## When the time comes to have more than one mechanic per skill this function will need to be refactored, good thing | ||
## is that it will crash here so not something we can ignore | ||
defp calculate_duration(%{mechanics: [%{leap: leap}]}, position, direction) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not working. It should be:
defp calculate_duration(%{mechanics: [leap: leap]}, position, direction) do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 7864206
98a05ff
to
ca09cde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Screen.Recording.2024-05-09.at.11.36.30.AM.mov
When you execute the leap while you're walking and you don't release the stick you're stuck when you finish the leap, this is not present on main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found another error i think that, if you leap with the magic boots the final positions ends up being farther that you intended
Screen.Recording.2024-05-10.at.10.57.19.AM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Changes leap from having a fixed duration and dynamic speed to having fixed speed and dynamic duration