summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game/battles
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-10 12:58:30 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-10 12:58:30 +0200
commit699d99ec7c2fb68cdda77e994d8329f4e1f47df6 (patch)
treea7fa8bae82f195fc53efe47ef9b8e6ec10c07b9a /core/src/ch/asynk/rustanddust/game/battles
parentb85d0270140b30a6575a2617575dfa1450d2ab61 (diff)
downloadRustAndDust-699d99ec7c2fb68cdda77e994d8329f4e1f47df6.zip
RustAndDust-699d99ec7c2fb68cdda77e994d8329f4e1f47df6.tar.gz
Marshal: add Mode.PLAYER to load currentPlayer AP
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game/battles')
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
index 20f6a25..255aa6c 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
@@ -102,7 +102,9 @@ public abstract class BattleCommon implements Battle
public void load(Marshal.Mode mode, JsonValue value)
{
- if (mode == Marshal.Mode.PLAYERS) {
+ if (mode == Marshal.Mode.PLAYER) {
+ map.loadPlayerAP(value, 0, currentPlayer);
+ } else if (mode == Marshal.Mode.PLAYERS) {
map.loadPlayers(value, players);
this.currentPlayer = players[0];
} else {