From 8cfe66e29cd12389791e4671d7eed6403f26d521 Mon Sep 17 00:00:00 2001 From: Justin Herlehy Date: Sat, 4 Mar 2017 16:20:17 -0800 Subject: [PATCH] Fix Ichorid to set notTarget flag. Fixes issued #2906 --- Mage.Sets/src/mage/cards/i/Ichorid.java | 9 +++++++-- .../target/common/TargetCardInYourGraveyard.java | 14 ++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/i/Ichorid.java b/Mage.Sets/src/mage/cards/i/Ichorid.java index 8ebbed75ce..ed7a226e4f 100644 --- a/Mage.Sets/src/mage/cards/i/Ichorid.java +++ b/Mage.Sets/src/mage/cards/i/Ichorid.java @@ -27,7 +27,6 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; @@ -52,6 +51,8 @@ import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author Plopman @@ -92,7 +93,11 @@ class IchoridTriggerdAbility extends BeginningOfUpkeepTriggeredAbility{ public IchoridTriggerdAbility(FilterCard filter){ super(Zone.GRAVEYARD, - new DoIfCostPaid(new ReturnSourceFromGraveyardToBattlefieldEffect(), new ExileFromGraveCost(new TargetCardInYourGraveyard(filter))), + new DoIfCostPaid(new ReturnSourceFromGraveyardToBattlefieldEffect(), + new ExileFromGraveCost( + new TargetCardInYourGraveyard(1, 1, filter, true) + ) + ), TargetController.YOU, false); } diff --git a/Mage/src/main/java/mage/target/common/TargetCardInYourGraveyard.java b/Mage/src/main/java/mage/target/common/TargetCardInYourGraveyard.java index f93b28dff1..0d16c674ad 100644 --- a/Mage/src/main/java/mage/target/common/TargetCardInYourGraveyard.java +++ b/Mage/src/main/java/mage/target/common/TargetCardInYourGraveyard.java @@ -27,9 +27,6 @@ */ package mage.target.common; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; import mage.cards.Card; import mage.cards.Cards; @@ -40,6 +37,10 @@ import mage.game.events.GameEvent; import mage.players.Player; import mage.target.TargetCard; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -59,7 +60,12 @@ public class TargetCardInYourGraveyard extends TargetCard { } public TargetCardInYourGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) { - super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter); + this(minNumTargets, maxNumTargets, filter, false); + } + + public TargetCardInYourGraveyard(int minNumTarget, int maxNumTargets, FilterCard filter, boolean notTarget) { + super(minNumTarget, maxNumTargets, Zone.GRAVEYARD, filter); + this.setNotTarget(notTarget); } public TargetCardInYourGraveyard(final TargetCardInYourGraveyard target) {