@Override public ManifestEffect copy() { return new ManifestEffect(this); }
public ManifestEffect(int amount) { super(Outcome.PutCreatureInPlay); this.amount = amount; this.staticText = setText(); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { new ManifestEffect(1).apply(game, source); Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); effect.setTargetPointer(new FixedTarget(card.getId())); return effect.apply(game, source); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { new ManifestEffect(1).apply(game, source); Permanent permanent = game.getPermanent(card.getId()); if (permanent != null) { Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)); effect.setTargetPointer(new FixedTarget(permanent.getId())); return effect.apply(game, source); } } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { new ManifestEffect(1).apply(game, source); int xValue = source.getManaCostsToPay().getX(); if (xValue > 0) { Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(xValue)); effect.setTargetPointer(new FixedTarget(card.getId())); return effect.apply(game, source); } } return true; } return false; } }
public SoulSummons(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{W}"); // Manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up at any time for its mana cost if it's a creature card.) this.getSpellAbility().addEffect(new ManifestEffect(1)); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent enchantment = game.getPermanent(source.getSourceId()); if (controller != null && enchantment != null) { // manifest top card Card card = controller.getLibrary().getFromTop(game); if (card != null) { new ManifestEffect(1).apply(game, source); Permanent enchantedCreature = game.getPermanent(card.getId()); if (enchantedCreature != null) { enchantedCreature.addAttachment(enchantment.getId(), game); FilterCreaturePermanent filter = new FilterCreaturePermanent(); Target target = new TargetCreaturePermanent(filter); target.addTarget(enchantedCreature.getId(), source, game); game.addEffect(new BecomesAuraSourceEffect(target), source); } } return true; } return false; } }
public EtherealAmbush(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}{U}"); // Manifest the top two cards of your library. this.getSpellAbility().addEffect(new ManifestEffect(2)); }
controller.getLibrary().putOnTop(cardToManifest, game); new ManifestEffect(1).apply(game, source); if (controller.getLibrary().hasCards()) { Card cardToPutBack = controller.getLibrary().getFromTop(game);
public ArashinWarBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); // Whenever Arashin War Beast deals combat damage to one or more blockers, manifest the top card of your library. this.addAbility(new ArashinWarBeastTriggeredAbility(new ManifestEffect(1), false)); }
public SultaiEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); // When Sultai Emissary dies, manifest the top card of your library. this.addAbility(new DiesTriggeredAbility(new ManifestEffect(1))); }
public WhisperwoodElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); // At the beginning of your end step, manifest the top card of your library. this.addAbility(new BeginningOfEndStepTriggeredAbility(new ManifestEffect(1), TargetController.YOU, false)); // Sacrifice Whisperwood Elemental: Until end of turn, face-up, nontoken creatures you control gain "When this creature dies, manifest the top card of your library." Ability abilityToGain = new DiesTriggeredAbility(new ManifestEffect(1)); Effect effect = new GainAbilityControlledEffect(abilityToGain, Duration.EndOfTurn, filter); effect.setText("Until end of turn, face-up, nontoken creatures you control gain \"When this creature dies, manifest the top card of your library.\""); this.addAbility(new SimpleActivatedAbility( Zone.ALL, effect, new SacrificeSourceCost())); }
public PrimordialMist(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}"); // At the beginning of your end step, you may manifest the top card of your library. this.addAbility(new BeginningOfEndStepTriggeredAbility(new ManifestEffect(1), TargetController.YOU, true)); // Exile a face-down permanent you control face-up: You may play that card this turn TargetPermanent target = new TargetPermanent(filter); target.setNotTarget(true); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PrimordialMistCastFromExileEffect(), new PrimordialMistCost(target)); this.addAbility(ability); }
public TemurWarShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(5); // When Temur War Shaman enters the battlefield, manifest the top card of your library. this.addAbility(new EntersBattlefieldTriggeredAbility(new ManifestEffect(1), false)); // Whenever a permanent you control is turned face up, if it is a creature, you may have it fight target creature you don't control. Ability ability = new TemurWarShamanTriggeredAbility(); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public QarsiHighPriest(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(0); this.toughness = new MageInt(2); // {1}{B}, {t}, Sacrifice another creature: Manifest the top card of your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManifestEffect(1), new ManaCostsImpl("{1}{B}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false))); this.addAbility(ability); }
public MasteryOfTheUnseen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // Whenever a permanent you control is turned face up, you gain 1 life for each creature you control. this.addAbility(new TurnedFaceUpAllTriggeredAbility( new GainLifeEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())), new FilterControlledPermanent("a permanent you control"))); // {3}{W}: Manifest the top card of your library. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManifestEffect(1), new ManaCostsImpl("{3}{W}"))); }