* Replaced some filters by StaticFilters instances.

This commit is contained in:
LevelX2 2019-12-20 23:50:01 +01:00
parent 43a11cd115
commit 0a8a9ed00d
122 changed files with 518 additions and 710 deletions

View file

@ -1,4 +1,3 @@
package mage.cards.a;
import java.util.UUID;
@ -19,7 +18,7 @@ import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -41,7 +40,7 @@ public final class AjaniValiantProtector extends CardImpl {
this.addAbility(ability);
// +1: Reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order.
this.addAbility(new LoyaltyAbility(new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.HAND, Zone.LIBRARY), 1));
this.addAbility(new LoyaltyAbility(new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_CARD_CREATURE, Zone.HAND, Zone.LIBRARY), 1));
// -11: Put X +1/+1 counters on target creature, where X is your life total. That creature gains trample until end of turn.
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(), ControllerLifeCount.instance);

View file

@ -1,4 +1,3 @@
package mage.cards.a;
import java.util.UUID;
@ -7,8 +6,8 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetControlledCreaturePermanent;
@ -24,7 +23,7 @@ public final class AltarOfBone extends CardImpl {
// As an additional cost to cast Altar of Bone, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
// Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library.
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()), true));
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true));
}
public AltarOfBone(final AltarOfBone card) {

View file

@ -1,4 +1,3 @@
package mage.cards.a;
import java.util.Set;
@ -10,7 +9,7 @@ import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
@ -24,7 +23,7 @@ import mage.target.common.TargetOpponent;
public final class AnimalMagnetism extends CardImpl {
public AnimalMagnetism(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
// Reveal the top five cards of your library. An opponent chooses a creature card from among them. Put that card onto the battlefield and the rest into your graveyard.
this.getSpellAbility().addEffect(new AnimalMagnetismEffect());
@ -76,7 +75,7 @@ class AnimalMagnetismEffect extends OneShotEffect {
controller.chooseTarget(Outcome.Detriment, target, source, game);
opponent = game.getPlayer(target.getFirstTarget());
}
TargetCard target = new TargetCard(1, Zone.LIBRARY, new FilterCreatureCard());
TargetCard target = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_CREATURE);
opponent.chooseTarget(outcome, cards, target, source, game);
cardToBattlefield = game.getCard(target.getFirstTarget());
}

View file

@ -1,4 +1,3 @@
package mage.cards.a;
import java.util.UUID;
@ -16,7 +15,7 @@ import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
@ -27,7 +26,7 @@ import mage.target.common.TargetCreaturePermanent;
public final class AvatarOfWoe extends CardImpl {
public AvatarOfWoe(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}{B}");
this.subtype.add(SubType.AVATAR);
this.power = new MageInt(6);
this.toughness = new MageInt(5);
@ -85,7 +84,7 @@ class AvatarOfWoeCostReductionEffect extends CostModificationEffectImpl {
public boolean applies(Ability abilityToModify, Ability source, Game game) {
return abilityToModify.getSourceId().equals(source.getSourceId())
&& (abilityToModify instanceof SpellAbility)
&& new CardsInAllGraveyardsCount(new FilterCreatureCard()).calculate(game, source, this) >= 10;
&& new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE).calculate(game, source, this) >= 10;
}
@Override

View file

@ -1,4 +1,3 @@
package mage.cards.b;
import java.util.UUID;
@ -18,7 +17,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.BalduvianToken;
@ -39,7 +38,7 @@ public final class BalduvianDead extends CardImpl {
// {2}{R}, Exile a creature card from your graveyard: Create a 3/1 black and red Graveborn creature token with haste. Sacrifice it at the beginning of the next end step.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BalduvianDeadEffect(), new ManaCostsImpl("{2}{R}"));
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterCreatureCard());
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE);
ability.addCost(new ExileFromGraveCost(target));
this.addAbility(ability);

View file

@ -1,4 +1,3 @@
package mage.cards.b;
import java.util.UUID;
@ -8,7 +7,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
@ -19,7 +18,7 @@ import mage.players.Player;
public final class BlossomingWreath extends CardImpl {
public BlossomingWreath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
// You gain life equal to the number of creature cards in your graveyard.
this.getSpellAbility().addEffect(new BlossomingWreathEffect());
@ -54,7 +53,7 @@ public final class BlossomingWreath extends CardImpl {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
controller.gainLife(controller.getGraveyard().count(new FilterCreatureCard(), game), game, source);
controller.gainLife(controller.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game), game, source);
return true;
}
return false;

View file

@ -1,4 +1,3 @@
package mage.cards.b;
import java.util.HashSet;
@ -16,7 +15,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInLibrary;
@ -28,7 +27,7 @@ import mage.target.common.TargetCardInLibrary;
public final class BoldwyrHeavyweights extends CardImpl {
public BoldwyrHeavyweights(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
this.subtype.add(SubType.GIANT, SubType.WARRIOR);
this.power = new MageInt(8);
this.toughness = new MageInt(8);
@ -72,7 +71,7 @@ class BoldwyrHeavyweightsEffect extends OneShotEffect {
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(opponentId);
if (opponent != null && opponent.chooseUse(Outcome.PutCreatureInPlay, "Search your library for a creature card and put it onto the battlefield?", source, game)) {
TargetCardInLibrary target = new TargetCardInLibrary(new FilterCreatureCard());
TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE);
if (opponent.searchLibrary(target, source, game)) {
Card targetCard = opponent.getLibrary().getCard(target.getFirstTarget(), game);
if (targetCard != null) {

View file

@ -1,4 +1,3 @@
package mage.cards.b;
import java.util.UUID;
@ -15,7 +14,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
* @author North
@ -30,7 +29,7 @@ public final class Bonehoard extends CardImpl {
this.addAbility(new LivingWeaponAbility());
// Equipped creature gets +X/+X, where X is the number of creature cards in all graveyards.
CardsInAllGraveyardsCount value = new CardsInAllGraveyardsCount(new FilterCreatureCard());
CardsInAllGraveyardsCount value = new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value)));
// Equip {2}

View file

@ -1,4 +1,3 @@
package mage.cards.b;
import java.util.UUID;
@ -12,7 +11,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
* @author nantuko
@ -20,12 +19,11 @@ import mage.filter.common.FilterCreatureCard;
public final class BoneyardWurm extends CardImpl {
public BoneyardWurm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.WURM);
// Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard.
DynamicValue value = new CardsInControllerGraveyardCount(new FilterCreatureCard());
DynamicValue value = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame)));
}

View file

