From 268b1748cca70e442441576b39de974750edf47e Mon Sep 17 00:00:00 2001 From: Kevin Shin Date: Wed, 22 Aug 2018 04:46:32 -0500 Subject: [PATCH] Fixes abilities that may target either opponents or planeswalkers to properly check if a player is an opponent. #5252 --- .../main/java/mage/target/common/TargetPermanentOrPlayer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java b/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java index ac4156a25c..a20797a947 100644 --- a/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java +++ b/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java @@ -99,7 +99,8 @@ public class TargetPermanentOrPlayer extends TargetImpl { } if (player != null) { if (!isNotTarget()) { - if (!player.canBeTargetedBy(targetSource, source.getControllerId(), game)) { + if (!player.canBeTargetedBy(targetSource, source.getControllerId(), game) + || !filter.match(player, source.getSourceId(), source.getControllerId(), game)) { return false; } }