[EOE] Implement Extinguisher Battleship

This commit is contained in:
theelk801 2025-07-09 10:26:06 -04:00
parent 227391b2d4
commit 00df3feccd
17 changed files with 159 additions and 270 deletions

View file

@ -9,8 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
@ -20,12 +19,6 @@ import java.util.UUID;
*/
public final class AstralDragon extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public AstralDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}{U}");
@ -37,14 +30,13 @@ public final class AstralDragon extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Project Image When Astral Dragon enters the battlefield, create two tokens that are copies of target noncreature permanent, except they're 3/3 Dragon creatures in addition to their other types, and they have flying.
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(
Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenCopyTargetEffect(
null, CardType.CREATURE, false, 2, false,
false, null, 3, 3, true);
effect.setText("create two tokens that are copies of target noncreature permanent, " +
"except they're 3/3 Dragon creatures in addition to their other types, and they have flying");
effect.withAdditionalSubType(SubType.DRAGON);
Ability ability = new EntersBattlefieldTriggeredAbility(effect);
ability.addTarget(new TargetPermanent(filter));
false, null, 3, 3, true
).withAdditionalSubType(SubType.DRAGON)
.setText("create two tokens that are copies of target noncreature permanent, " +
"except they're 3/3 Dragon creatures in addition to their other types, and they have flying"));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
this.addAbility(ability.withFlavorWord("Project Image"));
}

View file

