- Fixed Surgical Extraction

This commit is contained in:
jeffwadsworth 2020-02-14 10:53:09 -06:00
parent 4cc19f5071
commit 90534ac100

View file

@ -16,11 +16,11 @@ import mage.filter.predicate.mageobject.NamePredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetCardInHand;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import mage.target.TargetCard;
/** /**
* @author North * @author North
@ -102,7 +102,8 @@ class SurgicalExtractionEffect extends OneShotEffect {
// cards in Hand // cards in Hand
filterNamedCard.setMessage("card named " + nameToSearch + " in the hand of " + owner.getName()); filterNamedCard.setMessage("card named " + nameToSearch + " in the hand of " + owner.getName());
TargetCardInHand targetCardInHand = new TargetCardInHand(0, Integer.MAX_VALUE, filterNamedCard); TargetCard targetCardInHand = new TargetCard(0, Integer.MAX_VALUE, Zone.HAND, filterNamedCard);
targetCardInHand.setNotTarget(true);
if (controller.chooseTarget(Outcome.Exile, owner.getHand(), targetCardInHand, source, game)) { if (controller.chooseTarget(Outcome.Exile, owner.getHand(), targetCardInHand, source, game)) {
List<UUID> targets = targetCardInHand.getTargets(); List<UUID> targets = targetCardInHand.getTargets();
for (UUID targetId : targets) { for (UUID targetId : targets) {