generalize dentata-snakes
bounce
logic into a util function
#85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Split from #83
In the upcoming soul event 0 PR, we use the same "bounce-off-walls" logic that the
dentata-snakes
attack uses to bounce its snake heads / snake tails off the boss fight arena's walls.This PR converts that function and
dentata-snakes
' usage of it to take in macro parameters to specify the walls we want the entity to bounce off of and anothercommand_after_bouncing
parameter that can be used to run a function if the entity did successfully bounce (optional, can just specifyreturn 0
if you want nothing to happen). Thedentata-snakes
attack uses this to shake the screen / play a sound effect after successfully bouncing.We no longer refer to the walls as confusing "top" "bottom" etc., but instead refer to them by their cardinal direction. For example the wall you'd see while facing the +Z direction is the +Z wall.
Test plan
dentata-snakes
attack still works in-game, bouncing as expectedReproducing in-game
you can ensure the
dentata-snakes
attack still works as expected by running:Preview
N/A -- same visuals as before
Supplemental changes
N/A