From 1561ed3fa4c793b86050840272fbd3bd083d4e39 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 12 May 2015 17:28:17 +0200 Subject: [PATCH] * Fixed a recently added bug that prevented attack a player if also a planeswalker of the attacked player is on the battlerfield. --- Mage/src/mage/target/common/TargetDefender.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mage/src/mage/target/common/TargetDefender.java b/Mage/src/mage/target/common/TargetDefender.java index 003b7ed0ef..9c1df7addc 100644 --- a/Mage/src/mage/target/common/TargetDefender.java +++ b/Mage/src/mage/target/common/TargetDefender.java @@ -197,10 +197,10 @@ public class TargetDefender extends TargetImpl { public boolean canTarget(UUID id, Ability source, Game game) { Player player = game.getPlayer(id); MageObject targetSource = game.getObject(attackerId); - if (player != null && source != null) { - return notTarget || (player.canBeTargetedBy(targetSource, source.getControllerId(), game) && filter.match(player, game)); + if (player != null) { + return notTarget || (player.canBeTargetedBy(targetSource, source == null ? null : source.getControllerId(), game) && filter.match(player, game)); } - Permanent permanent = game.getPermanent(id); + Permanent permanent = game.getPermanent(id); // planeswalker if (permanent != null) { //Could be targeting due to combat decision to attack a player or planeswalker. UUID controllerId = null;