| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/battle')
| -rw-r--r-- | src/battle/mechanic/action/btl_action_move.erl | 20 | 
1 files changed, 16 insertions, 4 deletions
| diff --git a/src/battle/mechanic/action/btl_action_move.erl b/src/battle/mechanic/action/btl_action_move.erl index eed7add..ad19f7a 100644 --- a/src/battle/mechanic/action/btl_action_move.erl +++ b/src/battle/mechanic/action/btl_action_move.erl @@ -444,7 +444,6 @@ commit_move (CharacterIX, Character, S0Update, Path, NewLocation) ->  -spec handle     (        btl_action:type(), -      btl_character:type(),        btl_character_turn_update:type()     )     -> @@ -452,9 +451,22 @@ commit_move (CharacterIX, Character, S0Update, Path, NewLocation) ->        {'ok', btl_character_turn_update:type()}        | {'events', list(btl_action:type()), btl_character_turn_update:type()}     ). -handle (Action, Character, S0Update) -> -   Path = btl_action:get_path(Action), -   CharacterIX = btl_action:get_actor_index(Action), +handle (Action, S0Update) -> +   ActorIX = btl_action:get_actor_index(Action), + +   S0MovementPoints = ..., + +   S0Path = btl_action:get_path(Action), + +   {{S1MovementPoints, S1Path}, S2Update} = +      btl_condition:apply_to_character +      ( +         ActorIX, +         ?CONDITION_TRIGGER_ABOUT_TO_MOVE, +         {S0MovementPoints, S0Path}, +         S1Update +      ), +     {        NewLocation, | 