@ -1,4 +1,3 @@
package mage.cards.b;
import java.util.UUID;
@ -16,7 +15,7 @@ import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
@ -70,7 +69,7 @@ class EnteringReturnFromGraveyardToBattlefieldEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Target target = new TargetCardInGraveyard(new FilterCreatureCard());
Target target = new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE);
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
&& controller.chooseTarget(outcome, target, source, game)) {

View file

@ -1,4 +1,3 @@
package mage.cards.b;
import java.util.UUID;
@ -10,7 +9,7 @@ import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInLibrary;
@ -21,10 +20,8 @@ import mage.target.common.TargetCardInLibrary;
*/
public final class BuriedAlive extends CardImpl {
public BuriedAlive(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library.
this.getSpellAbility().addEffect(new BuriedAliveEffect());
@ -44,7 +41,7 @@ public final class BuriedAlive extends CardImpl {
class BuriedAliveEffect extends SearchEffect {
public BuriedAliveEffect() {
super(new TargetCardInLibrary(0, 3, new FilterCreatureCard()), Outcome.Detriment);
super(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_CREATURE), Outcome.Detriment);
staticText = "Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library";
}

View file

@ -1,4 +1,3 @@
package mage.cards.c;
import java.util.UUID;
@ -17,7 +16,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -120,7 +118,7 @@ class CauldronDancePutCreatureFromHandOntoBattlefieldEffect extends OneShotEffec
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (controller.chooseUse(Outcome.PutCreatureInPlay, CHOICE_TEXT, source, game)) {
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {

View file

@ -1,5 +1,6 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
@ -14,8 +15,8 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
@ -28,8 +29,6 @@ import mage.target.targetpointer.FixedTarget;
import mage.watchers.Watcher;
import mage.watchers.common.CastFromHandWatcher;
import java.util.UUID;
/**
* @author goesta
*/
@ -86,7 +85,7 @@ class ChainerNightmareAdeptContinuousEffect extends ContinuousEffectImpl {
return false;
}
for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
for (Card card : player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
ContinuousEffect effect = new ChainerNightmareAdeptCastFromGraveyardEffect();
effect.setTargetPointer(new FixedTarget(card.getId()));
game.addEffect(effect, source);
@ -174,8 +173,8 @@ class ChainerNightmareAdeptWatcher extends Watcher {
class ChainerNightmareAdeptTriggeredAbility extends EntersBattlefieldAllTriggeredAbility {
private final static String abilityText = "Whenever a nontoken creature enters the battlefield under your control, " +
"if you didn't cast it from your hand, it gains haste until your next turn.";
private final static String abilityText = "Whenever a nontoken creature enters the battlefield under your control, "
+ "if you didn't cast it from your hand, it gains haste until your next turn.";
private final static ContinuousEffect gainHasteUntilNextTurnEffect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.UntilYourNextTurn);
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another nontoken creature");

View file

@ -1,4 +1,3 @@
package mage.cards.c;
import java.util.UUID;
@ -7,7 +6,7 @@ import mage.abilities.keyword.ConvokeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -22,7 +21,7 @@ public final class ChordOfCalling extends CardImpl {
this.addAbility(new ConvokeAbility());
// Search your library for a creature card with converted mana cost X or less and put it onto the battlefield. Then shuffle your library.
this.getSpellAbility().addEffect(new SearchLibraryWithLessCMCPutInPlayEffect(new FilterCreatureCard()));
this.getSpellAbility().addEffect(new SearchLibraryWithLessCMCPutInPlayEffect(StaticFilters.FILTER_CARD_CREATURE));
}
public ChordOfCalling(final ChordOfCalling card) {

View file

@ -1,4 +1,3 @@
package mage.cards.c;
import java.util.UUID;
@ -12,10 +11,10 @@ import mage.cards.Card;
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.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInLibrary;
@ -27,7 +26,7 @@ import mage.target.common.TargetCardInLibrary;
public final class CorpseConnoisseur extends CardImpl {
public CorpseConnoisseur(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.WIZARD);
@ -53,7 +52,7 @@ public final class CorpseConnoisseur extends CardImpl {
class SearchLibraryPutInGraveyard extends SearchEffect {
public SearchLibraryPutInGraveyard() {
super(new TargetCardInLibrary(new FilterCreatureCard()), Outcome.Neutral);
super(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), Outcome.Neutral);
staticText = "search your library for a card and put that card into your graveyard. Then shuffle your library";
}
@ -84,5 +83,4 @@ class SearchLibraryPutInGraveyard extends SearchEffect {
return false;
}
}

View file

@ -1,5 +1,3 @@
package mage.cards.c;
import java.util.UUID;
@ -10,7 +8,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
@ -19,19 +17,15 @@ import mage.target.TargetPlayer;
*
* @author LevelX2
*/
public final class CryptIncursion extends CardImpl {
public CryptIncursion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
// Exile all creature cards from target player's graveyard. You gain 3 life for each card exiled this way.
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addEffect(new CryptIncursionEffect());
}
public CryptIncursion(final CryptIncursion card) {
@ -47,8 +41,6 @@ public final class CryptIncursion extends CardImpl {
class CryptIncursionEffect extends OneShotEffect {
private static final FilterCreatureCard filter = new FilterCreatureCard();
public CryptIncursionEffect() {
super(Outcome.Detriment);
staticText = "Exile all creature cards from target player's graveyard. You gain 3 life for each card exiled this way";
@ -64,8 +56,8 @@ class CryptIncursionEffect extends OneShotEffect {
Player targetPlayer = game.getPlayer(source.getFirstTarget());
if (player != null && targetPlayer != null) {
int exiledCards = 0;
for (Card card: targetPlayer.getGraveyard().getCards(game)) {
if (filter.match(card, game)) {
for (Card card : targetPlayer.getGraveyard().getCards(game)) {
if (StaticFilters.FILTER_CARD_CREATURE.match(card, game)) {
if (card.moveToExile(null, "", source.getSourceId(), game)) {
exiledCards++;
}

View file

@ -1,4 +1,3 @@
package mage.cards.d;
import java.util.UUID;
@ -11,9 +10,9 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
import mage.filter.StaticFilters;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
/**
@ -23,13 +22,13 @@ import mage.target.common.TargetCreaturePermanent;
public final class DarigaazsCharm extends CardImpl {
public DarigaazsCharm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}{R}{G}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{R}{G}");
// Choose one - Return target creature card from your graveyard to your hand;
Effect effect = new ReturnToHandTargetEffect();
effect.setText("Return target creature card from your graveyard to your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
// or Darigaaz's Charm deals 3 damage to any target;
Mode mode = new Mode();

View file

@ -1,4 +1,3 @@
package mage.cards.d;
import java.util.ArrayList;
@ -18,7 +17,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
@ -68,7 +67,7 @@ class DeathOrGloryEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Cards cards = new CardsImpl(controller.getGraveyard().getCards(new FilterCreatureCard(), game));
Cards cards = new CardsImpl(controller.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game));
if (!cards.isEmpty()) {
TargetCard targetCards = new TargetCard(0, cards.size(), Zone.EXILED, new FilterCard("cards to put in the first pile"));
List<Card> pile1 = new ArrayList<>();

View file

@ -1,4 +1,3 @@
package mage.cards.d;
import java.util.UUID;
@ -16,8 +15,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -30,7 +28,7 @@ import mage.target.common.TargetCardInHand;
public final class Deathrender extends CardImpl {
public Deathrender(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +2/+2.
@ -72,8 +70,7 @@ class DeathrenderEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (controller != null && sourcePermanent != null) {
FilterCard filter = new FilterCreatureCard();
TargetCardInHand target = new TargetCardInHand(0, 1, filter);
TargetCardInHand target = new TargetCardInHand(0, 1, StaticFilters.FILTER_CARD_CREATURE);
if (controller.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
Card creatureInHand = game.getCard(target.getFirstTarget());
if (creatureInHand != null) {

View file

@ -1,4 +1,3 @@
package mage.cards.d;
import java.util.Set;
@ -17,7 +16,6 @@ import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.target.common.TargetCardInLibrary;
@ -32,7 +30,7 @@ public final class DefenseOfTheHeart extends CardImpl {
// At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice Defense of the Heart, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false);
ability.addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterCreatureCard()), false, Outcome.PutLandInPlay));
ability.addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_CARD_CREATURE), false, Outcome.PutLandInPlay));
DefenseOfTheHeartCondition contition = new DefenseOfTheHeartCondition();
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, contition, "At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice {this}, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library"));

View file

@ -1,4 +1,3 @@
package mage.cards.d;
import java.util.UUID;
@ -14,11 +13,11 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
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.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -28,7 +27,7 @@ import mage.target.common.TargetCreaturePermanent;
public final class DrakestownForgotten extends CardImpl {
public DrakestownForgotten(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
@ -37,7 +36,7 @@ public final class DrakestownForgotten extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(
CounterType.P1P1.createInstance(),
new CardsInAllGraveyardsCount(new FilterCreatureCard()),
new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE),
false),
"with X +1/+1 counters on it, where X is the number of creature cards in all graveyards"));

View file

@ -1,4 +1,3 @@
package mage.cards.d;
import java.util.UUID;
@ -22,11 +21,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -47,7 +46,7 @@ public final class DralnusPet extends CardImpl {
// Kicker-{2}{B}, Discard a creature card.
Costs<Cost> kickerCosts = new CostsImpl<>();
kickerCosts.add(new ManaCostsImpl<>("{2}{B}"));
kickerCosts.add(new DiscardCardCost(new FilterCreatureCard()));
kickerCosts.add(new DiscardCardCost(StaticFilters.FILTER_CARD_CREATURE));
this.addAbility(new KickerAbility(kickerCosts));
// If Dralnu's Pet was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost.
Ability ability = new EntersBattlefieldAbility(new DralnusPetEffect(), KickedCondition.instance,

View file

@ -1,4 +1,3 @@
package mage.cards.d;
import java.util.UUID;
@ -9,7 +8,7 @@ import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
@ -22,7 +21,7 @@ import mage.target.common.TargetOpponent;
public final class DubiousChallenge extends CardImpl {
public DubiousChallenge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// Look at the top ten cards of your library, exile up to two creature cards from among them, then shuffle your library. Target opponent may choose one of the exiled cards and put it onto the battlefield under their control. Put the rest onto the battlefield under your control.
getSpellAbility().addEffect(new DubiousChallengeEffect());
@ -65,7 +64,7 @@ class DubiousChallengeEffect extends OneShotEffect {
Cards topCards = new CardsImpl();
topCards.addAll(controller.getLibrary().getTopCards(game, 10));
controller.lookAtCards(sourceObject.getIdName(), topCards, game);
TargetCard targetCreatures = new TargetCard(0, 2, Zone.LIBRARY, new FilterCreatureCard());
TargetCard targetCreatures = new TargetCard(0, 2, Zone.LIBRARY, StaticFilters.FILTER_CARD_CREATURE);
controller.choose(outcome, topCards, targetCreatures, game);
Cards exiledCards = new CardsImpl(targetCreatures.getTargets());
if (!exiledCards.isEmpty()) {
@ -73,7 +72,7 @@ class DubiousChallengeEffect extends OneShotEffect {
controller.shuffleLibrary(source, game);
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
if (opponent != null) {
TargetCard targetOpponentCreature = new TargetCard(0, 1, Zone.EXILED, new FilterCreatureCard());
TargetCard targetOpponentCreature = new TargetCard(0, 1, Zone.EXILED, StaticFilters.FILTER_CARD_CREATURE);
DubiousChallengeMoveToBattlefieldEffect opponentEffect = (DubiousChallengeMoveToBattlefieldEffect) source.getEffects().get(1);
DubiousChallengeMoveToBattlefieldEffect controllerEffect = (DubiousChallengeMoveToBattlefieldEffect) source.getEffects().get(2);
if (opponent.choose(outcome, exiledCards, targetOpponentCreature, game)) {
@ -111,8 +110,7 @@ class DubiousChallengeMoveToBattlefieldEffect extends OneShotEffect {
return new DubiousChallengeMoveToBattlefieldEffect(this);
}
public void setPlayerAndCards(Player targetPlayer, Cards targetCards)
{
public void setPlayerAndCards(Player targetPlayer, Cards targetCards) {
this.player = targetPlayer;
this.cards = targetCards;
}

View file

@ -1,4 +1,3 @@
package mage.cards.e;
import java.util.UUID;
@ -11,10 +10,10 @@ import mage.cards.Card;
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.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInGraveyard;
@ -26,14 +25,14 @@ import mage.target.common.TargetCardInGraveyard;
public final class EaterOfTheDead extends CardImpl {
public EaterOfTheDead(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add(SubType.HORROR);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// {0}: If Eater of the Dead is tapped, exile target creature card from a graveyard and untap Eater of the Dead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new EaterOfTheDeadEffect(), new GenericManaCost(0));
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
ability.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE));
this.addAbility(ability);
}
@ -48,6 +47,7 @@ public final class EaterOfTheDead extends CardImpl {
}
class EaterOfTheDeadEffect extends OneShotEffect {
EaterOfTheDeadEffect() {
super(Outcome.DestroyPermanent);
staticText = "If {this} is tapped, exile target creature card from a graveyard and untap {this}";

View file

@ -1,4 +1,3 @@
package mage.cards.e;
import java.util.UUID;
@ -8,7 +7,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -20,7 +19,7 @@ public final class EnshrinedMemories extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}");
// Reveal the top X cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order.
this.getSpellAbility().addEffect(new RevealLibraryPutIntoHandEffect(ManacostVariableValue.instance, new FilterCreatureCard(), Zone.LIBRARY, true));
this.getSpellAbility().addEffect(new RevealLibraryPutIntoHandEffect(ManacostVariableValue.instance, StaticFilters.FILTER_CARD_CREATURE, Zone.LIBRARY, true));
}
public EnshrinedMemories(final EnshrinedMemories card) {

View file

@ -1,4 +1,3 @@
package mage.cards.e;
import java.util.UUID;
@ -17,7 +16,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInHand;
/**
@ -27,7 +26,7 @@ import mage.target.common.TargetCardInHand;
public final class ErebossEmissary extends CardImpl {
public ErebossEmissary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.SNAKE);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
@ -41,7 +40,7 @@ public final class ErebossEmissary extends CardImpl {
new BoostSourceEffect(2, 2, Duration.EndOfTurn),
new SourceHasSubtypeCondition(SubType.AURA),
"{this} gets +2/+2 until end of turn. If Erebos's Emissary is an Aura, enchanted creature gets +2/+2 until end of turn instead"),
new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard()))));
new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE))));
// Enchanted creature gets +3/+3
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield)));

View file

@ -1,4 +1,3 @@
package mage.cards.e;
import java.util.UUID;
@ -11,8 +10,8 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetControlledCreaturePermanent;
/**
@ -25,7 +24,7 @@ public final class EvolutionaryLeap extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
// {G}, Sacrifice a creature: Reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.HAND, Zone.LIBRARY), new ManaCostsImpl("{G}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_CARD_CREATURE, Zone.HAND, Zone.LIBRARY), new ManaCostsImpl("{G}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
this.addAbility(ability);
}

View file

@ -1,4 +1,3 @@
package mage.cards.e;
import java.util.UUID;
@ -16,7 +15,7 @@ import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -27,7 +26,7 @@ import mage.target.common.TargetCreaturePermanent;
public final class ExoskeletalArmor extends CardImpl {
public ExoskeletalArmor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
this.subtype.add(SubType.AURA);
// Enchant creature
@ -37,7 +36,7 @@ public final class ExoskeletalArmor extends CardImpl {
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards.
CardsInAllGraveyardsCount count = new CardsInAllGraveyardsCount(new FilterCreatureCard());
CardsInAllGraveyardsCount count = new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE);
Effect effect = new BoostEnchantedEffect(count, count, Duration.WhileOnBattlefield);
effect.setText("Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

View file

@ -1,4 +1,3 @@
package mage.cards.e;
import java.util.UUID;
@ -9,7 +8,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.Target;
@ -22,7 +21,7 @@ import mage.target.common.TargetCardInGraveyard;
public final class ExtractFromDarkness extends CardImpl {
public ExtractFromDarkness(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}{B}");
// Each player puts the top two cards of their library into their graveyard.
this.getSpellAbility().addEffect(new ExtractFromDarknessMillEffect());
@ -88,7 +87,7 @@ class ExtractFromDarknessReturnFromGraveyardToBattlefieldEffect extends OneShotE
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Target target = new TargetCardInGraveyard(new FilterCreatureCard());
Target target = new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE);
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
&& controller.chooseTarget(outcome, target, source, game)) {

View file

@ -1,5 +1,3 @@
package mage.cards.f;
import java.util.UUID;
@ -13,10 +11,10 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInHand;
import mage.target.common.TargetCardInLibrary;
@ -27,7 +25,7 @@ import mage.target.common.TargetCardInLibrary;
public final class FaunaShaman extends CardImpl {
public FaunaShaman(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SHAMAN);
@ -36,10 +34,10 @@ public final class FaunaShaman extends CardImpl {
// {G}, {tap}, Discard a creature card: Search your library for a creature card, reveal it, and put it into your hand. Then shuffle your library.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()), true),
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true),
new ColoredManaCost(ColoredManaSymbol.G));
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard())));
ability.addCost(new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE)));
this.addAbility(ability);
}

View file

@ -1,4 +1,3 @@
package mage.cards.f;
import java.util.UUID;
@ -9,20 +8,20 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
* @author LoneFox
*
*/
public final class FerozsBan extends CardImpl {
public FerozsBan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
// Creature spells cost {2} more to cast.
Effect effect = new SpellsCostIncreasementAllEffect(new FilterCreatureCard(), 2);
Effect effect = new SpellsCostIncreasementAllEffect(StaticFilters.FILTER_CARD_CREATURE, 2);
effect.setText("Creature spells cost {2} more to cast.");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}

View file

@ -1,4 +1,3 @@
package mage.cards.f;
import java.util.UUID;
@ -12,7 +11,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -67,7 +66,7 @@ class FlashEffect extends OneShotEffect {
return false;
}
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {

View file

@ -1,4 +1,3 @@
package mage.cards.f;
import java.util.UUID;
@ -12,7 +11,7 @@ import mage.constants.Outcome;
import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -29,7 +28,7 @@ public final class FleshBlood extends SplitCard {
// Flesh
// Exile target creature card from a graveyard. Put X +1/+1 counters on target creature, where X is the power of the card you exiled.
Target target = new TargetCardInGraveyard(new FilterCreatureCard());
Target target = new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE);
getLeftHalfCard().getSpellAbility().addTarget(target);
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
getLeftHalfCard().getSpellAbility().addEffect(new FleshEffect());

View file

@ -1,4 +1,3 @@
package mage.cards.f;
import java.util.UUID;
@ -10,7 +9,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.stack.StackObject;
import mage.players.Player;
@ -24,7 +23,7 @@ import mage.target.common.TargetCardInHand;
public final class FoldIntoAether extends CardImpl {
public FoldIntoAether(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
// Counter target spell. If that spell is countered this way, its controller may put a creature card from their hand onto the battlefield.
this.getSpellAbility().addEffect(new FoldIntoAetherEffect());
@ -66,7 +65,7 @@ class FoldIntoAetherEffect extends OneShotEffect {
spellController = game.getPlayer(stackObject.getControllerId());
}
if (game.getStack().counter(targetId, source.getSourceId(), game)) {
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
if (spellController != null
&& target.canChoose(source.getSourceId(), spellController.getId(), game)
&& spellController.chooseUse(Outcome.Neutral, "Put a creature card from your hand in play?", source, game)

View file

@ -1,6 +1,6 @@
package mage.cards.f;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
@ -14,15 +14,13 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
*
* @author dustinconrad
@ -30,12 +28,12 @@ import java.util.UUID;
public final class FootstepsOfTheGoryo extends CardImpl {
public FootstepsOfTheGoryo(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
this.subtype.add(SubType.ARCANE);
// Return target creature card from your graveyard to the battlefield. Sacrifice that creature at the beginning of the next end step.
this.getSpellAbility().addEffect(new FootstepsOfTheGoryoEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
}
public FootstepsOfTheGoryo(final FootstepsOfTheGoryo card) {

View file

@ -1,4 +1,3 @@
package mage.cards.f;
import java.util.UUID;
@ -10,11 +9,8 @@ import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.filter.StaticFilters;
/**
*
@ -22,19 +18,13 @@ import mage.filter.predicate.permanent.ControllerPredicate;
*/
public final class Foster extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
static {
filter.add(new ControllerPredicate(TargetController.YOU));
}
public Foster(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}");
// Whenever a creature you control dies, you may pay {1}. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest into your graveyard.
Ability ability = new DiesCreatureTriggeredAbility(
new DoIfCostPaid(new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.HAND, Zone.GRAVEYARD), new GenericManaCost(1)),
false, filter);
new DoIfCostPaid(new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_CARD_CREATURE, Zone.HAND, Zone.GRAVEYARD), new GenericManaCost(1)),
false, StaticFilters.FILTER_CONTROLLED_A_CREATURE);
this.addAbility(ability);
}

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -13,7 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -28,7 +27,7 @@ public final class Gamekeeper extends CardImpl {
this.toughness = new MageInt(2);
// When Gamekeeper dies, you may exile it. If you do, reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and put all other cards revealed this way into your graveyard.
Ability ability = new DiesTriggeredAbility(new DoIfCostPaid(new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.BATTLEFIELD, Zone.GRAVEYARD), new ExileSourceFromGraveCost(), "Exile to reveal cards from the top of your library until you reveal a creature card?"), false);
Ability ability = new DiesTriggeredAbility(new DoIfCostPaid(new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_CARD_CREATURE, Zone.BATTLEFIELD, Zone.GRAVEYARD), new ExileSourceFromGraveCost(), "Exile to reveal cards from the top of your library until you reveal a creature card?"), false);
this.addAbility(ability);
}

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -19,8 +18,8 @@ import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -82,7 +81,7 @@ class GarrukTheVeilCursedValue implements DynamicValue {
public int calculate(Game game, Ability sourceAbility, Effect effect) {
Player player = game.getPlayer(sourceAbility.getControllerId());
if (player != null) {
return player.getGraveyard().getCards(new FilterCreatureCard(), game).size();
return player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game).size();
}
return 0;
}
@ -142,8 +141,7 @@ class GarrukTheVeilCursedEffect extends OneShotEffect {
if (sacrificed) {
// search
FilterCreatureCard filter = new FilterCreatureCard();
TargetCardInLibrary targetInLibrary = new TargetCardInLibrary(filter);
TargetCardInLibrary targetInLibrary = new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE);
Cards cards = new CardsImpl();
if (controller.searchLibrary(targetInLibrary, source, game)) {
for (UUID cardId : targetInLibrary.getTargets()) {

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -13,7 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
* @author nantuko
@ -21,7 +20,7 @@ import mage.filter.common.FilterCreatureCard;
public final class GarruksHorde extends CardImpl {
public GarruksHorde(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}");
this.subtype.add(SubType.BEAST);
this.power = new MageInt(7);
@ -31,7 +30,7 @@ public final class GarruksHorde extends CardImpl {
// Play with the top card of your library revealed.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect()));
// You may cast the top card of your library if it's a creature card.
Effect effect = new PlayTheTopCardEffect(new FilterCreatureCard());
Effect effect = new PlayTheTopCardEffect(StaticFilters.FILTER_CARD_CREATURE);
effect.setText("You may cast the top card of your library if it's a creature card");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -21,7 +20,7 @@ import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.NamePredicate;
@ -58,7 +57,7 @@ public final class GateToTheAfterlife extends CardImpl {
// {2}, {T}, Sacrifice Gate to the Afterlife: Search your graveyard, hand, and/or library for a card named God-Pharaoh's Gift and put it onto the battlefield. If you seearch your library this way, shuffle it. Activate this ability only if there are six or more creature cards in your graveyard.
ability = new ConditionalActivatedAbility(
Zone.BATTLEFIELD, new GateToTheAfterlifeEffect(), new GenericManaCost(2),
new CardsInControllerGraveCondition(6, new FilterCreatureCard())
new CardsInControllerGraveCondition(6, StaticFilters.FILTER_CARD_CREATURE)
);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -13,6 +12,7 @@ import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.players.Player;
@ -25,7 +25,7 @@ import mage.target.TargetCard;
public final class GatherThePack extends CardImpl {
public GatherThePack(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
// Reveal the top five cards of your library. You may put a creature card from among them into your hand. Put the rest into your graveyard.
// <i>Spell mastery</i> If there are two or more instant and/or sorcery cards in your graveyard, put up to two creature cards from among the revealed cards into your hand instead of one.
@ -64,7 +64,7 @@ class GatherThePackEffect extends OneShotEffect {
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));
if (!cards.isEmpty()) {
controller.revealCards(sourceObject.getIdName(), cards, game);
int creatures = cards.count(new FilterCreatureCard(), source.getSourceId(), source.getControllerId(), game);
int creatures = cards.count(StaticFilters.FILTER_CARD_CREATURE, source.getSourceId(), source.getControllerId(), game);
if (creatures > 0) {
int max = 1;
if (SpellMasteryCondition.instance.apply(game, source) && creatures > 1) {

View file

@ -1,6 +1,6 @@
package mage.cards.g;
import java.util.*;
import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCosts;
@ -15,13 +15,11 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
import java.util.*;
/**
*
* @author LevelX2
@ -29,7 +27,7 @@ import java.util.*;
public final class GhastlyConscription extends CardImpl {
public GhastlyConscription(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{B}{B}");
// Exile all creature cards from target player's graveyard in a face-down pile, shuffle that pile, then manifest those cards.<i> (To manifest a card, 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.)</i>
this.getSpellAbility().addEffect(new GhastlyConscriptionEffect());
@ -68,7 +66,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
if (controller != null && targetPlayer != null) {
List<Card> cardsToManifest = new ArrayList<>();
for (Card card : targetPlayer.getGraveyard().getCards(new FilterCreatureCard(), game)) {
for (Card card : targetPlayer.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
cardsToManifest.add(card);
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true);
}

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -11,7 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TimingRule;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -20,11 +19,10 @@ import mage.filter.common.FilterCreatureCard;
public final class GnawToTheBone extends CardImpl {
public GnawToTheBone(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// You gain 2 life for each creature card in your graveyard.
DynamicValue value = new CardsInControllerGraveyardCount(new FilterCreatureCard(), 2);
DynamicValue value = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE, 2);
this.getSpellAbility().addEffect(new GainLifeEffect(value));
// Flashback {2}{G}

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -11,9 +10,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.FilterCard;
import mage.filter.common.FilterArtifactCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterEnchantmentCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterInstantOrSorceryCard;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.game.Game;
@ -80,11 +77,11 @@ class GoblinTutorEffect extends OneShotEffect {
if (amount == 2) {
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, filter), true);
} else if (amount == 3) {
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterEnchantmentCard()), true);
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_ENTCHANTMENT), true);
} else if (amount == 4) {
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterArtifactCard()), true);
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_ARTIFACT), true);
} else if (amount == 5) {
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterCreatureCard()), true);
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_CREATURE), true);
} else if (amount == 6) {
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterInstantOrSorceryCard()), true);
}

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -14,12 +13,11 @@ import mage.abilities.keyword.DredgeAbility;
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.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -31,7 +29,7 @@ import mage.players.Player;
public final class GolgariGraveTroll extends CardImpl {
public GolgariGraveTroll(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.subtype.add(SubType.TROLL);
this.subtype.add(SubType.SKELETON);
@ -60,13 +58,6 @@ public final class GolgariGraveTroll extends CardImpl {
class GolgariGraveTrollEffect extends OneShotEffect {
private static final FilterCreatureCard filter = new FilterCreatureCard();
static {
filter.add(new CardTypePredicate(CardType.CREATURE));
}
public GolgariGraveTrollEffect() {
super(Outcome.BoostCreature);
}
@ -80,7 +71,7 @@ class GolgariGraveTrollEffect extends OneShotEffect {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanentEntering(source.getSourceId());
if (permanent != null && player != null) {
int amount = player.getGraveyard().count(filter, game);
int amount = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
if (amount > 0) {
permanent.addCounters(CounterType.P1P1.createInstance(amount), source, game);
}

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -10,7 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -20,14 +19,14 @@ import mage.target.common.TargetCreaturePermanent;
public final class GraveStrength extends CardImpl {
public GraveStrength(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Choose target creature. Put the top three cards of your library into your graveyard, then put a +1/+1 counter on that creature for each creature card in your graveyard.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
Effect effect = new PutTopCardOfLibraryIntoGraveControllerEffect(3);
effect.setText("Choose target creature. Put the top three cards of your library into your graveyard");
this.getSpellAbility().addEffect(effect);
effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new CardsInControllerGraveyardCount(new FilterCreatureCard()));
effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE));
effect.setText(", then put a +1/+1 counter on that creature for each creature card in your graveyard");
this.getSpellAbility().addEffect(effect);

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -16,7 +15,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -34,7 +33,7 @@ public final class GraveUpheaval extends CardImpl {
// Put target creature card from a graveyard onto the battlefield under your control. It gains haste.
this.getSpellAbility().addEffect(new GraveUpheavalEffect());
this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
this.getSpellAbility().addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE));
// Basic landcycling {2}
this.addAbility(new BasicLandcyclingAbility(new ManaCostsImpl("{2}")));

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -10,9 +9,9 @@ import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreatureCard;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
@ -23,7 +22,7 @@ import mage.players.Player;
public final class GravebladeMarauder extends CardImpl {
public GravebladeMarauder(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(1);
@ -67,7 +66,7 @@ class GravebladeMarauderEffect extends OneShotEffect {
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
Player controller = game.getPlayer(source.getControllerId());
if (targetPlayer != null && controller != null) {
targetPlayer.loseLife(controller.getGraveyard().count(new FilterCreatureCard(), game), game, false);
targetPlayer.loseLife(controller.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game), game, false);
return true;
}
return false;

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -7,7 +6,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -16,11 +15,10 @@ import mage.filter.common.FilterCreatureCard;
public final class GrimFlowering extends CardImpl {
public GrimFlowering(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{G}");
// Draw a card for each creature card in your graveyard.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new CardsInControllerGraveyardCount(new FilterCreatureCard())));
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE)));
}
public GrimFlowering(final GrimFlowering card) {

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.Set;
@ -15,8 +14,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterLandCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
@ -96,8 +94,8 @@ class GuidedPassageEffect extends OneShotEffect {
controller.chooseTarget(Outcome.Detriment, target, source, game);
opponent = game.getPlayer(target.getFirstTarget());
}
TargetCard target1 = new TargetCard(1, Zone.LIBRARY, new FilterCreatureCard());
TargetCard target2 = new TargetCard(1, Zone.LIBRARY, new FilterLandCard());
TargetCard target1 = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_CREATURE);
TargetCard target2 = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_LAND);
TargetCard target3 = new TargetCard(1, Zone.LIBRARY, new FilterCard(filter));
opponent.chooseTarget(Outcome.Detriment, cards, target1, source, game);
opponent.chooseTarget(Outcome.Detriment, cards, target2, source, game);

View file

@ -1,4 +1,3 @@
package mage.cards.h;
import java.util.UUID;
@ -15,7 +14,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.util.RandomUtil;
@ -27,7 +26,7 @@ import mage.util.RandomUtil;
public final class HauntedFengraf extends CardImpl {
public HauntedFengraf(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// {tap}: Add {C}.
this.addAbility(new ColorlessManaAbility());
@ -68,7 +67,7 @@ class HauntedFengrafEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
Card[] cards = player.getGraveyard().getCards(new FilterCreatureCard(), game).toArray(new Card[0]);
Card[] cards = player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game).toArray(new Card[0]);
if (cards.length > 0) {
Card card = cards[RandomUtil.nextInt(cards.length)];
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);

View file

@ -1,4 +1,3 @@
package mage.cards.h;
import java.util.UUID;
@ -8,7 +7,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetPlayerOrPlaneswalker;
/**
@ -21,7 +20,7 @@ public final class HauntingMisery extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
// As an additional cost to cast Haunting Misery, exile X creature cards from your graveyard.
this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCreatureCard()));
this.getSpellAbility().addCost(new ExileXFromYourGraveCost(StaticFilters.FILTER_CARD_CREATURE));
// Haunting Misery deals X damage to target player.
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
this.getSpellAbility().addEffect(new DamageTargetEffect(GetXValue.instance));

View file

@ -1,5 +1,3 @@
package mage.cards.h;
import java.util.UUID;
@ -10,6 +8,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.players.Player;
@ -18,11 +17,10 @@ import mage.players.Player;
*
* @author L_J
*/
public final class HonorTheFallen extends CardImpl {
public HonorTheFallen(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// Exile all creature cards from all graveyards. You gain 1 life for each card exiled this way.
this.getSpellAbility().addEffect(new HonorTheFallenEffect());
@ -60,8 +58,8 @@ class HonorTheFallenEffect extends OneShotEffect {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
for (Card card: player.getGraveyard().getCards(game)) {
if (filter.match(card, game)) {
for (Card card : player.getGraveyard().getCards(game)) {
if (StaticFilters.FILTER_CARD_CREATURE.match(card, source.getSourceId(), controller.getId(), game)) {
if (card.moveToExile(null, "", source.getSourceId(), game)) {
exiledCards++;
}

View file

@ -1,4 +1,3 @@
package mage.cards.i;
import java.util.Set;
@ -11,7 +10,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
@ -58,7 +57,7 @@ class ImmortalServitudeEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player you = game.getPlayer(source.getControllerId());
int count = source.getManaCostsToPay().getX();
Set<Card> cards = you.getGraveyard().getCards(new FilterCreatureCard(), game);
Set<Card> cards = you.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game);
for (Card card : cards) {
if (card != null && card.getConvertedManaCost() == count) {
card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);

View file

@ -1,4 +1,3 @@
package mage.cards.i;
import java.util.UUID;
@ -8,7 +7,7 @@ import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -17,10 +16,10 @@ import mage.filter.common.FilterCreatureCard;
public final class InvigoratingFalls extends CardImpl {
public InvigoratingFalls(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
// You gain life equal to the number of creature cards in all graveyards.
Effect effect = new GainLifeEffect(new CardsInAllGraveyardsCount(new FilterCreatureCard()));
Effect effect = new GainLifeEffect(new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE));
effect.setText("You gain life equal to the number of creature cards in all graveyards.");
this.getSpellAbility().addEffect(effect);
}

View file

@ -1,4 +1,3 @@
package mage.cards.j;
import java.util.UUID;
@ -19,7 +18,6 @@ import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetControlledPermanent;
@ -48,7 +46,7 @@ public final class JaradGolgariLichLord extends CardImpl {
this.toughness = new MageInt(2);
// Jarad, Golgari Lich Lord gets +1/+1 for each creature card in your graveyard.
DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCreatureCard());
DynamicValue amount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
this.addAbility(ability);

View file

@ -1,4 +1,3 @@
package mage.cards.k;
import java.util.HashMap;
@ -13,11 +12,9 @@ import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.BearToken;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
import mage.players.Player;
import mage.target.common.TargetCardInHand;
@ -29,7 +26,7 @@ import mage.target.common.TargetCardInHand;
public final class KamahlsSummons extends CardImpl {
public KamahlsSummons(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// Each player may reveal any number of creature cards from their hand. Then each player creates a 2/2 green Bear creature token for each card they revealed this way.
getSpellAbility().addEffect(new KamahlsSummonsEffect());
@ -47,8 +44,6 @@ public final class KamahlsSummons extends CardImpl {
class KamahlsSummonsEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCreatureCard();
public KamahlsSummonsEffect() {
super(Outcome.Benefit);
this.staticText = "Each player may reveal any number of creature cards from their hand. Then each player creates a 2/2 green Bear creature token for each card they revealed this way";
@ -68,12 +63,12 @@ class KamahlsSummonsEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && sourceObject != null) {
Map<UUID,Integer> revealedCards = new HashMap<>();
Map<UUID, Integer> revealedCards = new HashMap<>();
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
if (player.getHand().count(filter, game) > 0) {
TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter);
if (player.getHand().count(StaticFilters.FILTER_CARD_CREATURE, game) > 0) {
TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, StaticFilters.FILTER_CARD_CREATURE);
if (player.choose(outcome, target, source.getSourceId(), game)) {
Cards cards = new CardsImpl(target.getTargets());
controller.revealCards(sourceObject.getIdName(), cards, game);
@ -83,7 +78,7 @@ class KamahlsSummonsEffect extends OneShotEffect {
}
}
Token token = new BearToken();
for (Map.Entry<UUID, Integer> revealedCardsByPlayer: revealedCards.entrySet()) {
for (Map.Entry<UUID, Integer> revealedCardsByPlayer : revealedCards.entrySet()) {
int value = revealedCardsByPlayer.getValue();
if (value > 0) {
token.putOntoBattlefield(value, game, source.getSourceId(), revealedCardsByPlayer.getKey());

View file

@ -13,7 +13,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.Spell;
@ -72,7 +72,7 @@ class KaradorGhostChieftainCostReductionEffect extends CostModificationEffectImp
public boolean apply(Game game, Ability source, Ability abilityToModify) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
int reductionAmount = player.getGraveyard().count(new FilterCreatureCard(), game);
int reductionAmount = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
CardUtil.reduceCost(abilityToModify, reductionAmount);
return true;
}
@ -118,7 +118,7 @@ class KaradorGhostChieftainContinuousEffect extends ContinuousEffectImpl {
|| !game.isActivePlayer(player.getId())) {
return false;
}
for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
for (Card card : player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
ContinuousEffect effect = new KaradorGhostChieftainCastFromGraveyardEffect();
effect.setTargetPointer(new FixedTarget(card.getId()));
game.addEffect(effect, source);
@ -160,8 +160,8 @@ class KaradorGhostChieftainCastFromGraveyardEffect extends AsThoughEffectImpl {
&& affectedControllerId != null
&& objectCard.getSpellAbility().spellCanBeActivatedRegularlyNow(affectedControllerId, game)) {
if (affectedControllerId.equals(source.getControllerId())) {
KaradorGhostChieftainWatcher watcher =
game.getState().getWatcher(KaradorGhostChieftainWatcher.class, source.getSourceId());
KaradorGhostChieftainWatcher watcher
= game.getState().getWatcher(KaradorGhostChieftainWatcher.class, source.getSourceId());
return watcher != null
&& !watcher.isAbilityUsed();
}

View file

@ -1,4 +1,3 @@
package mage.cards.k;
import java.util.UUID;
@ -11,7 +10,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.WolfToken;
import mage.players.Player;
@ -23,7 +22,7 @@ import mage.players.Player;
public final class KessigCagebreakers extends CardImpl {
public KessigCagebreakers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
@ -65,7 +64,7 @@ class KessigCagebreakersEffect extends OneShotEffect {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
WolfToken token = new WolfToken();
int count = player.getGraveyard().count(new FilterCreatureCard(), game);
int count = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
for (int i = 0; i < count; i++) {
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), true, true);
}

View file

@ -1,4 +1,3 @@
package mage.cards.k;
import java.util.UUID;
@ -28,7 +27,7 @@ import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
@ -85,7 +84,7 @@ class KheruLichLordEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Cards cards = new CardsImpl(controller.getGraveyard().getCards(new FilterCreatureCard(), source.getSourceId(), source.getControllerId(), game));
Cards cards = new CardsImpl(controller.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, source.getSourceId(), source.getControllerId(), game));
Card card = cards.getRandom(game);
if (card != null) {
controller.moveCards(card, Zone.BATTLEFIELD, source, game);

View file

@ -9,7 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -27,7 +27,7 @@ public final class KraulForagers extends CardImpl {
// Undergrowth When Kraul Foragers enters the battlefield, you gain 1 life for each creature card in your graveyard.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new GainLifeEffect(new CardsInControllerGraveyardCount(new FilterCreatureCard())),
new GainLifeEffect(new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE)),
false, "<i>Undergrowth</i> &mdash; "
));
}

View file

@ -1,4 +1,3 @@
package mage.cards.l;
import java.util.UUID;
@ -10,13 +9,13 @@ import mage.abilities.effects.ContinuousEffectImpl;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
@ -27,7 +26,7 @@ import mage.players.Player;
public final class Lhurgoyf extends CardImpl {
public Lhurgoyf(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.subtype.add(SubType.LHURGOYF);
this.power = new MageInt(0);
@ -73,7 +72,7 @@ class LhurgoyfEffect extends ContinuousEffectImpl {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
number += player.getGraveyard().count(new FilterCreatureCard(), game);
number += player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
}
}

View file

@ -1,6 +1,8 @@
package mage.cards.l;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
@ -11,20 +13,16 @@ import mage.cards.Card;
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.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInLibrary;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
@ -80,7 +78,7 @@ class LilianaVessEffect extends OneShotEffect {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
creatureCards.addAll(player.getGraveyard().getCards(new FilterCreatureCard(), game));
creatureCards.addAll(player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game));
}
}
controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, false, null);

View file

@ -1,4 +1,3 @@
package mage.cards.l;
import java.util.UUID;
@ -11,10 +10,10 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
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.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -23,13 +22,13 @@ import mage.filter.common.FilterCreatureCard;
public final class LilianasElite extends CardImpl {
public LilianasElite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Liliana's Elite gets +1/+1 for each creature card in your graveyard.
DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCreatureCard());
DynamicValue amount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
this.addAbility(ability);
}

View file

@ -1,4 +1,3 @@
package mage.cards.l;
import java.util.Set;
@ -13,7 +12,7 @@ import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
@ -25,7 +24,7 @@ import mage.target.TargetPlayer;
public final class LilianasIndignation extends CardImpl {
public LilianasIndignation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}");
// Put the top X cards of your library into your graveyard. Target player loses 2 life for each creature card put into your graveyard this way.
this.getSpellAbility().addEffect(new LilianasIndignationEffect());
@ -70,7 +69,7 @@ class LilianasIndignationEffect extends OneShotEffect {
Set<Card> movedCards = controller.moveCardsToGraveyardWithInfo(cardsToGraveyard.getCards(game), source, game, Zone.LIBRARY);
Cards cardsMoved = new CardsImpl();
cardsMoved.addAll(movedCards);
int creatures = cardsMoved.count(new FilterCreatureCard(), game);
int creatures = cardsMoved.count(StaticFilters.FILTER_CARD_CREATURE, game);
if (creatures > 0) {
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
if (targetPlayer != null) {

View file

@ -1,4 +1,3 @@
package mage.cards.l;
import java.util.HashMap;
@ -16,7 +15,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -68,11 +66,10 @@ class LivingDeathEffect extends OneShotEffect {
Map<UUID, Set<Card>> exiledCards = new HashMap<>();
// Move creature cards from graveyard to exile
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
Set<Card> cardsPlayer = player.getGraveyard().getCards(new FilterCreatureCard(), game);
Set<Card> cardsPlayer = player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game);
if (!cardsPlayer.isEmpty()) {
exiledCards.put(player.getId(), cardsPlayer);
player.moveCards(cardsPlayer, Zone.EXILED, source, game);
@ -82,14 +79,12 @@ class LivingDeathEffect extends OneShotEffect {
game.applyEffects();
// Sacrifice all creatures
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game)) {
permanent.sacrifice(source.getSourceId(), game);
}
game.applyEffects();
// Exiled cards are put onto the battlefield at the same time under their owner's control
Set<Card> cardsToReturnFromExile = new HashSet<>();
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
Player player = game.getPlayer(playerId);

View file

@ -1,4 +1,3 @@
package mage.cards.l;
import java.util.HashMap;
@ -17,7 +16,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -77,7 +75,7 @@ class LivingEndEffect extends OneShotEffect {
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
Set<Card> cardsPlayer = player.getGraveyard().getCards(new FilterCreatureCard(), game);
Set<Card> cardsPlayer = player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game);
if (!cardsPlayer.isEmpty()) {
exiledCards.put(player.getId(), cardsPlayer);
player.moveCards(cardsPlayer, Zone.EXILED, source, game);

View file

@ -15,7 +15,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
@ -76,8 +76,8 @@ class LordOfTheVoidEffect extends OneShotEffect {
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 7));
controller.moveCards(cards, Zone.EXILED, source, game);
if (!cards.getCards(new FilterCreatureCard(), game).isEmpty()) {
TargetCard target = new TargetCard(Zone.EXILED, new FilterCreatureCard());
if (!cards.getCards(StaticFilters.FILTER_CARD_CREATURE, game).isEmpty()) {
TargetCard target = new TargetCard(Zone.EXILED, StaticFilters.FILTER_CARD_CREATURE);
if (controller.chooseTarget(outcome, cards, target, source, game)) {
Card card = cards.get(target.getFirstTarget(), game);
if (card != null) {

View file

@ -1,4 +1,3 @@
package mage.cards.m;
import java.util.UUID;
@ -13,11 +12,11 @@ import mage.abilities.keyword.FlyingAbility;
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.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
@ -30,7 +29,7 @@ import mage.players.Player;
public final class MagisterOfWorth extends CardImpl {
public MagisterOfWorth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{B}");
this.subtype.add(SubType.ANGEL);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
@ -120,7 +119,7 @@ class MagisterOfWorthReturnFromGraveyardEffect extends OneShotEffect {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.moveCards(player.getGraveyard().getCards(new FilterCreatureCard(), game), Zone.BATTLEFIELD, source, game);
player.moveCards(player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game), Zone.BATTLEFIELD, source, game);
}
}
return true;

View file

@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInHand;
@ -68,10 +68,10 @@ class MindMaggotsEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int numToDiscard = controller.getAmount(0,
controller.getHand().getCards(new FilterCreatureCard(), game).size(),
controller.getHand().getCards(StaticFilters.FILTER_CARD_CREATURE, game).size(),
"Discard how many creature cards?",
game);
TargetCardInHand target = new TargetCardInHand(numToDiscard, new FilterCreatureCard());
TargetCardInHand target = new TargetCardInHand(numToDiscard, StaticFilters.FILTER_CARD_CREATURE);
if (controller.choose(Outcome.Benefit, target, source.getSourceId(), game)) {
for (UUID targetId : target.getTargets()) {
Card card = game.getCard(targetId);

View file

@ -1,4 +1,3 @@
package mage.cards.m;
import java.util.Set;
@ -18,7 +17,7 @@ import mage.constants.Outcome;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
@ -43,7 +42,7 @@ public final class MomirVigSimicVisionary extends CardImpl {
}
public MomirVigSimicVisionary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{U}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WIZARD);
@ -52,7 +51,7 @@ public final class MomirVigSimicVisionary extends CardImpl {
this.toughness = new MageInt(2);
// Whenever you cast a green creature spell, you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it.
Effect effect = new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(new FilterCreatureCard()), true, true);
Effect effect = new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true);
effect.setText("you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it");
this.addAbility(new SpellCastControllerTriggeredAbility(effect, filter, true));

View file

@ -1,4 +1,3 @@
package mage.cards.m;
import java.util.UUID;
@ -9,7 +8,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TimingRule;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
/**
@ -19,12 +18,11 @@ import mage.target.common.TargetCardInYourGraveyard;
public final class MorgueTheft extends CardImpl {
public MorgueTheft(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Return target creature card from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
// Flashback {4}{B}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{B}"), TimingRule.SORCERY));

View file

@ -1,4 +1,3 @@
package mage.cards.m;
import java.util.UUID;
@ -11,7 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
@ -22,7 +21,7 @@ import mage.players.Player;
public final class MortalCombat extends CardImpl {
public MortalCombat(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
// At the beginning of your upkeep, if twenty or more creature cards are in your graveyard, you win the game.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
@ -43,11 +42,9 @@ public final class MortalCombat extends CardImpl {
class TwentyGraveyardCreatureCondition implements Condition {
private static final FilterCreatureCard filter = new FilterCreatureCard();
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
return player != null && player.getGraveyard().count(filter, game) >= 20;
return player != null && player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) >= 20;
}
}

View file

@ -1,4 +1,3 @@
package mage.cards.n;
import java.util.UUID;
@ -12,8 +11,8 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game;
import mage.game.permanent.token.ZombieToken;
@ -33,7 +32,7 @@ public final class NecromancersCovenant extends CardImpl {
}
public NecromancersCovenant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{B}{B}");
// When Necromancer's Covenant enters the battlefield, exile all creature cards from target player's graveyard, then create a 2/2 black Zombie creature token for each card exiled this way.
Ability ability = new EntersBattlefieldTriggeredAbility(new NecromancersConvenantEffect(), false);
@ -72,7 +71,7 @@ class NecromancersConvenantEffect extends OneShotEffect {
return false;
}
int count = 0;
for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
for (Card card : player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
if (card.moveToExile(source.getSourceId(), "Necromancer Covenant", source.getSourceId(), game)) {
count += 1;
}

View file

@ -1,4 +1,3 @@
package mage.cards.n;
import java.util.UUID;
@ -17,7 +16,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.ZombieToken;
import mage.players.Player;
@ -29,12 +28,12 @@ import mage.target.common.TargetCardInHand;
public final class NecromancersStockpile extends CardImpl {
public NecromancersStockpile(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
// {1}{B}, Discard a creature card: Draw a card.
// If the discarded card was a Zombie card, create a tapped 2/2 black Zombie creature token.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{1}{B}"));
ability.addCost(new NecromancersStockpileDiscardTargetCost(new TargetCardInHand(new FilterCreatureCard())));
ability.addCost(new NecromancersStockpileDiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE)));
ability.addEffect(new NecromancersStockpilePutTokenEffect());
this.addAbility(ability);
}
@ -67,7 +66,7 @@ class NecromancersStockpileDiscardTargetCost extends CostImpl {
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
if (targets.choose(Outcome.Discard, controllerId, sourceId, game)) {
Player player = game.getPlayer(controllerId);
if(player != null) {
if (player != null) {
for (UUID targetId : targets.get(0).getTargets()) {
Card card = player.getHand().get(targetId, game);
if (card == null) {

View file

@ -1,6 +1,6 @@
package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -12,13 +12,10 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.players.Player;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author LevelX2
*/
@ -32,7 +29,7 @@ public final class NemesisOfMortals extends CardImpl {
this.toughness = new MageInt(5);
// Nemesis of Mortals costs {1} less to cast for each creature card in your graveyard.
Ability ability = new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(new FilterCreatureCard()));
Ability ability = new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(StaticFilters.FILTER_CARD_CREATURE));
ability.setRuleAtTheTop(true);
this.addAbility(ability);

View file

@ -1,4 +1,3 @@
package mage.cards.n;
import java.util.UUID;
@ -16,7 +15,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
@ -27,7 +26,7 @@ import mage.players.Player;
public final class NetherSpirit extends CardImpl {
public NetherSpirit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(2);
@ -56,7 +55,7 @@ class NetherSpiritCondition implements Condition {
if (player != null) {
Card card = game.getCard(source.getSourceId());
if (card != null) {
return player.getGraveyard().contains(card.getId()) && player.getGraveyard().count(new FilterCreatureCard(), game) == 1;
return player.getGraveyard().contains(card.getId()) && player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) == 1;
}
}
return false;

View file

@ -1,4 +1,3 @@
package mage.cards.n;
import java.util.UUID;
@ -14,10 +13,10 @@ import mage.abilities.keyword.BestowAbility;
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.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -26,7 +25,7 @@ import mage.filter.common.FilterCreatureCard;
public final class Nighthowler extends CardImpl {
public Nighthowler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{B}{B}");
this.subtype.add(SubType.HORROR);
this.power = new MageInt(0);
@ -35,7 +34,7 @@ public final class Nighthowler extends CardImpl {
// Bestow {2}{B}{B}
this.addAbility(new BestowAbility(this, "{2}{B}{B}"));
// Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.
DynamicValue graveCreatures = new CardsInAllGraveyardsCount(new FilterCreatureCard());
DynamicValue graveCreatures = new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE);
Effect effect = new BoostSourceEffect(graveCreatures, graveCreatures, Duration.WhileOnBattlefield);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
effect = new BoostEnchantedEffect(graveCreatures, graveCreatures, Duration.WhileOnBattlefield);

View file

@ -1,4 +1,3 @@
package mage.cards.o;
import java.util.UUID;
@ -13,7 +12,6 @@ import mage.constants.CardType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInGraveyard;
/**
@ -27,7 +25,7 @@ public final class OversoldCemetery extends CardImpl {
// At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, true);
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
ability.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE));
CardsInControllerGraveCondition condition = new CardsInControllerGraveCondition(4, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand."));
}

View file

@ -1,6 +1,6 @@
package mage.cards.p;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
@ -15,11 +15,9 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
*
* @author LevelX2
@ -30,18 +28,18 @@ public final class PalaceSiege extends CardImpl {
private static final String ruleTrigger2 = "&bull Dragons &mdash; At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.";
public PalaceSiege(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}");
// As Palace Siege enters the battlefield, choose Khans or Dragons.
this.addAbility(new EntersBattlefieldAbility(new ChooseModeEffect("Khans or Dragons?","Khans", "Dragons"),null,
"As {this} enters the battlefield, choose Khans or Dragons.",""));
this.addAbility(new EntersBattlefieldAbility(new ChooseModeEffect("Khans or Dragons?", "Khans", "Dragons"), null,
"As {this} enters the battlefield, choose Khans or Dragons.", ""));
// * Khans - At the beginning of your upkeep, return target creature card from your graveyard to your hand.
Ability ability1 = new ConditionalTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, false),
new ModeChoiceSourceCondition("Khans"),
ruleTrigger1);
ability1.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
ability1.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
this.addAbility(ability1);
// * Dragons - At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.

View file

@ -1,4 +1,3 @@
package mage.cards.p;
import java.util.UUID;
@ -9,10 +8,10 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
@ -34,7 +33,7 @@ public final class Paleoloth extends CardImpl {
private static final String rule = "Whenever another creature with power 5 or greater enters the battlefield under your control, you may return target creature card from your graveyard to your hand.";
public Paleoloth(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.BEAST);
this.power = new MageInt(5);
@ -42,7 +41,7 @@ public final class Paleoloth extends CardImpl {
// Whenever another creature with power 5 or greater enters the battlefield under your control, you may return target creature card from your graveyard to your hand.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), filter, true, rule);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
this.addAbility(ability);
}

View file

@ -1,5 +1,6 @@
package mage.cards.p;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.DiesAttachedTriggeredAbility;
import mage.abilities.effects.Effect;
@ -12,13 +13,11 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SetTargetPointer;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author LevelX2
*/
@ -36,7 +35,7 @@ public final class PatternOfRebirth extends CardImpl {
this.addAbility(ability);
// When enchanted creature dies, that creature's controller may search their library for a creature card and put that card onto the battlefield. If that player does, they shuffle their library.
Effect effect = new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(new FilterCreatureCard()), false, false, Outcome.PutCreatureInPlay);
Effect effect = new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), false, false, Outcome.PutCreatureInPlay);
effect.setText("that creature's controller may search their library for a creature card and put that card onto the battlefield. If that player does, they shuffle their library");
this.addAbility(new DiesAttachedTriggeredAbility(effect, "enchanted creature", true, true, SetTargetPointer.ATTACHED_TO_CONTROLLER));

View file

@ -1,4 +1,3 @@
package mage.cards.p;
import java.util.UUID;
@ -14,7 +13,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
@ -62,7 +60,7 @@ class CreatureCardsInControllerGraveCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
Player p = game.getPlayer(source.getControllerId());
if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value) {
if (p != null && p.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) >= value) {
return true;
}
return false;

View file

@ -1,4 +1,3 @@
package mage.cards.p;
import java.util.UUID;
@ -15,7 +14,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
@ -32,13 +31,13 @@ import mage.target.common.TargetCardInLibrary;
public final class PrimalCommand extends CardImpl {
private static final FilterPermanent filterNonCreature = new FilterPermanent("noncreature permanent");
static {
filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
}
public PrimalCommand(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
// Choose two -
this.getSpellAbility().getModes().setMinModes(2);
@ -59,7 +58,7 @@ public final class PrimalCommand extends CardImpl {
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();
mode.addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard()), true, true));
mode.addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true));
this.getSpellAbility().getModes().addMode(mode);
}
@ -94,7 +93,7 @@ class PrimalCommandShuffleGraveyardEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
for (Card card: player.getGraveyard().getCards(game)) {
for (Card card : player.getGraveyard().getCards(game)) {
player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD, true, true);
}
player.shuffleLibrary(source, game);

View file

@ -1,6 +1,6 @@
package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
@ -14,13 +14,11 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author Quercitron
*/
@ -54,8 +52,6 @@ public final class RagMan extends CardImpl {
class RagManDiscardEffect extends OneShotEffect {
private static final FilterCreatureCard filter = new FilterCreatureCard();
public RagManDiscardEffect() {
super(Outcome.Discard);
this.staticText = "and discards a creature card at random";
@ -77,7 +73,7 @@ class RagManDiscardEffect extends OneShotEffect {
Cards creatureCardsInHand = new CardsImpl();
for (UUID cardId : player.getHand()) {
Card card = player.getHand().get(cardId, game);
if (filter.match(card, game)) {
if (StaticFilters.FILTER_CARD_CREATURE.match(card, game)) {
creatureCardsInHand.add(card);
}
}

View file

@ -1,4 +1,3 @@
package mage.cards.r;
import java.util.Set;
@ -13,7 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
@ -25,8 +24,7 @@ import mage.target.TargetPlayer;
public final class Repopulate extends CardImpl {
public Repopulate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Shuffle all creature cards from target player's graveyard into that player's library.
this.getSpellAbility().addTarget(new TargetPlayer());
@ -60,9 +58,8 @@ class RepopulateEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
Set<Card> cards = player.getGraveyard().getCards(new FilterCreatureCard(), game);
for(Card card : cards)
{
Set<Card> cards = player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game);
for (Card card : cards) {
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
}
player.shuffleLibrary(source, game);

View file

@ -1,4 +1,3 @@
package mage.cards.r;
import java.util.UUID;
@ -11,7 +10,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.RitualOfTheReturnedZombieToken;
import mage.players.Player;
@ -28,7 +27,7 @@ public final class RitualOfTheReturned extends CardImpl {
// Exile target creature card from your graveyard. Create a black Zombie creature token with power equal to the exiled card's power and toughness equal to the exiled card's toughness.
this.getSpellAbility().addEffect(new RitualOfTheReturnedExileEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
}
public RitualOfTheReturned(final RitualOfTheReturned card) {

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -7,8 +6,8 @@ import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -17,7 +16,7 @@ import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
@ -35,7 +34,7 @@ public final class Seance extends CardImpl {
// At the beginning of each upkeep, you may exile target creature card from your graveyard. If you do, create a token that's a copy of that card except it's a Spirit in addition to its other types. Exile it at the beginning of the next end step.
Ability ability = new BeginningOfUpkeepTriggeredAbility(new SeanceEffect(), TargetController.ANY, true);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
this.addAbility(ability);
}

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -11,9 +10,9 @@ import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreatureCard;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.SeedGuardianToken;
import mage.players.Player;
@ -66,7 +65,7 @@ class SeedGuardianEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int creaturesInGraveyard = controller.getGraveyard().count(new FilterCreatureCard(), game);
int creaturesInGraveyard = controller.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
return new CreateTokenEffect(new SeedGuardianToken(creaturesInGraveyard)).apply(game, source);
}
return false;

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -18,7 +17,6 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
@ -83,7 +81,7 @@ class CreatureCardsInControllerGraveCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
Player p = game.getPlayer(source.getControllerId());
if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value) {
if (p != null && p.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game) >= value) {
return true;
}
return false;

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -15,7 +14,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -24,14 +23,14 @@ import mage.filter.common.FilterCreatureCard;
public final class ShadowsOfThePast extends CardImpl {
public ShadowsOfThePast(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
// Whenever a creature dies, scry 1.
this.addAbility(new DiesCreatureTriggeredAbility(new ScryEffect(1), false));
// {4}{B}: Each opponent loses 2 life and you gain 2 life. Activate this ability only if there are four or more creature cards in your graveyard.
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new LoseLifeOpponentsEffect(2), new ManaCostsImpl<>("{4}{B}"), new CardsInControllerGraveCondition(4, new FilterCreatureCard()));
new LoseLifeOpponentsEffect(2), new ManaCostsImpl<>("{4}{B}"), new CardsInControllerGraveCondition(4, StaticFilters.FILTER_CARD_CREATURE));
Effect effect = new GainLifeEffect(2);
effect.setText("and you gain 2 life");
ability.addEffect(effect);

View file

@ -1,6 +1,8 @@
package mage.cards.s;
import java.util.UUID;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.SearchEffect;
@ -8,24 +10,19 @@ import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
*
* @author Plopman
*/
public final class SignalTheClans extends CardImpl {
public SignalTheClans (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{G}");
public SignalTheClans(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{G}");
// Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library.
this.getSpellAbility().addEffect(new SignalTheClansEffect());
@ -43,9 +40,8 @@ public final class SignalTheClans extends CardImpl {
class SignalTheClansEffect extends SearchEffect {
public SignalTheClansEffect() {
super(new TargetCardInLibrary(3, new FilterCreatureCard()), Outcome.DrawCard);
super(new TargetCardInLibrary(3, StaticFilters.FILTER_CARD_CREATURE), Outcome.DrawCard);
staticText = "Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library";
}
@ -68,9 +64,9 @@ class SignalTheClansEffect extends SearchEffect {
if (player.searchLibrary(target, source, game)) {
if (!target.getTargets().isEmpty()) {
Cards cards = new CardsImpl();
for (UUID cardId: target.getTargets()) {
for (UUID cardId : target.getTargets()) {
Card card = player.getLibrary().remove(cardId, game);
if (card != null){
if (card != null) {
cards.add(card);
}
}
@ -78,14 +74,14 @@ class SignalTheClansEffect extends SearchEffect {
player.revealCards("Reveal", cards, game);
Card cardsArray[] = cards.getCards(game).toArray(new Card[0]);
//If you reveal three cards with different names
if(Stream.of(cardsArray).map(MageObject::getName).collect(Collectors.toSet()).size() == 3){
if (Stream.of(cardsArray).map(MageObject::getName).collect(Collectors.toSet()).size() == 3) {
//Choose one of them at random and put that card into your hand
Card randomCard = cards.getRandom(game);
randomCard.moveToZone(Zone.HAND, source.getSourceId(), game, true);
cards.remove(randomCard);
}
//Shuffle the rest into your library
for(Card card : cards.getCards(game)){
for (Card card : cards.getCards(game)) {
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
}
}

View file

@ -1,5 +1,7 @@
package mage.cards.s;
import java.util.LinkedList;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -12,7 +14,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
import mage.constants.*;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.BlockedByIdPredicate;
@ -23,9 +25,6 @@ import mage.players.Player;
import mage.target.TargetCard;
import mage.target.common.TargetCreaturePermanent;
import java.util.LinkedList;
import java.util.UUID;
/**
* @author jeffwadsworth
*/
@ -87,7 +86,7 @@ class SistersOfStoneDeathEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
CardsImpl cardsInExile = new CardsImpl();
TargetCard target = new TargetCard(Zone.EXILED, new FilterCreatureCard());
TargetCard target = new TargetCard(Zone.EXILED, StaticFilters.FILTER_CARD_CREATURE);
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
ExileZone exile = game.getExile().getExileZone(exileId);

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -24,7 +23,7 @@ import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
@ -41,7 +40,7 @@ import mage.watchers.common.LifeLossOtherFromCombatWatcher;
public final class SithMagic extends CardImpl {
public SithMagic(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{B}{R}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}{R}");
// <i>Hate</i> &mdash; At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield.
TriggeredAbility triggeredAbility = new BeginningOfCombatTriggeredAbility(new SithMagicEffect(), TargetController.ANY, true);
@ -50,7 +49,7 @@ public final class SithMagic extends CardImpl {
triggeredAbility,
HateCondition.instance,
"<i>Hate</i> &mdash; At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield.");
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
ability.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE));
this.addAbility(ability, new LifeLossOtherFromCombatWatcher());
}

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -10,10 +9,10 @@ import mage.abilities.keyword.FlyingAbility;
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.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInHand;
/**
@ -23,7 +22,7 @@ import mage.target.common.TargetCardInHand;
public final class SkyshroudVampire extends CardImpl {
public SkyshroudVampire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
this.subtype.add(SubType.VAMPIRE);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
@ -34,8 +33,8 @@ public final class SkyshroudVampire extends CardImpl {
// Discard a creature card: Skyshroud Vampire gets +2/+2 until end of turn.
this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new BoostSourceEffect(2,2, Duration.EndOfTurn),
new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard()))));
new BoostSourceEffect(2, 2, Duration.EndOfTurn),
new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE))));
}
public SkyshroudVampire(final SkyshroudVampire card) {

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -19,7 +18,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -33,7 +32,7 @@ import mage.target.targetpointer.FixedTarget;
public final class SneakAttack extends CardImpl {
public SneakAttack(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
// {R}: You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice the creature at the beginning of the next end step.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SneakAttackEffect(), new ManaCostsImpl("{R}")));
@ -72,7 +71,7 @@ class SneakAttackEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) {
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE);
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.Set;
@ -17,7 +16,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
@ -76,7 +75,7 @@ class SongOfBloodEffect extends OneShotEffect {
Set<Card> movedCards = controller.moveCardsToGraveyardWithInfo(cardsToGraveyard.getCards(game), source, game, Zone.LIBRARY);
Cards cardsMoved = new CardsImpl();
cardsMoved.addAll(movedCards);
int creatures = cardsMoved.count(new FilterCreatureCard(), game);
int creatures = cardsMoved.count(StaticFilters.FILTER_CARD_CREATURE, game);
if (creatures > 0) {
// Setup a delayed trigger to give +X/+0 to any creature attacking this turn..
DelayedTriggeredAbility delayedAbility = new SongOfBloodTriggeredAbility(creatures);

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -8,7 +7,7 @@ import mage.abilities.effects.mana.DynamicManaEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
/**
*
@ -17,10 +16,10 @@ import mage.filter.common.FilterCreatureCard;
public final class SongsOfTheDamned extends CardImpl {
public SongsOfTheDamned(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
// Add {B} for each creature card in your graveyard.
DynamicManaEffect effect = new DynamicManaEffect(Mana.BlackMana(1), new CardsInControllerGraveyardCount(new FilterCreatureCard()));
DynamicManaEffect effect = new DynamicManaEffect(Mana.BlackMana(1), new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE));
this.getSpellAbility().addEffect(effect);
}

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -10,7 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TimingRule;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.game.permanent.token.SpiderToken;
/**
@ -23,7 +22,7 @@ public final class SpiderSpawning extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
// Create a 1/2 green Spider creature token with reach for each creature card in your graveyard.
this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiderToken(), new CardsInControllerGraveyardCount(new FilterCreatureCard())));
this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiderToken(), new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE)));
// Flashback {6}{B}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{6}{B}"), TimingRule.SORCERY));
}

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;
@ -6,7 +5,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInLibrary;
/**
@ -16,11 +15,10 @@ import mage.target.common.TargetCardInLibrary;
public final class SylvanTutor extends CardImpl {
public SylvanTutor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
// Search your library for a creature card and reveal that card. Shuffle your library, then put the card on top of it.
this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(new FilterCreatureCard()), true, true));
this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true));
}
public SylvanTutor(final SylvanTutor card) {

Some files were not shown because too many files have changed in this diff Show more