* Iname Life Aspect - Fixed that the triggered abiliy did not work correctly.

This commit is contained in:
LevelX2 2014-10-23 13:35:42 +02:00
parent 3842a07064
commit f0ce653b60

View file

@ -33,7 +33,8 @@ import mage.constants.Rarity;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.effects.common.ExileSourceEffect; import mage.abilities.costs.common.ExileSourceFromGraveCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.FilterCard; import mage.filter.FilterCard;
@ -62,8 +63,7 @@ public class InameLifeAspect extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// When Iname, Life Aspect dies, you may exile it. If you do, return any number of target Spirit cards from your graveyard to your hand. // When Iname, Life Aspect dies, you may exile it. If you do, return any number of target Spirit cards from your graveyard to your hand.
Ability ability = new DiesTriggeredAbility(new ExileSourceEffect(), true); Ability ability = new DiesTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new ExileSourceFromGraveCost(), "Exile to return Spirit cards?"), false);
ability.addEffect(new ReturnToHandTargetEffect());
ability.addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, filter)); ability.addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, filter));
this.addAbility(ability); this.addAbility(ability);
} }