mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Merge pull request #5146 from spjspj/master
Hopefully fix the /fix command ..
This commit is contained in:
commit
f21543ff8d
1 changed files with 17 additions and 5 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.server.game;
|
package mage.server.game;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
@ -1188,8 +1187,13 @@ public class GameController implements GameCallback {
|
||||||
|
|
||||||
sb.append("<br>Active player is: ");
|
sb.append("<br>Active player is: ");
|
||||||
sb.append(game.getPlayer(state.getActivePlayerId()).getName());
|
sb.append(game.getPlayer(state.getActivePlayerId()).getName());
|
||||||
|
|
||||||
PassAbility pass = new PassAbility();
|
PassAbility pass = new PassAbility();
|
||||||
if (game.getPlayer(state.getActivePlayerId()).hasLeft()) {
|
if (game.getPlayer(state.getActivePlayerId()).hasLeft()) {
|
||||||
|
Player p = game.getPlayer(state.getActivePlayerId());
|
||||||
|
if (p != null) {
|
||||||
|
p.concede(game);
|
||||||
|
}
|
||||||
Phase currentPhase = game.getPhase();
|
Phase currentPhase = game.getPhase();
|
||||||
if (currentPhase != null) {
|
if (currentPhase != null) {
|
||||||
currentPhase.getStep().skipStep(game, state.getActivePlayerId());
|
currentPhase.getStep().skipStep(game, state.getActivePlayerId());
|
||||||
|
@ -1204,6 +1208,10 @@ public class GameController implements GameCallback {
|
||||||
sb.append("<br>getChoosingPlayerId: ");
|
sb.append("<br>getChoosingPlayerId: ");
|
||||||
if (state.getChoosingPlayerId() != null) {
|
if (state.getChoosingPlayerId() != null) {
|
||||||
if (game.getPlayer(state.getChoosingPlayerId()).hasLeft()) {
|
if (game.getPlayer(state.getChoosingPlayerId()).hasLeft()) {
|
||||||
|
Player p = game.getPlayer(state.getChoosingPlayerId());
|
||||||
|
if (p != null) {
|
||||||
|
p.concede(game);
|
||||||
|
}
|
||||||
Phase currentPhase = game.getPhase();
|
Phase currentPhase = game.getPhase();
|
||||||
if (currentPhase != null && !fixedAlready) {
|
if (currentPhase != null && !fixedAlready) {
|
||||||
currentPhase.getStep().endStep(game, state.getActivePlayerId());
|
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: ");
|
sb.append("<br><font color=orange>Player with Priority is: ");
|
||||||
if (state.getPriorityPlayerId() != null) {
|
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();
|
Phase currentPhase = game.getPhase();
|
||||||
if (currentPhase != null && !fixedAlready) {
|
if (currentPhase != null && !fixedAlready) {
|
||||||
currentPhase.getStep().skipStep(game, state.getActivePlayerId());
|
currentPhase.getStep().skipStep(game, state.getActivePlayerId());
|
||||||
|
|
Loading…
Reference in a new issue