@Override public ExileAllEffect copy() { return new ExileAllEffect(this); }
public ExileAllEffect(FilterPermanent filter, UUID exileId, String exileZone) { super(Outcome.Exile); this.filter = filter; this.exileZone = exileZone; this.exileId = exileId; setText(); }
@Override public boolean apply(Game game, Ability source) { Permanent creature = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); if (creature != null) { FilterPermanent filter = new FilterPermanent(); filter.add(TokenPredicate.instance); filter.add(new NamePredicate(creature.getName())); new ExileAllEffect(filter).apply(game, source); return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Card card = game.getCard(source.getFirstTarget()); if (card == null) { return false; } String cardName = card.getName(); FilterCard filter1 = new FilterCard(); filter1.add(new NamePredicate(cardName)); FilterPermanent filter2 = new FilterPermanent(); filter2.add(new NamePredicate(cardName)); return new ExileGraveyardAllPlayersEffect(filter1).apply(game, source) && new ExileAllEffect(filter2).apply(game, source); } }
public PlayOfTheGame(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{W}{W}"); // Assist this.addAbility(new AssistAbility()); // Exile all nonland permanents. this.getSpellAbility().addEffect(new ExileAllEffect(StaticFilters.FILTER_PERMANENTS_NON_LAND)); }
public PerilousVault(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {5}, {T}, Exile Perilous Vault: Exile all nonland permanents. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new ExileAllEffect(StaticFilters.FILTER_PERMANENTS_NON_LAND), new GenericManaCost(5) ); ability.addCost(new TapSourceCost()); ability.addCost(new ExileSourceCost()); this.addAbility(ability); }
public FinalJudgment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}{W}"); // Exile all creatures. this.getSpellAbility().addEffect(new ExileAllEffect(new FilterCreaturePermanent())); }
public FalseProphet(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); // When False Prophet dies, exile all creatures. this.addAbility(new DiesTriggeredAbility(new ExileAllEffect(new FilterCreaturePermanent()))); }
public FurnaceDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}{R}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); // Affinity for artifacts this.addAbility(new AffinityForArtifactsAbility()); // Flying this.addAbility(FlyingAbility.getInstance()); // When Furnace Dragon enters the battlefield, if you cast it from your hand, exile all artifacts. this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ExileAllEffect(filter), false), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, exile all artifacts."), new CastFromHandWatcher()); }
public UrzasRuinousBlast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}"); this.addSuperType(SuperType.LEGENDARY); // (You may cast a legendary sorcery only if you control a legendary creature or planeswalker.) this.addAbility(new LegendarySpellAbility()); // Exile all nonland permanents that aren't legendary. this.getSpellAbility().addEffect(new ExileAllEffect(filter)); }
public HazezonTamar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{G}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(4); // When Hazezon Tamar enters the battlefield, create X 1/1 Sand Warrior creature tokens that are red, green, and white at the beginning of your next upkeep, where X is the number of lands you control at that time. this.addAbility(new EntersBattlefieldTriggeredAbility(new HazezonTamarEntersEffect(), false)); // When Hazezon leaves the battlefield, exile all Sand Warriors. this.addAbility(new LeavesBattlefieldTriggeredAbility(new ExileAllEffect(filter), false)); }
public KalemnesCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); this.subtype.add(SubType.GIANT); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(5); this.toughness = new MageInt(5); // Vigilance this.addAbility(VigilanceAbility.getInstance()); // {5}{W}{W}: Monstrosity 3. this.addAbility(new MonstrosityAbility("{5}{W}{W}", 3)); // When Kalemne's Captain becomes monstrous, exile all artifacts and enchantments. this.addAbility(new BecomesMonstrousSourceTriggeredAbility(new ExileAllEffect(filter))); }
public SengirAutocrat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.HUMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); // When Sengir Autocrat enters the battlefield, create three 0/1 black Serf creature tokens. Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SerfToken(), 3)); this.addAbility(ability); // When Sengir Autocrat leaves the battlefield, exile all Serf tokens. ability = new LeavesBattlefieldTriggeredAbility(new ExileAllEffect(filter), false); this.addAbility(ability); }
public AngelOfTheDireHour(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); this.subtype.add(SubType.ANGEL); this.power = new MageInt(5); this.toughness = new MageInt(4); // Flash this.addAbility(FlashAbility.getInstance()); // Flying this.addAbility(FlyingAbility.getInstance()); // When Angel of the Dire Hour enters the battlefield, if you cast it from your hand, exile all attacking creatures. this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ExileAllEffect(new FilterAttackingCreature("attacking creatures")), false), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, exile all attacking creatures."), new CastFromHandWatcher()); }
public MercilessEviction(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{B}"); // Choose one - Exile all artifacts this.getSpellAbility().addEffect(new ExileAllEffect(new FilterArtifactPermanent("artifacts"))); // or exile all creatures Mode mode = new Mode(); mode.addEffect(new ExileAllEffect(FILTER_PERMANENT_CREATURES)); this.getSpellAbility().addMode(mode); // or exile all enchantments Mode mode2 = new Mode(); mode2.addEffect(new ExileAllEffect(new FilterEnchantmentPermanent("enchantments"))); this.getSpellAbility().addMode(mode2); // or exile all planeswalkers. Mode mode3 = new Mode(); mode3.addEffect(new ExileAllEffect(new FilterPlaneswalkerPermanent("planeswalkers"))); this.getSpellAbility().addMode(mode3); }
public MajorTeroh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.BIRD); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); // {3}{W}{W}, Sacrifice Major Teroh: Exile all black creatures. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileAllEffect(filter),new ManaCostsImpl("{3}{W}{W}")); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); }
public WallOfNets(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(7); // Defender this.addAbility(DefenderAbility.getInstance()); // At end of combat, exile all creatures blocked by Wall of Nets. FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures blocked by {this}"); filter.add(new BlockedByIdPredicate(this.getId())); this.addAbility(new EndOfCombatTriggeredAbility(new ExileAllEffect(filter, this.getId(), this.getIdName()), false)); // When Wall of Nets leaves the battlefield, return all cards exiled with Wall of Nets to the battlefield under their owners' control. this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnFromExileEffect(this.getId(), Zone.BATTLEFIELD, "return all cards exiled with {this} to the battlefield under their owners' control"), false)); }
public DescendUponTheSinful(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}{W}"); // Exile all creatures this.getSpellAbility().addEffect(new ExileAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES)); // <i>Delirium</i> — Create a 4/4 white Angel creature token with flying if there are four or more card types among cards in your graveyard. Effect effect = new ConditionalOneShotEffect(new CreateTokenEffect(new AngelToken()), DeliriumCondition.instance); effect.setText("<br/><i>Delirium</i> — Create a 4/4 white Angel creature token with flying if there are four or more card types among cards in your graveyard"); this.getSpellAbility().addEffect(effect); }
public NicolBolasGodPharaoh(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.BOLAS); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(7)); // +2: Target opponent exiles cards from the top of their library until he or she exiles a nonland card. Until end of turn, you may cast that card without paying its mana cost. LoyaltyAbility ability = new LoyaltyAbility(new NicolBolasGodPharaohPlusTwoEffect(), 2); ability.addTarget(new TargetOpponent()); this.addAbility(ability); // +1: Each opponent exiles two cards from their hand. this.addAbility(new LoyaltyAbility(new NicolBolasGodPharaohPlusOneEffect(), 1)); // -4: Nicol Bolas, God-Pharaoh deals 7 damage to any target. ability = new LoyaltyAbility(new DamageTargetEffect(7), -4); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // -12: Exile each nonland permanent your opponents control. this.addAbility(new LoyaltyAbility(new ExileAllEffect(opponentsNonlandPermanentsFilter), -12)); }
public ChainerDementiaMaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.MINION); this.power = new MageInt(3); this.toughness = new MageInt(3); // Nightmare creatures get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filterCreature, false))); // {B}{B}{B}, Pay 3 life: Put target creature card from a graveyard onto the battlefield under your control. That creature is black and is a Nightmare in addition to its other creature types. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChainerDementiaMasterEffect(), new ManaCostsImpl<>("{B}{B}{B}")); ability.addCost(new PayLifeCost(3)); ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard"))); this.addAbility(ability); // When Chainer, Dementia Master leaves the battlefield, exile all Nightmares. this.addAbility(new LeavesBattlefieldTriggeredAbility(new ExileAllEffect(filterPermanent), false)); }