From c6d54c929f03f98e3eea4780281669a6c01ea641 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 24 Dec 2016 11:42:11 +0100 Subject: [PATCH] Fixed a problem that selecting cards in hand or libraray could unintended trigger "becomes the target of a spell or ability" abilities. --- Mage/src/main/java/mage/target/common/TargetCardInHand.java | 4 ++-- .../src/main/java/mage/target/common/TargetCardInLibrary.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/target/common/TargetCardInHand.java b/Mage/src/main/java/mage/target/common/TargetCardInHand.java index 179764de7cc..7a545c7ae40 100644 --- a/Mage/src/main/java/mage/target/common/TargetCardInHand.java +++ b/Mage/src/main/java/mage/target/common/TargetCardInHand.java @@ -24,8 +24,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.target.common; import java.util.HashSet; @@ -60,6 +59,7 @@ public class TargetCardInHand extends TargetCard { public TargetCardInHand(int minNumTargets, int maxNumTargets, FilterCard filter) { super(minNumTargets, maxNumTargets, Zone.HAND, filter); + setNotTarget(true); } public TargetCardInHand(final TargetCardInHand target) { diff --git a/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java b/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java index 4d83aad72f6..ac22810bb81 100644 --- a/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java +++ b/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java @@ -69,6 +69,7 @@ public class TargetCardInLibrary extends TargetCard { // with a certain card type or color, that player isn’t required to find some or all of those cards // even if they’re present in that zone. this.setRequired(!filter.hasPredicates()); + this.setNotTarget(true); this.librarySearchLimit = Integer.MAX_VALUE; }