* Fixed a bug that if you concede a game while your turn was controlled by another player (e.g. Mindslaver) the control by the other player was still active in the next game of the match.

This commit is contained in:
LevelX2 2014-07-17 00:41:16 +02:00
parent 59c80771e9
commit 6238bca8e5
2 changed files with 9 additions and 3 deletions

View file

@ -41,8 +41,8 @@ import mage.constants.TurnPhase;
*/ */
public class TurnMod implements Serializable { public class TurnMod implements Serializable {
private UUID id; private final UUID id;
private UUID playerId; private final UUID playerId;
private UUID newControllerId; private UUID newControllerId;
private boolean extraTurn; private boolean extraTurn;
private boolean skipTurn; private boolean skipTurn;

View file

@ -335,6 +335,9 @@ public abstract class PlayerImpl implements Player, Serializable {
this.idleTimeout = false; this.idleTimeout = false;
this.turns = 0; this.turns = 0;
this.isGameUnderControl = true;
this.turnController = this.getId();
this.playersUnderYourControl.clear();
this.passed = false; this.passed = false;
this.passedTurn = false; this.passedTurn = false;
this.passedAllTurns = false; this.passedAllTurns = false;
@ -345,7 +348,10 @@ public abstract class PlayerImpl implements Player, Serializable {
this.setReachedNextTurnAfterLeaving(false); this.setReachedNextTurnAfterLeaving(false);
game.getState().getWatchers().add(new BloodthirstWatcher(playerId)); game.getState().getWatchers().add(new BloodthirstWatcher(playerId));
} }
/**
* called before apply effects
*
*/
@Override @Override
public void reset() { public void reset() {
this.abilities.clear(); this.abilities.clear();