@Override public BecomesBlackZombieAdditionEffect copy() { return new BecomesBlackZombieAdditionEffect(this); } }
public BecomesBlackZombieAdditionEffect(boolean giveBlackColor) { this(); this.giveBlackColor = giveBlackColor; updateText(); }
public LilianaDeathsMajesty(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.LILIANA); //Starting Loyalty: 5 this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5)); // +1: Create a 2/2 black Zombie creature token. Put the top two cards of your library into your graveyard. LoyaltyAbility ability = new LoyaltyAbility(new CreateTokenEffect(new ZombieToken()), 1); ability.addEffect(new PutTopCardOfLibraryIntoGraveControllerEffect(2)); this.addAbility(ability); // -3: Return target creature card from your graveyard to the battlefield. That creature is a black Zombie in addition to its other colors and types. ability = new LoyaltyAbility(new BecomesBlackZombieAdditionEffect() // because the effect has to be active for triggered effects that e.g. check if the creature entering is a Zombie, the continuous effect needs to be added before the card moving effect is applied .setText(""), -3); ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); ability.addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect() .setText("Return target creature card from your graveyard to the battlefield. That creature is a black Zombie in addition to its other colors and types")); this.addAbility(ability); // -7: Destroy all non-Zombie creatures. ability = new LoyaltyAbility(new DestroyAllEffect(filter), -7); this.addAbility(ability); }
Permanent creature; if (source.getTargets().getFirstTarget() == null) { creature = game.getPermanent(getTargetPointer().getFirst(game, source)); } else { creature = game.getPermanent(source.getTargets().getFirstTarget());
message.append(c.getName()).append(" "); message.append(" (creature card) "); ContinuousEffect effect2 = new BecomesBlackZombieAdditionEffect(false); effect2.setTargetPointer(new FixedTarget(c.getId())); game.addEffect(effect2, source);
public BecomesBlackZombieAdditionEffect() { super(Duration.Custom, Outcome.Neutral); this.giveBlackColor = true; updateText(); }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget(); if (creature != null) { creature.addCounters(CounterType.P1P1.createInstance(), source, game, event.getAppliedEffects()); ContinuousEffect effect = new BecomesBlackZombieAdditionEffect(); effect.setTargetPointer(new FixedTarget(creature.getId(), creature.getZoneChangeCounter(game) + 1)); game.addEffect(effect, source); //discard(); why? } return false; }
public BecomesBlackZombieAdditionEffect(final BecomesBlackZombieAdditionEffect effect) { super(effect); this.giveBlackColor = effect.giveBlackColor; updateText(); }
public RiseFromTheGrave(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}"); // Put target creature card from a graveyard onto the battlefield under your control. That creature is a black Zombie in addition to its other colors and types. this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard"))); this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addEffect(new BecomesBlackZombieAdditionEffect()); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return false; } Card card = game.getCard(targetPointer.getFirst(game, source)); if (card != null) { if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) { ContinuousEffect effect = new BecomesBlackZombieAdditionEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); return true; } } return false; }
public EverAfter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}"); // Return up to two target creature cards from your graveyard to the battlefield. Each of those creatures is a black Zombie in addition // to its other colors and types. Put Ever After on the bottom of its owner's library. this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, new FilterCreatureCard("creature cards from your graveyard"))); Effect effect = new BecomesBlackZombieAdditionEffect(); effect.setText("Each of those creatures is a black Zombie in addition to its other colors and types"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new ReturnToLibrarySpellEffect(false)); }
if (card != null) { controller.moveCards(card, Zone.BATTLEFIELD, source, game); ContinuousEffect effect = new BecomesBlackZombieAdditionEffect(); effect.setText("It's a black Zombie in addition to its other colors and types"); effect.setTargetPointer(new FixedTarget(card.getId()));