Skip to content

Commit

Permalink
Fix leap pattern-match in calculate_duration/4
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico-Sanchez committed Jul 18, 2024
1 parent 9d94594 commit 02352a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/arena/lib/arena/game/player.ex
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ defmodule Arena.Game.Player do
## 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, auto_aim?) do
defp calculate_duration(%{mechanics: [%{type: "leap"} = leap]}, position, direction, auto_aim?) do
## TODO: Cap target_position to leap.range
direction = Skill.maybe_multiply_by_range(direction, auto_aim?, leap.range)

Expand Down

0 comments on commit 02352a7

Please sign in to comment.