Merge pull request #5146 from spjspj/master

Hopefully fix the /fix command ..
This commit is contained in:
spjspj 2018-07-13 01:01:57 +10:00 committed by GitHub
commit f21543ff8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,3 @@
package mage.server.game;
import java.io.*;
@ -1188,8 +1187,13 @@ public class GameController implements GameCallback {
sb.append("<br>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("<br>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());
@ -1219,6 +1227,10 @@ public class GameController implements GameCallback {
sb.append("<br><font color=orange>Player with Priority is: ");
if (state.getPriorityPlayerId() != null) {
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());