From 6238bca8e54c33039e4cb48eba8477bf5d23a5fe Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 17 Jul 2014 00:41:16 +0200 Subject: [PATCH] * 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. --- Mage/src/mage/game/turn/TurnMod.java | 4 ++-- Mage/src/mage/players/PlayerImpl.java | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Mage/src/mage/game/turn/TurnMod.java b/Mage/src/mage/game/turn/TurnMod.java index cecef0ee0f..ab06249c29 100644 --- a/Mage/src/mage/game/turn/TurnMod.java +++ b/Mage/src/mage/game/turn/TurnMod.java @@ -41,8 +41,8 @@ import mage.constants.TurnPhase; */ public class TurnMod implements Serializable { - private UUID id; - private UUID playerId; + private final UUID id; + private final UUID playerId; private UUID newControllerId; private boolean extraTurn; private boolean skipTurn; diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index bbe45f6ece..2b7be66145 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -335,6 +335,9 @@ public abstract class PlayerImpl implements Player, Serializable { this.idleTimeout = false; this.turns = 0; + this.isGameUnderControl = true; + this.turnController = this.getId(); + this.playersUnderYourControl.clear(); this.passed = false; this.passedTurn = false; this.passedAllTurns = false; @@ -345,7 +348,10 @@ public abstract class PlayerImpl implements Player, Serializable { this.setReachedNextTurnAfterLeaving(false); game.getState().getWatchers().add(new BloodthirstWatcher(playerId)); } - + /** + * called before apply effects + * + */ @Override public void reset() { this.abilities.clear();