Files
odinsea-elixir/lib/odinsea/game/movement/bounce.ex
2026-02-14 23:12:33 -07:00

32 lines
791 B
Elixir

defmodule Odinsea.Game.Movement.Bounce do
@moduledoc """
Bounce movement - bouncing off surfaces.
Ported from Java BounceMovement.java
Used for:
- Bouncing (command -1)
- Wall bouncing (commands 18, 19)
- Platform bouncing (commands 5-7)
"""
@type t :: %__MODULE__{
command: integer(), # Movement command type (-1, 5-7, 18, 19)
x: integer(), # Bounce X position
y: integer(), # Bounce Y position
unk: integer(), # Unknown short value
foothold: integer(), # Foothold after bounce
stance: integer(), # New stance/move action
duration: integer() # Movement duration in ms
}
defstruct [
:command,
:x,
:y,
:unk,
:foothold,
:stance,
:duration
]
end