@ -1,34 +1,25 @@
package mage.cards.b;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author North
*/
public final class Bramblecrush extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public Bramblecrush(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
// Destroy target noncreature permanent.
this.getSpellAbility().addTarget(new TargetPermanent(filter));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
}
private Bramblecrush(final Bramblecrush card) {

View file

@ -1,41 +1,29 @@
package mage.cards.b;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
*
* @author North
*/
public final class BrutalizerExarch extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public BrutalizerExarch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}");
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.CLERIC);
@ -44,12 +32,13 @@ public final class BrutalizerExarch extends CardImpl {
// When Brutalizer Exarch enters the battlefield, choose one
// - Search your library for a creature card, reveal it, then shuffle your library and put that card on top of it;
TargetCardInLibrary target = new TargetCardInLibrary(new FilterCreatureCard("a creature card"));
Ability ability = new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true), false);
Ability ability = new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(
new TargetCardInLibrary(new FilterCreatureCard("a creature card")), true
), false);
// or put target noncreature permanent on the bottom of its owner's library.
Mode mode = new Mode(new BrutalizerExarchEffect2());
mode.addTarget(new TargetPermanent(filter));
ability.addMode(mode);
ability.addMode(new Mode(new PutOnLibraryTargetEffect(false))
.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE)));
this.addAbility(ability);
}
@ -62,30 +51,3 @@ public final class BrutalizerExarch extends CardImpl {
return new BrutalizerExarch(this);
}
}
class BrutalizerExarchEffect2 extends OneShotEffect {
public BrutalizerExarchEffect2() {
super(Outcome.Removal);
this.staticText = "put target noncreature permanent on the bottom of its owner's library";
}
private BrutalizerExarchEffect2(final BrutalizerExarchEffect2 effect) {
super(effect);
}
@Override
public BrutalizerExarchEffect2 copy() {
return new BrutalizerExarchEffect2(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
Player controller = game.getPlayer(source.getControllerId());
if (permanent != null && controller != null) {
return controller.putCardsOnBottomOfLibrary(permanent, game, source);
}
return false;
}
}

View file

@ -1,7 +1,5 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
@ -10,8 +8,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
@ -19,24 +16,19 @@ import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class ChainOfAcid extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public ChainOfAcid(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// Destroy target noncreature permanent. Then that permanent's controller may copy this spell and may choose a new target for that copy.
this.getSpellAbility().addEffect(new ChainOfAcidEffect());
this.getSpellAbility().addTarget(new TargetPermanent(filter));
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
}
private ChainOfAcid(final ChainOfAcid card) {

View file

@ -1,7 +1,6 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility;
@ -11,32 +10,28 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class DestructorDragon extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public DestructorDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Destructor Dragon dies, destroy target noncreature permanent.
Ability ability = new DiesSourceTriggeredAbility(new DestroyTargetEffect(), false);
ability.addTarget(new TargetPermanent(filter));
Ability ability = new DiesSourceTriggeredAbility(new DestroyTargetEffect());
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
this.addAbility(ability);
}

View file

@ -0,0 +1,57 @@
package mage.cards.e;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.StationAbility;
import mage.abilities.keyword.StationLevelAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ExtinguisherBattleship extends CardImpl {
public ExtinguisherBattleship(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{8}");
this.subtype.add(SubType.SPACECRAFT);
// When this Spacecraft enters, destroy target noncreature permanent. Then this Spacecraft deals 4 damage to each creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
ability.addEffect(new DamageAllEffect(4, StaticFilters.FILTER_PERMANENT_CREATURE).concatBy("Then"));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
this.addAbility(ability);
// Station
this.addAbility(new StationAbility());
// STATION 5+
// Flying
// Trample
// 10/10
this.addAbility(new StationLevelAbility(5)
.withLevelAbility(FlyingAbility.getInstance())
.withLevelAbility(TrampleAbility.getInstance())
.withPT(10, 10));
}
private ExtinguisherBattleship(final ExtinguisherBattleship card) {
super(card);
}
@Override
public ExtinguisherBattleship copy() {
return new ExtinguisherBattleship(this);
}
}

View file

@ -1,6 +1,7 @@
package mage.cards.m;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.KickedCondition;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -9,26 +10,18 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author North
*/
public final class MoldShambler extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public MoldShambler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.FUNGUS);
this.subtype.add(SubType.BEAST);
@ -39,9 +32,9 @@ public final class MoldShambler extends CardImpl {
this.addAbility(new KickerAbility("{1}{G}"));
// When Mold Shambler enters the battlefield, if it was kicked, destroy target noncreature permanent.
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability.withInterveningIf(KickedCondition.ONCE));
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()).withInterveningIf(KickedCondition.ONCE);
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
this.addAbility(ability);
}
private MoldShambler(final MoldShambler card) {

View file

@ -10,8 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
@ -21,12 +20,6 @@ import java.util.UUID;
*/
public final class NessianDemolok extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public NessianDemolok(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
this.subtype.add(SubType.BEAST);
@ -40,7 +33,7 @@ public final class NessianDemolok extends CardImpl {
// When Nessian Demolok enters the battlefield, if tribute wasn't paid, destroy target noncreature permanent.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect())
.withInterveningIf(TributeNotPaidCondition.instance);
ability.addTarget(new TargetPermanent(filter));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
this.addAbility(ability);
}

View file

@ -1,7 +1,5 @@
package mage.cards.n;
import java.util.UUID;
import mage.abilities.LoyaltyAbility;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -11,27 +9,22 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetPlayerOrPlaneswalker;
import java.util.UUID;
/**
*
* @author North
*/
public final class NicolBolasPlaneswalker extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public NicolBolasPlaneswalker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{B}{B}{R}");
this.supertype.add(SuperType.LEGENDARY);
@ -41,12 +34,14 @@ public final class NicolBolasPlaneswalker extends CardImpl {
// +3: Destroy target noncreature permanent.
LoyaltyAbility ability = new LoyaltyAbility(new DestroyTargetEffect(), 3);
ability.addTarget(new TargetPermanent(filter));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
this.addAbility(ability);
// -2: Gain control of target creature.
ability = new LoyaltyAbility(new GainControlTargetEffect(Duration.Custom), -2);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// -9: Nicol Bolas, Planeswalker deals 7 damage to target player. That player discards seven cards, then sacrifices seven permanents.
ability = new LoyaltyAbility(new DamageTargetEffect(7), -9);
ability.addTarget(new TargetPlayerOrPlaneswalker());

View file

@ -1,62 +1,52 @@
package mage.cards.p;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.GainLifeTargetEffect;
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class PrimalCommand extends CardImpl {
private static final FilterPermanent filterNonCreature = new FilterPermanent("noncreature permanent");
static {
filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public PrimalCommand(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
// Choose two -
this.getSpellAbility().getModes().setMinModes(2);
this.getSpellAbility().getModes().setMaxModes(2);
// Target player gains 7 life;
this.getSpellAbility().addEffect(new GainLifeTargetEffect(7));
this.getSpellAbility().addTarget(new TargetPlayer());
// or put target noncreature permanent on top of its owner's library;
Mode mode = new Mode(new PutOnLibraryTargetEffect(true));
Target target = new TargetPermanent(filterNonCreature);
mode.addTarget(target);
this.getSpellAbility().getModes().addMode(mode);
// or target player shuffles their graveyard into their library;
mode = new Mode(new PrimalCommandShuffleGraveyardEffect());
mode.addTarget(new TargetPlayer());
this.getSpellAbility().getModes().addMode(mode);
// or search your library for a creature card, reveal it, put it into your hand, then shuffle your library.
mode = new Mode(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true));
this.getSpellAbility().getModes().addMode(mode);
// or put target noncreature permanent on top of its owner's library;
this.getSpellAbility().getModes().addMode(new Mode(new PutOnLibraryTargetEffect(true))
.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE)));
// or target player shuffles their graveyard into their library;
this.getSpellAbility().getModes().addMode(new Mode(new PrimalCommandShuffleGraveyardEffect())
.addTarget(new TargetPlayer()));
// or search your library for a creature card, reveal it, put it into your hand, then shuffle your library.
this.getSpellAbility().getModes().addMode(new Mode(new SearchLibraryPutInHandEffect(
new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true
)));
}
private PrimalCommand(final PrimalCommand card) {
@ -87,14 +77,8 @@ class PrimalCommandShuffleGraveyardEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
for (Card card : player.getGraveyard().getCards(game)) {
player.moveCardToLibraryWithInfo(card, source, game, Zone.GRAVEYARD, true, true);
}
player.shuffleLibrary(source, game);
return true;
}
return false;
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
player.shuffleCardsToLibrary(player.getGraveyard(), game, source);
return true;
}
}

