public SelectiveSnare(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{U}"); // Return X target creatures of the creature type of your choice to their owner's hand. this.getSpellAbility().addEffect( new ReturnToHandTargetEffect(true) .setText("Return X target creatures of " + "the creature type of your choice " + "to their owner's hand") ); this.getSpellAbility().setTargetAdjuster(SelectiveSnareAdjuster.instance); }
public PitchstoneWallTriggeredAbility() { super(Zone.BATTLEFIELD, new DoIfCostPaid(new ReturnToHandTargetEffect().setText("return the discarded card from your graveyard to your hand"), new SacrificeSourceCost()), false); }
public ReapingTheGraves(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); // Return target creature card from your graveyard to your hand. this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return target creature card from your graveyard to your hand.")); // Storm this.addAbility(new StormAbility()); }
public Reap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); // Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.")); this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 0)); this.getSpellAbility().setTargetAdjuster(ReapAdjuster.instance); }
public CommandOfUnsummoning(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); // Cast Command of Unsummoning only during the declare attackers step and only if you've been attacked this step. Ability ability = new CastOnlyDuringPhaseStepSourceAbility( TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, "Cast this spell only during the declare attackers step and only if you've been attacked this step." ); ability.addWatcher(new PlayerAttackedStepWatcher()); this.addAbility(ability); // Return one or two target attacking creatures to their owner's hand. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return one or two target attacking creatures to their owner's hand.")); this.getSpellAbility().addTarget(new TargetAttackingCreature(1, 2, new FilterAttackingCreature(), false)); }
public TragicPoet(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}, Sacrifice Tragic Poet: Return target enchantment card from your graveyard to your hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect() .setText("Return target enchantment card from your graveyard to your hand"), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability); }
public MemorialToFolly(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // Memorial to Folly enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new BlackManaAbility()); // {2}{B}, {T}, Sacrifice Memorial to Folly: Return target creature card from your graveyard to your hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect() .setText("Return target creature card from your graveyard to your hand"), new ManaCostsImpl("{2}{B}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); this.addAbility(ability); }
public DaringArchaeologist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(3); this.toughness = new MageInt(3); // When Daring Archaeologist enters the battlefield, you may return target artifact card from your graveyard to your hand. Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect() .setText("you may return target artifact card from your graveyard to your hand"), true); ability.addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard"))); this.addAbility(ability); // Whenever you cast a historic spell, put a +1/+1 counter on Daring Archaeologist. this.addAbility(new SpellCastControllerTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)) .setText("put a +1/+1 counter on {this}. <i>(Artifacts, legendaries, and Sagas are historic.)</i>"), filter, false)); }
public TurntimberSower(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.DRUID); this.power = new MageInt(3); this.toughness = new MageInt(3); // Whenever one or more land cards are put into your graveyard from anywhere, create a 0/1 green Plant creature token. this.addAbility(new TurntimberSowerTriggeredAbility()); // {G}, Sacrifice three creatures: Return target land card from your graveyard to your hand. Ability ability = new SimpleActivatedAbility( new ReturnToHandTargetEffect() .setText("Return target land card " + "from your graveyard to your hand"), new ManaCostsImpl("{G}") ); ability.addCost(new SacrificeTargetCost( new TargetControlledPermanent(3, 3, filter, true) )); ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_LAND)); this.addAbility(ability); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { UUID targetId = getTargetPointer().getFirst(game, source); Card card = game.getCard(targetId); if (card != null) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); Permanent creature = game.getPermanent(card.getId()); if (creature != null) { ContinuousEffect hasteEffect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); hasteEffect.setTargetPointer(new FixedTarget(creature, game)); game.addEffect(hasteEffect, source); ReturnToHandTargetEffect returnToHandEffect = new ReturnToHandTargetEffect(); returnToHandEffect.setText("return that creature to your hand"); returnToHandEffect.setTargetPointer(new FixedTarget(creature, game)); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(returnToHandEffect); game.addDelayedTriggeredAbility(delayedAbility, source); } } return true; } return false; } }