Fix Ichorid to set notTarget flag.

Fixes issued #2906
This commit is contained in:
Justin Herlehy 2017-03-04 16:20:17 -08:00
parent ca0371eade
commit 8cfe66e29c
2 changed files with 17 additions and 6 deletions

View file

@ -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);
}

View file

@ -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) {