aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-03-14 13:00:41 +0100
committernsensfel <SpamShield0@noot-noot.org>2018-03-14 13:00:41 +0100
commitde99545b01770af0be62b73209bb992b40b6c3d2 (patch)
tree01fbdd9aacceb511c1f29b82cba5085e06d5b6c0
parentf3868d956b17f9606e7b7321914e7c08316a062c (diff)
downloadtacticians-server-de99545b01770af0be62b73209bb992b40b6c3d2.zip
tacticians-server-de99545b01770af0be62b73209bb992b40b6c3d2.tar.bz2
Reverses some lists.timeline
-rw-r--r--src/query/character_turn.erl4
-rw-r--r--src/struct/battle.erl2
-rw-r--r--src/struct/battle_action.erl2
-rw-r--r--src/struct/player.erl2
4 files changed, 5 insertions, 5 deletions
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().