Fix target defender cases that don't target.

This commit is contained in:
Nathaniel Brandes 2017-03-08 20:42:44 -08:00
parent ef29fab8ea
commit 495e20ae1a

View file

@ -135,12 +135,12 @@ public class TargetDefender extends TargetImpl {
MageObject targetSource = game.getObject(sourceId);
for (UUID playerId: game.getState().getPlayersInRange(sourceControllerId, game)) {
Player player = game.getPlayer(playerId);
if (player != null && player.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(player, game)) {
if (notTarget || (player != null && player.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(player, game))) {
possibleTargets.add(playerId);
}
}
for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), sourceControllerId, game)) {
if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, game)) {
if (notTarget || (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, game))) {
possibleTargets.add(permanent.getId());
}
}