View file

@ -1,6 +1,6 @@
package mage.cards.r;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -9,38 +9,32 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author Wehk
*/
public final class Rootgrapple extends CardImpl {
private static final FilterPermanent filterNoncreature = new FilterPermanent("noncreature permanent");
private static final FilterPermanent filterTreefolk = new FilterPermanent("If you control a Treefolk,");
static {
filterNoncreature.add(Predicates.not(CardType.CREATURE.getPredicate()));
filterTreefolk.add(SubType.TREEFOLK.getPredicate());
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(SubType.TREEFOLK));
public Rootgrapple(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.KINDRED,CardType.INSTANT},"{4}{G}");
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.INSTANT}, "{4}{G}");
this.subtype.add(SubType.TREEFOLK);
// Destroy target noncreature permanent.
this.getSpellAbility().addTarget(new TargetPermanent(filterNoncreature));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
// If you control a Treefolk, draw a card.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1),
new PermanentsOnTheBattlefieldCondition(filterTreefolk),
"If you control a Treefolk, draw a card"));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DrawCardSourceControllerEffect(1), condition,
"If you control a Treefolk, draw a card"
));
}
private Rootgrapple(final Rootgrapple card) {

View file

@ -3,26 +3,17 @@ package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.MutatesSourceTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenControllerTargetEffect;
import mage.abilities.effects.common.CreateTokenTargetEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.MutateAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.filter.StaticFilters;
import mage.game.permanent.token.BeastToken;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
@ -31,12 +22,6 @@ import java.util.UUID;
*/
public final class SawtuskDemolisher extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public SawtuskDemolisher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
@ -53,7 +38,7 @@ public final class SawtuskDemolisher extends CardImpl {
// Whenever this creature mutates, destroy target noncreature permanent. Its controller creates a 3/3 green Beast creature token.
Ability ability = new MutatesSourceTriggeredAbility(new DestroyTargetEffect());
ability.addEffect(new CreateTokenControllerTargetEffect(new BeastToken()));
ability.addTarget(new TargetPermanent(filter));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
this.addAbility(ability);
}
@ -66,36 +51,3 @@ public final class SawtuskDemolisher extends CardImpl {
return new SawtuskDemolisher(this);
}
}
class SawtuskDemolisherEffect extends OneShotEffect {
SawtuskDemolisherEffect() {
super(Outcome.Benefit);
staticText = "destroy target noncreature permanent. Its controller creates a 3/3 green Beast creature token.";
}
private SawtuskDemolisherEffect(final SawtuskDemolisherEffect effect) {
super(effect);
}
@Override
public SawtuskDemolisherEffect copy() {
return new SawtuskDemolisherEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent == null) {
return false;
}
Player player = game.getPlayer(permanent.getControllerId());
permanent.destroy(source, game, false);
if (player == null) {
return false;
}
Effect effect = new CreateTokenTargetEffect(new BeastToken());
effect.setTargetPointer(new FixedTarget(player.getId(), game));
return effect.apply(game, source);
}
}

