Fixes abilities that may target either opponents or planeswalkers to properly check if a player is an opponent.
@@ -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;
}
}
