From de99545b01770af0be62b73209bb992b40b6c3d2 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Wed, 14 Mar 2018 13:00:41 +0100 Subject: Reverses some lists. --- src/query/character_turn.erl | 4 ++-- src/struct/battle.erl | 2 +- src/struct/battle_action.erl | 2 +- src/struct/player.erl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/query/character_turn.erl b/src/query/character_turn.erl index 81c3c1f..85c5db8 100644 --- a/src/query/character_turn.erl +++ b/src/query/character_turn.erl @@ -187,8 +187,8 @@ handle_actions (RData, Input) -> Action ), { - (CurrActionsDiffUpdates ++ NewActionsDiffUpdates), - (CurrClientUpdates ++ NewClientUpdates), + (NewActionsDiffUpdates ++ CurrActionsDiffUpdates), + (NewClientUpdates ++ CurrClientUpdates), NewBattle, NewCharacterInstance } diff --git a/src/struct/battle.erl b/src/struct/battle.erl index bf2b010..5ac12e4 100644 --- a/src/struct/battle.erl +++ b/src/struct/battle.erl @@ -60,7 +60,7 @@ get_all_timelines (Result, CurrentIndex, EndPoint, ArraySize, Players) -> Player = array:get(CurrentIndex, Players), Timeline = player:get_timeline(Player), NextIndex = ((CurrentIndex + 1) rem ArraySize), - NextResult = (Result ++ Timeline), + NextResult = (Timeline ++ Result), case CurrentIndex of EndPoint -> NextResult; diff --git a/src/struct/battle_action.erl b/src/struct/battle_action.erl index 0fe780f..8aaaef9 100644 --- a/src/struct/battle_action.erl +++ b/src/struct/battle_action.erl @@ -113,7 +113,7 @@ handle_attack_sequence nothing -> {AttackValidEffects, AttackerHealth, DefenderHealth}; _ -> { - [AttackResult|AttackValidEffects], + (AttackValidEffects ++ [AttackResult]), NewAttackerHealth, NewDefenderHealth } diff --git a/src/struct/player.erl b/src/struct/player.erl index 857906e..c4aefd1 100644 --- a/src/struct/player.erl +++ b/src/struct/player.erl @@ -56,7 +56,7 @@ add_to_timeline (NewEvents, Player) -> Player#player { - timeline = (OldTimeline ++ NewEvents) + timeline = (NewEvents ++ OldTimeline) }. -spec reset_timeline (struct()) -> struct(). -- cgit v1.2.3-70-g09d2