View file

@ -12,9 +12,8 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterLandCard;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.Target;
@ -29,11 +28,6 @@ import java.util.UUID;
*/
public final class SylvanPrimordial extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public SylvanPrimordial(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}");
this.subtype.add(SubType.AVATAR);
@ -46,7 +40,7 @@ public final class SylvanPrimordial extends CardImpl {
// When Sylvan Primordial enters the battlefield, for each opponent, destroy target noncreature permanent that player controls. For each permanent destroyed this way, search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library.
Ability ability = new EntersBattlefieldTriggeredAbility(new SylvanPrimordialEffect(), false);
ability.addTarget(new TargetPermanent(filter));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
ability.setTargetAdjuster(new ForEachPlayerTargetsAdjuster(false, true));
this.addAbility(ability);
}

View file

@ -1,4 +1,3 @@
package mage.cards.t;
import mage.MageInt;
@ -8,11 +7,10 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.ElephantToken;
@ -24,17 +22,10 @@ import java.util.Map.Entry;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class Terastodon extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public Terastodon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}{G}");
this.subtype.add(SubType.ELEPHANT);
@ -44,7 +35,7 @@ public final class Terastodon extends CardImpl {
// When Terastodon enters the battlefield, you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller creates a 3/3 green Elephant creature token.
Ability ability = new EntersBattlefieldTriggeredAbility(new TerastodonEffect(), true);
ability.addTarget(new TargetPermanent(0, 3, filter, false));
ability.addTarget(new TargetPermanent(0, 3, StaticFilters.FILTER_PERMANENT_NON_CREATURE, false));
this.addAbility(ability);
}

View file

@ -1,7 +1,5 @@
package mage.cards.w;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -12,23 +10,18 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class WoodfallPrimus extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public WoodfallPrimus(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}{G}");
this.subtype.add(SubType.TREEFOLK);
this.subtype.add(SubType.SHAMAN);
@ -37,10 +30,12 @@ public final class WoodfallPrimus extends CardImpl {
// Trample
this.addAbility(TrampleAbility.getInstance());
// When Woodfall Primus enters the battlefield, destroy target noncreature permanent.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
ability.addTarget(new TargetPermanent(filter));
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_NON_CREATURE));
this.addAbility(ability);
// Persist
this.addAbility(new PersistAbility());
}

View file

@ -55,6 +55,8 @@ public final class EdgeOfEternities extends ExpansionSet {
cards.add(new SetCardInfo("Exalted Sunborn", 318, Rarity.MYTHIC, mage.cards.e.ExaltedSunborn.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Exalted Sunborn", 358, Rarity.MYTHIC, mage.cards.e.ExaltedSunborn.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Exalted Sunborn", 384, Rarity.MYTHIC, mage.cards.e.ExaltedSunborn.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Extinguisher Battleship", 242, Rarity.RARE, mage.cards.e.ExtinguisherBattleship.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Extinguisher Battleship", 355, Rarity.RARE, mage.cards.e.ExtinguisherBattleship.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 266, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Forest", 275, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));

View file

@ -909,6 +909,13 @@ public final class StaticFilters {
FILTER_PERMANENT_BATTLES.setLockedFilter(true);
}
public static final FilterPermanent FILTER_PERMANENT_NON_CREATURE = new FilterPermanent("noncreature permanent");
static {
FILTER_PERMANENT_NON_CREATURE.add(Predicates.not(CardType.CREATURE.getPredicate()));
FILTER_PERMANENT_NON_CREATURE.setLockedFilter(true);
}
public static final FilterNonlandPermanent FILTER_PERMANENT_NON_LAND = new FilterNonlandPermanent();
static {