From ec1dc44327bb7edc2ebc4758cbb2c4147af3b6d1 Mon Sep 17 00:00:00 2001 From: spjspj Date: Fri, 13 Jul 2018 00:02:26 +1000 Subject: [PATCH] Hopefully fix the /fix command .. --- .../java/mage/server/game/GameController.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index 78ce2b7dc5..a9593816c7 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -1,4 +1,3 @@ - package mage.server.game; import java.io.*; @@ -1149,7 +1148,7 @@ public class GameController implements GameCallback { sb.append(state.getTurnMods()); sb.append("
getTurnNum: "); sb.append(state.getTurnNum()); - + sb.append("
Using plane chase?:" + state.isPlaneChase()); if (state.isPlaneChase()) { Plane currentPlane = state.getCurrentPlane(); @@ -1157,7 +1156,7 @@ public class GameController implements GameCallback { sb.append("
Current plane:" + currentPlane.getName()); } } - + sb.append("
Future Timeout:"); if (futureTimeout != null) { sb.append("Cancelled?="); @@ -1188,8 +1187,13 @@ public class GameController implements GameCallback { sb.append("
Active player is: "); sb.append(game.getPlayer(state.getActivePlayerId()).getName()); + PassAbility pass = new PassAbility(); if (game.getPlayer(state.getActivePlayerId()).hasLeft()) { + Player p = game.getPlayer(state.getActivePlayerId()); + if (p != null) { + p.concede(game); + } Phase currentPhase = game.getPhase(); if (currentPhase != null) { currentPhase.getStep().skipStep(game, state.getActivePlayerId()); @@ -1204,6 +1208,10 @@ public class GameController implements GameCallback { sb.append("
getChoosingPlayerId: "); if (state.getChoosingPlayerId() != null) { if (game.getPlayer(state.getChoosingPlayerId()).hasLeft()) { + Player p = game.getPlayer(state.getChoosingPlayerId()); + if (p != null) { + p.concede(game); + } Phase currentPhase = game.getPhase(); if (currentPhase != null && !fixedAlready) { currentPhase.getStep().endStep(game, state.getActivePlayerId()); @@ -1218,7 +1226,11 @@ public class GameController implements GameCallback { sb.append("
Player with Priority is: "); if (state.getPriorityPlayerId() != null) { - if (game.getPlayer(state.getPriorityPlayerId()).hasLeft()) { + if (game.getPlayer(state.getPriorityPlayerId()).hasLeft()) { + Player p = game.getPlayer(state.getPriorityPlayerId()); + if (p != null) { + p.concede(game); + } Phase currentPhase = game.getPhase(); if (currentPhase != null && !fixedAlready) { currentPhase.getStep().skipStep(game, state.getActivePlayerId()); @@ -1228,7 +1240,7 @@ public class GameController implements GameCallback { } sb.append(game.getPlayer(state.getPriorityPlayerId()).getName()); sb.append(""); - } + } sb.append("
Future Timeout:"); if (futureTimeout != null) {