From 447e42409bf78f17f632f77da42411afaebed0c3 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 29 Aug 2015 10:53:13 +0200 Subject: [PATCH] * Lieutenant - Fixed that the Lieutenant effects were also applied if the commander was controlled by another player as the commander owner. --- .../condition/common/CommanderInPlayCondition.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Mage/src/mage/abilities/condition/common/CommanderInPlayCondition.java b/Mage/src/mage/abilities/condition/common/CommanderInPlayCondition.java index 26196743f86..1a7e9fc3938 100644 --- a/Mage/src/mage/abilities/condition/common/CommanderInPlayCondition.java +++ b/Mage/src/mage/abilities/condition/common/CommanderInPlayCondition.java @@ -30,11 +30,11 @@ package mage.abilities.condition.common; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.players.Player; - /** - * Checks if the player has its commander in play + * Checks if the player has its commander in play and controls it * * @author LevelX2 */ @@ -42,7 +42,8 @@ public class CommanderInPlayCondition implements Condition { private static CommanderInPlayCondition fInstance = null; - private CommanderInPlayCondition() {} + private CommanderInPlayCondition() { + } public static Condition getInstance() { if (fInstance == null) { @@ -55,7 +56,8 @@ public class CommanderInPlayCondition implements Condition { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - return game.getPermanent(controller.getCommanderId()) != null; + Permanent commander = game.getPermanent(controller.getCommanderId()); + return commander != null && commander.getControllerId().equals(source.getControllerId()); } return false; } @@ -65,4 +67,4 @@ public class CommanderInPlayCondition implements Condition { return "As long as you control your commander"; } -} \ No newline at end of file +}