summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-10-16 10:35:48 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-10-16 10:35:48 +0200 |
commit | 86ea246c49cf2975c1240ee9390fed744b185e72 (patch) | |
tree | e4e12d3257d8f3dab37fd4bf2fd29af18075523f | |
parent | 374d81b1cc1b638ae8b2504f8e8c7b4929a679a7 (diff) |
...
-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, |