public AdarkarValkyrieDelayedTriggeredAbility(MageObjectReference mor) { super(new ReturnToBattlefieldUnderYourControlTargetEffect(), Duration.EndOfTurn); this.mor = mor; }
@Override public boolean apply(Game game, Ability source) { if (game.getBattlefield().containsPermanent(shireiId)) { return super.apply(game, source); } return false; } }
@Override public boolean apply(Game game, Ability source) { UUID targetId = source.getFirstTarget(); new ExileTargetForSourceEffect().apply(game, source); new ReturnToBattlefieldUnderYourControlTargetEffect(true).apply(game, source); ContinuousEffect effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(targetId, game)); game.addEffect(effect, source); return true; } }
ExileZone exileZone = game.getExile().getExileZone(exileZoneId); if (exileZone != null) { for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { if (exileZone.contains(targetId)) { cardsToBattlefield.add(targetId); cardsToBattlefield.addAll(getTargetPointer().getTargets(game, source));
@Override public boolean apply(Game game, Ability source) { boolean isPirate = false; Player player = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null && permanent.hasSubtype(SubType.PIRATE, game)) { isPirate = true; } if (super.apply(game, source)) { new ReturnToBattlefieldUnderYourControlTargetEffect(true).apply(game, source); if (isPirate && player != null) { player.drawCards(1, game); } return true; } return false; } }
@Override public ReturnToBattlefieldUnderYourControlTargetEffect copy() { return new ReturnToBattlefieldUnderYourControlTargetEffect(this); }
public NecroskitterTriggeredAbility() { super(Zone.BATTLEFIELD, new ReturnToBattlefieldUnderYourControlTargetEffect(), true); }
SacredGroundTriggeredAbility() { super(Zone.BATTLEFIELD, new ReturnToBattlefieldUnderYourControlTargetEffect()); }
public SaffiEriksdotterDelayedTriggeredAbility(FixedTarget fixedTarget) { super(new ReturnToBattlefieldUnderYourControlTargetEffect(), Duration.EndOfTurn); this.getEffects().get(0).setTargetPointer(fixedTarget); this.fixedTarget = fixedTarget; }
public ItThatBetrays(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{12}"); this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(11); this.toughness = new MageInt(11); // Annihilator 2 (Whenever this creature attacks, defending player sacrifices two permanents.) this.addAbility(new AnnihilatorAbility(2)); // Whenever an opponent sacrifices a nontoken permanent, put that card onto the battlefield under your control. this.addAbility(new OpponentSacrificesNonTokenPermanentTriggeredAbility(new ReturnToBattlefieldUnderYourControlTargetEffect())); }
public SoulCollector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever a creature dealt damage by Soul Collector this turn dies, return that card to the battlefield under your control. this.addAbility(new DealtDamageAndDiedTriggeredAbility(new ReturnToBattlefieldUnderYourControlTargetEffect(false))); // Morph {B}{B}{B} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{B}{B}{B}"))); }
public ConjurersCloset(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); // At the beginning of your end step, you may exile target creature you control, then return that card to the battlefield under your control. Ability ability = new BeginningOfYourEndStepTriggeredAbility(new ExileTargetForSourceEffect(), true); ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); ability.addTarget(new TargetControlledCreaturePermanent()); this.addAbility(ability); }
public Cloudshift(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Exile target creature you control, then return that card to the battlefield under your control. this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); Effect effect = new ExileTargetForSourceEffect(); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); }
@Override public boolean apply(Game game, Ability source) { Card card = game.getCard(getTargetPointer().getFirst(game, source)); if (card != null) { Effect effect = new ReturnToBattlefieldUnderYourControlTargetEffect(); effect.setText("return that card to the battlefield under your control at the beginning of the next end step"); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect); delayedAbility.getEffects().get(0).setTargetPointer(getTargetPointer()); game.addDelayedTriggeredAbility(delayedAbility, source); return true; } return false; } }
public MomentaryBlink(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // Exile target creature you control, then return it to the battlefield under its owner's control. this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellAbility().addEffect(new ExileTargetForSourceEffect()); this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); // Flashback {3}{U} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{U}"), TimingRule.INSTANT)); }
public Displace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); // Exile up to two target creatures you control, then return those cards to the battlefield under their owner's control. this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2, new FilterControlledCreaturePermanent("creatures you control"), false)); Effect effect = new ExileTargetForSourceEffect(); effect.setText("Exile up to two target creatures you control"); this.getSpellAbility().addEffect(effect); effect = new ReturnToBattlefieldUnderYourControlTargetEffect(true); effect.setText(", then return those cards to the battlefield under their owner's control"); this.getSpellAbility().addEffect(effect); }
public TorrentOfSouls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B/R}"); // Return up to one target creature card from your graveyard to the battlefield if {B} was spent to cast Torrent of Souls. Creatures target player controls get +2/+0 and gain haste until end of turn if {R} was spent to cast Torrent of Souls. Target targetCreature = new TargetCardInYourGraveyard(0, 1, new FilterCreatureCard("target creature card in your graveyard")); Target targetPlayer = new TargetPlayer(); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new ReturnToBattlefieldUnderYourControlTargetEffect(), new ManaWasSpentCondition(ColoredManaSymbol.B), "Return up to one target creature card from your graveyard to the battlefield if {B} was spent to cast {this}")); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new TorrentOfSoulsEffect(), new ManaWasSpentCondition(ColoredManaSymbol.R), " Creatures target player controls get +2/+0 and gain haste until end of turn if {R} was spent to cast {this}")); this.getSpellAbility().addTarget(targetCreature); this.getSpellAbility().addTarget(targetPlayer); this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {B}{R} was spent.)</i>")); this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); }
public IllusionistsStratagem(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); // Exile up to two target creatures you control, then return those cards to the battlefield under their owner's control. this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2, new FilterControlledCreaturePermanent("creatures you control"), false)); Effect effect = new ExileTargetForSourceEffect(); effect.setText("Exile up to two target creatures you control"); this.getSpellAbility().addEffect(effect); effect = new ReturnToBattlefieldUnderYourControlTargetEffect(true); effect.setText(", then return those cards to the battlefield under their owner's control"); this.getSpellAbility().addEffect(effect); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); }
public NephaliaSmuggler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); this.toughness = new MageInt(1); // {3}{U}, {tap}: Exile another target creature you control, then return that card to the battlefield under your control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetForSourceEffect(), new ManaCostsImpl("{3}{U}")); ability.addCost(new TapSourceCost()); ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); ability.addTarget(new TargetControlledCreaturePermanent(filter)); this.addAbility(ability); }
public RuinGhost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); // {W}, {tap}: Exile target land you control, then return it to the battlefield under your control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetForSourceEffect(), new ManaCostsImpl("{W")); ability.addCost(new TapSourceCost()); ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); ability.addTarget(new TargetPermanent(new FilterControlledLandPermanent())); this.addAbility(ability); }