remove some unneeded filter classes, add static filters

related to #13734
This commit is contained in:
xenohedron 2025-06-08 01:52:14 -04:00
parent 663ada11d1
commit 47f2a4fbe5
101 changed files with 326 additions and 476 deletions

View file

@ -14,7 +14,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.common.FilterHistoricCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
@ -24,7 +24,10 @@ import java.util.UUID;
*/
public final class AbstergoEntertainment extends CardImpl {
private static final FilterCard filter = new FilterHistoricCard("historic card from your graveyard");
private static final FilterCard filter = new FilterCard("historic card from your graveyard");
static {
filter.add(HistoricPredicate.instance);
}
public AbstergoEntertainment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");

View file

@ -18,9 +18,8 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.FilterSpell;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.game.permanent.token.SoldierToken;
@ -31,7 +30,6 @@ import java.util.UUID;
*/
public final class AlistairTheBrigadier extends CardImpl {
private static final FilterSpell filter = new FilterHistoricSpell();
private static final FilterPermanent filter2 = new FilterControlledPermanent("historic permanents you control");
static {
@ -52,7 +50,7 @@ public final class AlistairTheBrigadier extends CardImpl {
// Whenever you cast a historic spell, create a 1/1 white Soldier creature token.
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new SoldierToken()), filter, false
new CreateTokenEffect(new SoldierToken()), StaticFilters.FILTER_SPELL_HISTORIC, false
));
// Whenever Alistair attacks, you may pay {8}. If you do, creatures you control get +X/+X until end of turn, where X is the number of historic permanents you control.

View file

@ -12,7 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterNoncreatureCard;
import mage.filter.predicate.Predicates;
import mage.target.TargetPermanent;
import mage.target.common.TargetCardInLibrary;
@ -22,9 +22,10 @@ import mage.target.common.TargetCardInLibrary;
*/
public final class ArcumDagsson extends CardImpl {
private static final FilterCard filter = new FilterNoncreatureCard("noncreature artifact card");
private static final FilterCard filter = new FilterCard("noncreature artifact card");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
filter.add(CardType.ARTIFACT.getPredicate());
}

View file

@ -1,24 +1,30 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterArtifactSpell;
import mage.filter.FilterSpell;
import mage.target.TargetSpell;
import java.util.UUID;
/**
*
* @author Jgod
*/
public final class ArtifactBlast extends CardImpl {
private static final FilterSpell filter = new FilterSpell("artifact spell");
static {
filter.add(CardType.ARTIFACT.getPredicate());
}
public ArtifactBlast(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}");
// Counter target artifact spell.
this.getSpellAbility().addTarget(new TargetSpell(new FilterArtifactSpell()));
this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addEffect(new CounterTargetEffect());
}

View file

@ -19,7 +19,7 @@ import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterNoncreatureCard;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.events.DamageEvent;
import mage.game.events.GameEvent;
@ -33,7 +33,11 @@ import java.util.UUID;
*/
public final class ArtistsTalent extends CardImpl {
private static final FilterCard filter = new FilterNoncreatureCard("noncreature spells");
private static final FilterCard filter = new FilterCard("noncreature spells");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public ArtistsTalent(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");

View file

@ -13,7 +13,6 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.SpiritToken;
@ -27,7 +26,7 @@ public final class BakuAltar extends CardImpl {
public BakuAltar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Baku Altar.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance(1)), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance(1)), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// {2}, {tap}, Remove a ki counter from Baku Altar: Create a 1/1 colorless Spirit creature token.
Ability ability = new SimpleActivatedAbility(new CreateTokenEffect(new SpiritToken(), 1), new GenericManaCost(2));
ability.addCost(new TapSourceCost());

View file

@ -9,7 +9,7 @@ import mage.constants.CardType;
import mage.constants.SagaChapter;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterHistoricCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
import java.util.UUID;
@ -18,7 +18,10 @@ import java.util.UUID;
*/
public final class BalladOfTheBlackFlag extends CardImpl {
private static final FilterCard filter = new FilterHistoricCard();
private static final FilterCard filter = new FilterCard("historic card");
static {
filter.add(HistoricPredicate.instance);
}
public BalladOfTheBlackFlag(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}");

View file

@ -14,7 +14,6 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterSpell;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactSpell;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.game.permanent.token.PowerstoneToken;
@ -26,9 +25,10 @@ import java.util.UUID;
public final class BatteryBearer extends CardImpl {
private static final FilterSpell filter
= new FilterArtifactSpell("an artifact spell with mana value 6 or greater");
= new FilterSpell("an artifact spell with mana value 6 or greater");
static {
filter.add(CardType.ARTIFACT.getPredicate());
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 5));
}

View file

@ -37,7 +37,7 @@ public final class BlademaneBaku extends CardImpl {
this.toughness = new MageInt(1);
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Blademane Baku.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// {1}, Remove X ki counters from Blademane Baku: For each counter removed, Blademane Baku gets +2/+0 until end of turn.
Effect effect = new BoostSourceEffect(xValue, StaticValue.get(0), Duration.EndOfTurn);

View file

@ -10,9 +10,10 @@ import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreatureOrPlaneswalkerPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -67,11 +68,15 @@ class BlotOutEffect extends OneShotEffect {
}
}
private static final FilterPermanent filter = new FilterControlledCreatureOrPlaneswalkerPermanent(
private static final FilterPermanent filter = new FilterControlledPermanent(
"creature or planeswalker you control with the greatest mana value"
);
static {
filter.add(Predicates.or(
CardType.CREATURE.getPredicate(),
CardType.PLANESWALKER.getPredicate()
));
filter.add(BlotOutPredicate.instance);
}

View file

@ -33,7 +33,7 @@ public final class BounteousKirin extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's converted mana cost.
this.addAbility(new SpellCastControllerTriggeredAbility(
new BounteousKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
new BounteousKirinEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE,
true, SetTargetPointer.SPELL
));
}

View file

@ -27,7 +27,7 @@ public final class BriarknitKami extends CardImpl {
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Whenever you cast a Spirit or Arcane spell, put a +1/+1 counter on target creature.
Ability ability = new SpellCastControllerTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -40,7 +40,7 @@ public final class BudokaPupil extends CardImpl {
this.flipCardName = "Ichiga, Who Topples Oaks";
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Budoka Pupil.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// At the beginning of the end step, if there are two or more ki counters on Budoka Pupil, you may flip it.
this.addAbility(new BeginningOfEndStepTriggeredAbility(

View file

@ -12,7 +12,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
/**
*
@ -32,7 +32,7 @@ public final class CabalPaladin extends CardImpl {
this.addAbility(new SpellCastControllerTriggeredAbility(
new DamagePlayersEffect(Outcome.Damage, StaticValue.get(2), TargetController.OPPONENT)
.setText("{this} deals 2 damage to each opponent. <i>(Artifacts, legendaries, and Sagas are historic.)</i>"),
new FilterHistoricSpell(), false
StaticFilters.FILTER_SPELL_HISTORIC, false
));
}

View file

@ -43,7 +43,7 @@ public final class CallowJushi extends CardImpl {
this.flipCardName = "Jaraku the Interloper";
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Callow Jushi.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// At the beginning of the end step, if there are two or more ki counters on Callow Jushi, you may flip it.
this.addAbility(new BeginningOfEndStepTriggeredAbility(

View file

@ -36,7 +36,7 @@ public final class CelestialKirin extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Spirit or Arcane spell, destroy all permanents with that spell's converted mana cost.
this.addAbility(new SpellCastControllerTriggeredAbility(
new CelestialKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
new CelestialKirinEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE,
false, SetTargetPointer.SPELL
));
}

View file

@ -35,7 +35,7 @@ public final class CloudhoofKirin extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Spirit or Arcane spell, you may have target player put the top X cards of their library into their graveyard, where X is that spell's converted mana cost.
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CloudhoofKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true, SetTargetPointer.SPELL);
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CloudhoofKirinEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true, SetTargetPointer.SPELL);
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}

View file

@ -9,7 +9,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.common.FilterHistoricCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
import java.util.UUID;
@ -18,7 +18,10 @@ import java.util.UUID;
*/
public final class CrystalSkullIsuSpyglass extends CardImpl {
private static final FilterCard filter = new FilterHistoricCard("play historic lands and cast historic spells");
private static final FilterCard filter = new FilterCard("play historic lands and cast historic spells");
static {
filter.add(HistoricPredicate.instance);
}
public CrystalSkullIsuSpyglass(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{U}{U}");

View file

@ -39,7 +39,7 @@ public final class CunningBandit extends CardImpl {
this.flipCardName = "Azamuki, Treachery Incarnate";
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Cunning Bandit.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// At the beginning of the end step, if there are two or more ki counters on Cunning Bandit, you may flip it.
this.addAbility(new BeginningOfEndStepTriggeredAbility(

View file

@ -16,7 +16,6 @@ import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.filter.FilterSpell;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactSpell;
import mage.target.TargetPermanent;
import mage.target.TargetSpell;
@ -27,9 +26,10 @@ import java.util.UUID;
*/
public final class DrafnaFounderOfLatNam extends CardImpl {
private static final FilterSpell filter = new FilterArtifactSpell("artifact spell you control");
private static final FilterSpell filter = new FilterSpell("artifact spell you control");
static {
filter.add(CardType.ARTIFACT.getPredicate());
filter.add(TargetController.YOU.getControllerPredicate());
}

View file

@ -28,7 +28,7 @@ public final class Dreamcatcher extends CardImpl {
// Whenever you cast a Spirit or Arcane spell, you may sacrifice Dreamcatcher. If you do, draw a card.
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(
new DrawCardSourceControllerEffect(1), new SacrificeSourceCost()
), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private Dreamcatcher(final Dreamcatcher card) {

View file

@ -34,7 +34,7 @@ public final class Earthshaker extends CardImpl {
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// Whenever you cast a Spirit or Arcane spell, Earthshaker deals 2 damage to each creature without flying.
this.addAbility(new SpellCastControllerTriggeredAbility(new DamageAllEffect(StaticValue.get(2) , creatureFilter), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new DamageAllEffect(StaticValue.get(2) , creatureFilter), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private Earthshaker(final Earthshaker card) {

View file

@ -27,7 +27,7 @@ public final class ElderPineOfJukai extends CardImpl {
this.toughness = new MageInt(1);
// Whenever you cast a Spirit or Arcane spell, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest on the bottom of your library in any order.
this.addAbility(new SpellCastControllerTriggeredAbility(new RevealLibraryPutIntoHandEffect(3, StaticFilters.FILTER_CARD_LANDS, Zone.LIBRARY), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new RevealLibraryPutIntoHandEffect(3, StaticFilters.FILTER_CARD_LANDS, Zone.LIBRARY), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
// Soulshift 2
this.addAbility(new SoulshiftAbility(2));

View file

@ -13,10 +13,9 @@ import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.filter.common.FilterHistoricCard;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
@ -26,10 +25,10 @@ import java.util.UUID;
*/
public final class ElenaTurkRecruit extends CardImpl {
private static final FilterCard filter = new FilterHistoricCard("non-Assassin historic card from your graveyard");
private static final FilterSpell filter2 = new FilterHistoricSpell();
private static final FilterCard filter = new FilterCard("non-Assassin historic card from your graveyard");
static {
filter.add(HistoricPredicate.instance);
filter.add(Predicates.not(SubType.ASSASSIN.getPredicate()));
}
@ -49,7 +48,7 @@ public final class ElenaTurkRecruit extends CardImpl {
// Whenever you cast a historic spell, put a +1/+1 counter on Elena.
this.addAbility(new SpellCastControllerTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter2, false
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_SPELL_HISTORIC, false
));
}

View file

@ -42,7 +42,7 @@ public final class FaithfulSquire extends CardImpl {
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Faithful Squire.
this.addAbility(new SpellCastControllerTriggeredAbility(
new AddCountersSourceEffect(CounterType.KI.createInstance()),
StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true
StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true
));
// At the beginning of the end step, if there are two or more ki counters on Faithful Squire, you may flip it

View file

@ -25,7 +25,7 @@ public final class FiddleheadKami extends CardImpl {
this.toughness = new MageInt(3);
// Whenever you cast a Spirit or Arcane spell, regenerate Fiddlehead Kami.
this.addAbility(new SpellCastControllerTriggeredAbility(new RegenerateSourceEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new RegenerateSourceEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private FiddleheadKami(final FiddleheadKami card) {

View file

@ -13,9 +13,8 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterSpell;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterHistoricSpell;
import mage.game.permanent.token.TreasureToken;
import mage.target.common.TargetCreaturePermanent;
@ -26,7 +25,6 @@ import java.util.UUID;
*/
public final class GloinDwarfEmissary extends CardImpl {
private static final FilterSpell filter = new FilterHistoricSpell();
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(SubType.TREASURE, "a Treasure");
public GloinDwarfEmissary(UUID ownerId, CardSetInfo setInfo) {
@ -40,7 +38,7 @@ public final class GloinDwarfEmissary extends CardImpl {
// Whenever you cast a historic spell, create a Treasure token. This ability triggers only once each turn.
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new TreasureToken()), filter, false
new CreateTokenEffect(new TreasureToken()), StaticFilters.FILTER_SPELL_HISTORIC, false
).setTriggersLimitEachTurn(1));
// {T}, Sacrifice a Treasure: Goad target creature.

View file

@ -14,7 +14,6 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.FilterSpell;
import mage.filter.common.FilterArtifactSpell;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
@ -58,17 +57,18 @@ public final class GoblinArtisans extends CardImpl {
class GoblinArtisansTarget extends TargetSpell {
private static final FilterSpell filter = new FilterArtifactSpell(
private static final FilterSpell filterSpell = new FilterSpell(
"target artifact spell you control that isn't the target " +
"of an ability from another creature named Goblin Artisans"
);
static {
filter.add(TargetController.YOU.getOwnerPredicate());
filterSpell.add(CardType.ARTIFACT.getPredicate());
filterSpell.add(TargetController.YOU.getOwnerPredicate());
}
GoblinArtisansTarget() {
super(filter);
super(filterSpell);
}
private GoblinArtisansTarget(final GoblinArtisansTarget target) {

View file

@ -27,7 +27,7 @@ public final class GuardianOfSolitude extends CardImpl {
this.power = new MageInt(1);
this.toughness = new MageInt(2);
Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -1,25 +1,31 @@
package mage.cards.h;
import java.util.UUID;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterArtifactSpell;
import mage.filter.FilterSpell;
import mage.target.TargetSpell;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class HaltOrder extends CardImpl {
private static final FilterSpell filter = new FilterSpell("artifact spell");
static {
filter.add(CardType.ARTIFACT.getPredicate());
}
public HaltOrder (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}");
// Counter target artifact spell. Draw a card.
this.getSpellAbility().addTarget(new TargetSpell(new FilterArtifactSpell()));
this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
}

View file

@ -29,7 +29,7 @@ public final class HaruOnna extends CardImpl {
// When Haru-Onna enters the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
// Whenever you cast a Spirit or Arcane spell, you may return Haru-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private HaruOnna(final HaruOnna card) {

View file

@ -23,9 +23,9 @@ import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterHistoricCard;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInYourGraveyard;
@ -38,19 +38,20 @@ import java.util.UUID;
*/
public final class HaviTheAllFather extends CardImpl {
private static final Condition condition = new CardsInControllerGraveyardCondition(
4, new FilterHistoricCard("historic cards")
);
private static final Hint hint = new ValueHint(
"Historic cards in your graveyard", new CardsInControllerGraveyardCount(new FilterHistoricCard())
);
private static final FilterCard filterHistoric = new FilterCard("historic cards");
private static final FilterCard filter = new FilterCreatureCard("legendary creature card with lesser mana value from your graveyard");
static {
filterHistoric.add(HistoricPredicate.instance);
filter.add(SuperType.LEGENDARY.getPredicate());
filter.add(HaviTheAllFatherPredicate.instance);
}
private static final Condition condition = new CardsInControllerGraveyardCondition(4, filterHistoric);
private static final Hint hint = new ValueHint(
"Historic cards in your graveyard", new CardsInControllerGraveyardCount(filterHistoric)
);
public HaviTheAllFather(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}{W}");

View file

@ -1,4 +1,3 @@
package mage.cards.h;
import mage.MageInt;
@ -11,10 +10,10 @@ import mage.abilities.keyword.TrampleAbility;
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.filter.FilterSpell;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactSpell;
import mage.game.permanent.token.TokenImpl;
import java.util.UUID;
@ -26,12 +25,18 @@ import java.util.UUID;
*/
public final class HiddenGuerrillas extends CardImpl {
private static final FilterSpell filter = new FilterSpell("an artifact spell");
static {
filter.add(CardType.ARTIFACT.getPredicate());
}
public HiddenGuerrillas(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
// When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), null, Duration.WhileOnBattlefield),
new FilterArtifactSpell(), false);
filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample."));
}

View file

@ -33,7 +33,7 @@ public final class HikariTwilightGuardian extends CardImpl {
// Whenever you cast a Spirit or Arcane spell, you may exile Hikari, Twilight Guardian. If you do, return it to the battlefield under its owner's control at the beginning of the next end step.
Effect effect = new ExileReturnBattlefieldOwnerNextEndStepSourceEffect();
effect.setText("you may exile {this}. If you do, return it to the battlefield under its owner's control at the beginning of the next end step");
this.addAbility(new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private HikariTwilightGuardian(final HikariTwilightGuardian card) {

View file

@ -43,7 +43,7 @@ public final class HiredMuscle extends CardImpl {
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Hired Muscle.
this.addAbility(new SpellCastControllerTriggeredAbility(
new AddCountersSourceEffect(CounterType.KI.createInstance()),
StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true
StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true
));
// At the beginning of the end step, if there are two or more ki counters on Hired Muscle, you may flip it.

View file

@ -25,7 +25,7 @@ public final class HorizonSeed extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(1);
Ability ability = new SpellCastControllerTriggeredAbility(new RegenerateTargetEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new RegenerateTargetEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -37,7 +37,7 @@ public final class InfernalKirin extends CardImpl {
// Whenever you cast a Spirit or Arcane spell, target player reveals their hand and discards all cards with that spell's converted mana cost.
Ability ability = new SpellCastControllerTriggeredAbility(
new InfernalKirinEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
new InfernalKirinEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE,
false, SetTargetPointer.SPELL
);
ability.addTarget(new TargetPlayer());

View file

@ -16,7 +16,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
@ -35,7 +34,7 @@ public final class InnocenceKami extends CardImpl {
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private InnocenceKami(final InnocenceKami card) {

View file

@ -1,14 +1,15 @@
package mage.cards.i;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterSpiritOrArcaneCard;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
@ -16,12 +17,6 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
*/
public final class IshiIshiAkkiCrackshot extends CardImpl {
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
static {
filter.add(TargetController.OPPONENT.getControllerPredicate());
}
public IshiIshiAkkiCrackshot(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
this.supertype.add(SuperType.LEGENDARY);
@ -32,7 +27,9 @@ public final class IshiIshiAkkiCrackshot extends CardImpl {
this.toughness = new MageInt(1);
// Whenever an opponent casts a Spirit or Arcane spell, Ishi-Ishi, Akki Crackshot deals 2 damage to that player.
this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2, true, "that player"), filter, false, SetTargetPointer.PLAYER));
this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD,
new DamageTargetEffect(2, true, "that player"),
StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false, SetTargetPointer.PLAYER));
}
private IshiIshiAkkiCrackshot(final IshiIshiAkkiCrackshot card) {

View file

@ -21,7 +21,7 @@ public final class JadeIdol extends CardImpl {
public JadeIdol(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
this.addAbility(new SpellCastControllerTriggeredAbility(new BecomesCreatureSourceEffect(new JadeIdolToken(), CardType.ARTIFACT, Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new BecomesCreatureSourceEffect(new JadeIdolToken(), CardType.ARTIFACT, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private JadeIdol(final JadeIdol card) {

View file

@ -14,8 +14,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.stack.Spell;
@ -28,8 +27,6 @@ import java.util.UUID;
*/
public final class JamieMcCrimmon extends CardImpl {
private static final FilterSpell filter = new FilterHistoricSpell();
public JamieMcCrimmon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
@ -45,7 +42,7 @@ public final class JamieMcCrimmon extends CardImpl {
// Whenever you cast a historic spell, Jamie McCrimmon gets +X/+X until end of turn, where X is that spell's mana value.
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(
JamieMcCrimmonValue.instance, JamieMcCrimmonValue.instance, Duration.EndOfTurn
), filter, false));
), StaticFilters.FILTER_SPELL_HISTORIC, false));
// Doctor's companion
this.addAbility(DoctorsCompanionAbility.getInstance());

View file

@ -8,15 +8,12 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
import java.util.UUID;
public final class JhoiraWeatherlightCaptain extends CardImpl {
private static final FilterSpell filter = new FilterHistoricSpell();
public JhoiraWeatherlightCaptain(UUID ownerId, CardSetInfo cardSetInfo) {
super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}");
this.supertype.add(SuperType.LEGENDARY);
@ -28,7 +25,7 @@ public final class JhoiraWeatherlightCaptain extends CardImpl {
this.addAbility(new SpellCastControllerTriggeredAbility(
new DrawCardSourceControllerEffect(1)
.setText("draw a card. <i>(Artifacts, legendaries, and Sagas are historic.)</i>"),
filter, false
StaticFilters.FILTER_SPELL_HISTORIC, false
));
}

View file

@ -1,7 +1,6 @@
package mage.cards.j;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect;
@ -10,8 +9,10 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterHistoricCard;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
import java.util.UUID;
/**
*
@ -19,6 +20,11 @@ import mage.filter.common.FilterHistoricCard;
*/
public final class JhoirasFamiliar extends CardImpl {
private static final FilterCard filter = new FilterCard("historic spells");
static {
filter.add(HistoricPredicate.instance);
}
public JhoirasFamiliar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
@ -31,7 +37,7 @@ public final class JhoirasFamiliar extends CardImpl {
// Historic spells you cast cost {1} less to cast.
this.addAbility(new SimpleStaticAbility(
new SpellsCostReductionControllerEffect(new FilterHistoricCard(), 1)
new SpellsCostReductionControllerEffect(filter, 1)
.setText("Historic spells you cast cost {1} less to cast. <i>(Artifacts, legendaries, and Sagas are historic.)</i>")));
}

View file

@ -15,7 +15,7 @@ import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.common.FilterHistoricCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.game.Game;
import mage.players.Player;
@ -59,7 +59,10 @@ public final class JoGrant extends CardImpl {
class JoGrantEffect extends ContinuousEffectImpl {
private static final FilterCard filter = new FilterHistoricCard();
private static final FilterCard filter = new FilterCard("historic card");
static {
filter.add(HistoricPredicate.instance);
}
JoGrantEffect() {
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);

View file

@ -13,7 +13,7 @@ import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterInstantSpell;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
@ -55,8 +55,14 @@ public final class KalamaxTheStormsire extends CardImpl {
}
class KalamaxTheStormsireSpellCastAbility extends SpellCastControllerTriggeredAbility {
private static final FilterSpell filterInstant = new FilterSpell();
static {
filterInstant.add(CardType.INSTANT.getPredicate());
}
KalamaxTheStormsireSpellCastAbility() {
super(new CopyTargetStackObjectEffect(true), new FilterInstantSpell(), false);
super(new CopyTargetStackObjectEffect(true), filterInstant, false);
}
private KalamaxTheStormsireSpellCastAbility(final KalamaxTheStormsireSpellCastAbility ability) {

View file

@ -28,7 +28,7 @@ public final class KamiOfFiresRoar extends CardImpl {
this.toughness = new MageInt(3);
// Whenever you cast a Spirit or Arcane spell, target creature can't block this turn.
Ability ability = new SpellCastControllerTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -26,7 +26,7 @@ public final class KamiOfTatteredShoji extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(5);
// Whenever you cast a Spirit or Arcane spell, Kami of Tattered Shoji gains flying until end of turn.
this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private KamiOfTatteredShoji(final KamiOfTatteredShoji card) {

View file

@ -24,7 +24,7 @@ public final class KamiOfTheHunt extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private KamiOfTheHunt(final KamiOfTheHunt card) {

View file

@ -26,7 +26,7 @@ public final class KamiOfThePaintedRoad extends CardImpl {
this.toughness = new MageInt(3);
// Whenever you cast a Spirit or Arcane spell, Kami of the Painted Road gains protection from the color of your choice until end of turn.
this.addAbility(new SpellCastControllerTriggeredAbility(new GainProtectionFromColorSourceEffect(Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new GainProtectionFromColorSourceEffect(Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}

View file

@ -29,7 +29,7 @@ public final class KamiOfTheWaningMoon extends CardImpl {
this.power = new MageInt(1);
this.toughness = new MageInt(1);
this.addAbility(FlyingAbility.getInstance());
Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FearAbility.getInstance(), Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FearAbility.getInstance(), Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -33,7 +33,7 @@ public final class KemuriOnna extends CardImpl {
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Kemuri-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private KemuriOnna(final KemuriOnna card) {

View file

@ -33,7 +33,7 @@ public final class KiriOnna extends CardImpl {
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Kiri-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private KiriOnna(final KiriOnna card) {

View file

@ -17,9 +17,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterNoncreatureCard;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.token.SpiritToken;
import mage.players.Player;
@ -32,7 +32,10 @@ import mage.target.common.TargetControlledCreaturePermanent;
*/
public final class KirinTouchedOrochi extends CardImpl {
private static final FilterNoncreatureCard filter2 = new FilterNoncreatureCard("noncreature card from a graveyard");
private static final FilterCard filter = new FilterCard("noncreature card from a graveyard");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public KirinTouchedOrochi(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "");
@ -51,7 +54,7 @@ public final class KirinTouchedOrochi extends CardImpl {
// Exile target noncreature card from a graveyard. When you do, put a +1/+1 counter on target creature you control.
Mode mode = new Mode(new KirinTouchedOrochiCounterEffect());
mode.addTarget(new TargetCardInGraveyard(filter2));
mode.addTarget(new TargetCardInGraveyard(filter));
ability.addMode(mode);
this.addAbility(ability);
}

View file

@ -29,7 +29,7 @@ public final class KodamaOfTheSouthTree extends CardImpl {
this.power = new MageInt(4);
this.toughness = new MageInt(4);
Ability ability = new SpellCastControllerTriggeredAbility(new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true));
this.addAbility(ability);
}

View file

@ -32,7 +32,7 @@ public final class KyokiSanitysEclipse extends CardImpl {
// Whenever you cast a Spirit or Arcane spell, target opponent exiles a card from their hand.
Ability ability = new SpellCastControllerTriggeredAbility(
new ExileFromZoneTargetEffect(Zone.HAND, false),
StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false
StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false
);
ability.addTarget(new TargetOpponent());
this.addAbility(ability);

View file

@ -1,19 +1,7 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterHistoricCard;
import mage.game.Game;
import mage.game.events.DamagedBatchForOnePlayerEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInYourGraveyard;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.OneOrMoreDamagePlayerTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
@ -21,13 +9,26 @@ import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
* @author balazskristof
*/
public final class LaylaHassan extends CardImpl {
private static final FilterHistoricCard filter = new FilterHistoricCard("historic card from your graveyard");
private static final FilterCard filter = new FilterCard("historic card from your graveyard");
static {
filter.add(HistoricPredicate.instance);
}
public LaylaHassan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");

View file

@ -27,7 +27,7 @@ public final class LoamDweller extends CardImpl {
// Whenever you cast a Spirit or Arcane spell, you may put a land card from your hand onto the battlefield tapped.
this.addAbility(new SpellCastControllerTriggeredAbility(
new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A, false, true),
StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private LoamDweller(final LoamDweller card) {

View file

@ -20,7 +20,7 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.common.FilterNoncreatureCard;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.watchers.common.SpellsCastWatcher;
@ -31,7 +31,10 @@ import java.util.UUID;
*/
public final class LyseHext extends CardImpl {
private static final FilterCard filter = new FilterNoncreatureCard("noncreature spells");
private static final FilterCard filter = new FilterCard("noncreature spells");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public LyseHext(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");

View file

@ -16,9 +16,7 @@ import mage.abilities.keyword.StartYourEnginesAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterSpell;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactSpell;
import java.util.UUID;
@ -27,7 +25,6 @@ import java.util.UUID;
*/
public final class MendicantCoreGuidelight extends CardImpl {
private static final FilterSpell filter = new FilterArtifactSpell("an artifact spell");
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACTS);
public MendicantCoreGuidelight(UUID ownerId, CardSetInfo setInfo) {
@ -47,7 +44,7 @@ public final class MendicantCoreGuidelight extends CardImpl {
Effect copyEffect = new CopyTargetStackObjectEffect(true)
.setText("copy it. <i>(The copy becomes a token.)</i>");
Effect doIfEffect = new DoIfCostPaid(copyEffect, new ManaCostsImpl<>("{1}"));
Ability ability = new SpellCastControllerTriggeredAbility(doIfEffect, filter, false, SetTargetPointer.SPELL);
Ability ability = new SpellCastControllerTriggeredAbility(doIfEffect, StaticFilters.FILTER_SPELL_AN_ARTIFACT, false, SetTargetPointer.SPELL);
this.addAbility(new MaxSpeedAbility(ability));
}

View file

@ -1,4 +1,3 @@
package mage.cards.m;
import java.util.UUID;
@ -8,7 +7,7 @@ import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterArtifactSpell;
import mage.filter.FilterSpell;
/**
*
@ -16,12 +15,17 @@ import mage.filter.common.FilterArtifactSpell;
*/
public final class MishrasWorkshop extends CardImpl {
private static final FilterSpell filter = new FilterSpell("artifact spells");
static {
filter.add(CardType.ARTIFACT.getPredicate());
}
public MishrasWorkshop(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
// {tap}: Add {C}{C}{C}. Spend this mana only to cast artifact spells.
this.addAbility(new ConditionalColorlessManaAbility(new TapSourceCost(), 3,
new ConditionalSpellManaBuilder(new FilterArtifactSpell("artifact spells"))));
new ConditionalSpellManaBuilder(filter)));
}

View file

@ -16,8 +16,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterSpell;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
import mage.filter.common.FilterPermanentCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -30,7 +29,6 @@ import java.util.UUID;
public final class MoiraAndTeshar extends CardImpl {
private static final FilterSpell filter = new FilterHistoricSpell();
private static final FilterPermanentCard targetFilter = new FilterPermanentCard(
"nonland permanent card from your graveyard");
@ -51,7 +49,7 @@ public final class MoiraAndTeshar extends CardImpl {
// Whenever you cast a historic spell, return target nonland permanent card from
// your graveyard to the battlefield. It gains haste. Exile it at the beginning
// of the next end step.
Ability ability = new SpellCastControllerTriggeredAbility(new MoiraAndTesharEffect(), filter, false);
Ability ability = new SpellCastControllerTriggeredAbility(new MoiraAndTesharEffect(), StaticFilters.FILTER_SPELL_HISTORIC, false);
ability.addTarget(new TargetCardInYourGraveyard(targetFilter));
// If it would leave the battlefield, exile it instead of putting it anywhere

View file

@ -11,7 +11,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterNoncreatureCard;
import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetCardInYourGraveyard;
@ -22,10 +22,10 @@ import java.util.UUID;
*/
public final class MonasteryMessenger extends CardImpl {
private static final FilterCard filter = new FilterNoncreatureCard("noncreature, nonland card from your graveyard");
private static final FilterCard filter = new FilterNonlandCard("noncreature, nonland card from your graveyard");
static {
filter.add(Predicates.not(CardType.LAND.getPredicate()));
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public MonasteryMessenger(UUID ownerId, CardSetInfo setInfo) {

View file

@ -33,7 +33,7 @@ public final class NikkoOnna extends CardImpl {
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Nikko-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private NikkoOnna(final NikkoOnna card) {

View file

@ -27,7 +27,7 @@ public final class OrbweaverKumo extends CardImpl {
this.power = new MageInt(3);
this.toughness = new MageInt(4);
this.addAbility(ReachAbility.getInstance());
this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(new ForestwalkAbility(), Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(new ForestwalkAbility(), Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private OrbweaverKumo(final OrbweaverKumo card) {

View file

@ -25,7 +25,7 @@ public final class OreGorger extends CardImpl {
this.power = new MageInt(3);
this.toughness = new MageInt(1);
Ability ability = new SpellCastControllerTriggeredAbility(new DestroyTargetEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true);
Ability ability = new SpellCastControllerTriggeredAbility(new DestroyTargetEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true);
ability.addTarget(new TargetNonBasicLandPermanent());
this.addAbility(ability);
}

View file

@ -29,7 +29,7 @@ public final class OyobiWhoSplitTheHeavens extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Spirit or Arcane spell, create a 3/3 white Spirit creature token with flying.
this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new AnotherSpiritToken()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new AnotherSpiritToken()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private OyobiWhoSplitTheHeavens(final OyobiWhoSplitTheHeavens card) {

View file

@ -31,7 +31,7 @@ public final class PetalmaneBaku extends CardImpl {
this.toughness = new MageInt(2);
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Petalmane Baku.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// {1}, Remove X ki counters from Petalmane Baku: Add X mana of any one color.
Ability ability = new DynamicManaAbility(

View file

@ -37,7 +37,7 @@ public final class QuillmaneBaku extends CardImpl {
this.toughness = new MageInt(3);
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Quillmane Baku.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// {1}, {T}, Remove X ki counters from Quillmane Baku: Return target creature with mana value X or less to its owner's hand.
Ability ability = new SimpleActivatedAbility(new ReturnToHandTargetEffect(), new GenericManaCost(1));

View file

@ -1,4 +1,3 @@
package mage.cards.r;
import mage.MageInt;
@ -16,7 +15,8 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterHistoricCard;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.game.ExileZone;
import mage.game.Game;
import mage.target.common.TargetCardInYourGraveyard;
@ -29,6 +29,11 @@ import java.util.UUID;
*/
public final class RonaDiscipleOfGix extends CardImpl {
private static final FilterCard filter = new FilterCard("historic card from your graveyard");
static {
filter.add(HistoricPredicate.instance);
}
public RonaDiscipleOfGix(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}");
@ -45,7 +50,7 @@ public final class RonaDiscipleOfGix extends CardImpl {
.setText("exile target historic card from your graveyard. <i>(Artifacts, legendaries, and Sagas are historic.)</i>"),
true
);
ability.addTarget(new TargetCardInYourGraveyard(new FilterHistoricCard("historic card from your graveyard")));
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
// You may cast nonland cards exiled with Rona.

View file

@ -18,7 +18,7 @@ import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterNoncreatureCard;
import mage.filter.predicate.Predicates;
import java.util.UUID;
@ -27,7 +27,10 @@ import java.util.UUID;
*/
public final class SamutTheDrivingForce extends CardImpl {
private static final FilterCard filter = new FilterNoncreatureCard("noncreature spells");
private static final FilterCard filter = new FilterCard("noncreature spells");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public SamutTheDrivingForce(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}{W}");

View file

@ -16,12 +16,11 @@ import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterHistoricCard;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.FoodToken;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
@ -32,11 +31,12 @@ public final class SamwiseGamgee extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another nontoken creature");
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(SubType.FOOD, "Foods");
private static final FilterCard filter3 = new FilterHistoricCard("historic card from your graveyard");
private static final FilterCard filter3 = new FilterCard("historic card from your graveyard");
static {
filter.add(AnotherPredicate.instance);
filter.add(TokenPredicate.FALSE);
filter3.add(HistoricPredicate.instance);
}
public SamwiseGamgee(UUID ownerId, CardSetInfo setInfo) {

View file

@ -1,20 +1,20 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.constants.SubType;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterHistoricCard;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
import java.util.UUID;
/**
*
@ -22,6 +22,11 @@ import mage.filter.common.FilterHistoricCard;
*/
public final class SanctumSpirit extends CardImpl {
private static final FilterCard filter = new FilterCard("a historic card");
static {
filter.add(HistoricPredicate.instance);
}
public SanctumSpirit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
@ -36,7 +41,7 @@ public final class SanctumSpirit extends CardImpl {
this.addAbility(
new SimpleActivatedAbility(
new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn),
new DiscardCardCost(new FilterHistoricCard())
new DiscardCardCost(filter)
)
);
}

View file

@ -9,8 +9,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
import java.util.UUID;
@ -19,8 +18,6 @@ import java.util.UUID;
*/
public final class SarahJaneSmith extends CardImpl {
private static final FilterSpell filter = new FilterHistoricSpell();
public SarahJaneSmith(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
@ -32,7 +29,7 @@ public final class SarahJaneSmith extends CardImpl {
// Whenever you cast a historic spell, investigate. This ability triggers only once each turn.
this.addAbility(new SpellCastControllerTriggeredAbility(
new InvestigateEffect(), filter, false
new InvestigateEffect(), StaticFilters.FILTER_SPELL_HISTORIC, false
).setTriggersLimitEachTurn(1));
// Doctor's companion

View file

@ -25,7 +25,7 @@ public final class ScaledHulk extends CardImpl {
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Whenever you cast a Spirit or Arcane spell, Scaled Hulk gets +2/+2 until end of turn.
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false));
}
private ScaledHulk(final ScaledHulk card) {

View file

@ -10,15 +10,12 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
import java.util.UUID;
public final class SerraDisciple extends CardImpl {
private static final FilterSpell filter = new FilterHistoricSpell();
public SerraDisciple(UUID ownerId, CardSetInfo cardSetInfo) {
super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
subtype.add(SubType.BIRD, SubType.CLERIC);
@ -31,7 +28,7 @@ public final class SerraDisciple extends CardImpl {
// Whenever you cast a historic spell, Serra Disciple gets +1/+1 until end of turn
addAbility(new SpellCastControllerTriggeredAbility(
new BoostSourceEffect(1, 1, Duration.EndOfTurn), filter, false
new BoostSourceEffect(1, 1, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_HISTORIC, false
));
}

View file

@ -26,7 +26,7 @@ public final class SireOfTheStorm extends CardImpl {
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private SireOfTheStorm(final SireOfTheStorm card) {

View file

@ -37,7 +37,7 @@ public final class SkullmaneBaku extends CardImpl {
this.toughness = new MageInt(1);
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Skullmane Baku.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// {1}, {T}, Remove X ki counters from Skullmane Baku: Target creature gets -X/-X until end of turn.
Ability ability = new SimpleActivatedAbility(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), new GenericManaCost(1));

View file

@ -44,7 +44,7 @@ public final class SkyfireKirin extends CardImpl {
// Whenever you cast a Spirit or Arcane spell, you may gain control of target creature with that spell's converted mana cost until end of turn.
Ability ability = new SpellCastControllerTriggeredAbility(
new SkyfireKirinEffect(),
StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD,
StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE,
true, SetTargetPointer.SPELL
);
ability.addTarget(new TargetCreaturePermanent());

View file

@ -30,7 +30,7 @@ public final class Soilshaper extends CardImpl {
this.toughness = new MageInt(1);
// Whenever you cast a Spirit or Arcane spell, target land becomes a 3/3 creature until end of turn. It's still a land.
Ability ability = new SpellCastControllerTriggeredAbility(new BecomesCreatureTargetEffect(new CreatureToken(3, 3), false, true, Duration.EndOfTurn), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new BecomesCreatureTargetEffect(new CreatureToken(3, 3), false, true, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
}

View file

@ -25,7 +25,7 @@ public final class SoulOfMagma extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(1), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(1), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -1,28 +1,34 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterArtifactSpell;
import mage.filter.FilterSpell;
import mage.target.TargetSpell;
import mage.target.common.TargetArtifactPermanent;
import java.util.UUID;
/**
*
* @author North
*/
public final class SteelSabotage extends CardImpl {
private static final FilterSpell filter = new FilterSpell("artifact spell");
static {
filter.add(CardType.ARTIFACT.getPredicate());
}
public SteelSabotage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
// Choose one - Counter target artifact spell; or return target artifact to its owner's hand.
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell(new FilterArtifactSpell()));
this.getSpellAbility().addTarget(new TargetSpell(filter));
Mode mode = new Mode(new ReturnToHandTargetEffect());
mode.addTarget(new TargetArtifactPermanent());
this.getSpellAbility().addMode(mode);

View file

@ -10,8 +10,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
import mage.target.common.TargetAnyTarget;
import java.util.UUID;
@ -21,8 +20,6 @@ import java.util.UUID;
*/
public final class SurtrFieryJotun extends CardImpl {
private static final FilterSpell filter = new FilterHistoricSpell();
public SurtrFieryJotun(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
@ -37,7 +34,7 @@ public final class SurtrFieryJotun extends CardImpl {
this.addAbility(TrampleAbility.getInstance());
// Whenever you cast a historic spell, Surtr, Fiery Jotun deals 3 damage to any target.
Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(3), filter, false);
Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(3), StaticFilters.FILTER_SPELL_HISTORIC, false);
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}

View file

@ -1,10 +1,7 @@
package mage.cards.t;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Abilities;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
@ -19,6 +16,8 @@ import mage.filter.predicate.Predicate;
import mage.game.Game;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
*
* @author LevelX2
@ -30,7 +29,7 @@ public final class Tallowisp extends CardImpl {
static {
filterAura.add(CardType.ENCHANTMENT.getPredicate());
filterAura.add(SubType.AURA.getPredicate());
filterAura.add(new TallowispAbilityPredicate());
filterAura.add(TallowispAbilityPredicate.instance);
}
public Tallowisp(UUID ownerId, CardSetInfo setInfo) {
@ -41,7 +40,7 @@ public final class Tallowisp extends CardImpl {
this.toughness = new MageInt(3);
// Whenever you cast a Spirit or Arcane spell, you may search your library for an Aura card with enchant creature, reveal it, and put it into your hand. If you do, shuffle your library.
this.addAbility(new SpellCastControllerTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterAura), true), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterAura), true), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private Tallowisp(final Tallowisp card) {
@ -54,20 +53,14 @@ public final class Tallowisp extends CardImpl {
}
}
class TallowispAbilityPredicate implements Predicate<MageObject> {
public TallowispAbilityPredicate() {
}
enum TallowispAbilityPredicate implements Predicate<MageObject> {
instance;
@Override
public boolean apply(MageObject input, Game game) {
Abilities<Ability> abilities = input.getAbilities();
for (int i = 0; i < abilities.size(); i++) {
if (abilities.get(i) instanceof EnchantAbility) {
String enchantText = abilities.get(i).getRule();
if (enchantText.contentEquals("Enchant creature")) {
return true;
}
for (Ability ability : input.getAbilities()) {
if (ability instanceof EnchantAbility && ability.getRule().contentEquals("Enchant creature")) {
return true;
}
}
return false;

View file

@ -30,7 +30,7 @@ public final class TellerOfTales extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Spirit or Arcane spell, you may tap or untap target creature.
Ability ability = new SpellCastControllerTriggeredAbility(new MayTapOrUntapTargetEffect(), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true);
Ability ability = new SpellCastControllerTriggeredAbility(new MayTapOrUntapTargetEffect(), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -1,7 +1,6 @@
package mage.cards.t;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
@ -14,11 +13,13 @@ import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
*
* @author L_J
@ -46,14 +47,14 @@ public final class TesharAncestorsApostle extends CardImpl {
// Whenever you cast a historic spell, return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.
Ability ability = new SpellCastControllerTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()
.setText("return target creature card with mana value 3 or less from your graveyard to the battlefield. "
+ "<i>(Artifacts, legendaries, and Sagas are historic.)</i>"), new FilterHistoricSpell(), false);
+ "<i>(Artifacts, legendaries, and Sagas are historic.)</i>"), StaticFilters.FILTER_SPELL_HISTORIC, false);
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}
private TesharAncestorsApostle(final TesharAncestorsApostle TesharAncestorsApostle) {
super(TesharAncestorsApostle);
private TesharAncestorsApostle(final TesharAncestorsApostle card) {
super(card);
}
public TesharAncestorsApostle copy() {

View file

@ -27,7 +27,7 @@ public final class ThiefOfHope extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
Ability ability = new SpellCastControllerTriggeredAbility(new LoseLifeTargetEffect(1), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, false);
Ability ability = new SpellCastControllerTriggeredAbility(new LoseLifeTargetEffect(1), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, false);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);

View file

@ -14,7 +14,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.common.FilterHistoricSpell;
import mage.filter.StaticFilters;
/**
*
@ -39,7 +39,7 @@ public final class TraxosScourgeOfKroog extends CardImpl {
ability.addEffect(new DontUntapInControllersUntapStepSourceEffect());
this.addAbility(ability);
// Whenever you cast a historic spell untap Traxos.
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), new FilterHistoricSpell(), false));
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), StaticFilters.FILTER_SPELL_HISTORIC, false));
}
private TraxosScourgeOfKroog(final TraxosScourgeOfKroog card) {

View file

@ -12,8 +12,8 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterHistoricCard;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
@ -25,11 +25,17 @@ import java.util.UUID;
*/
public final class UrzasTome extends CardImpl {
private static final FilterCard filter = new FilterCard("historic card");
static {
filter.add(HistoricPredicate.instance);
}
public UrzasTome(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// {3}, {T}: Draw a card. Then discard a card unless you exile a historic card from your graveyard.
Ability ability = new SimpleActivatedAbility(new UrzasTomeEffect(), new GenericManaCost(3));
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new GenericManaCost(3));
ability.addEffect(new UrzasTomeEffect());
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
@ -46,9 +52,14 @@ public final class UrzasTome extends CardImpl {
class UrzasTomeEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCard("a historic card");
static {
filter.add(HistoricPredicate.instance);
}
UrzasTomeEffect() {
super(Outcome.Discard);
staticText = "Draw a card. Then discard a card unless you exile a historic card from your graveyard";
staticText = "Then discard a card unless you exile a historic card from your graveyard";
}
private UrzasTomeEffect(final UrzasTomeEffect effect) {
@ -63,20 +74,17 @@ class UrzasTomeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
new DrawCardSourceControllerEffect(1).apply(game, source);
if (controller != null
&& controller.chooseUse(Outcome.Exile, "Exile a historic card from your graveyard?", source, game)) {
Cost cost = new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterHistoricCard()));
if (cost.canPay(source, source, controller.getId(), game)) {
if (cost.pay(source, game, source, controller.getId(), false, null)) {
return true;
}
if (controller == null) {
return false;
}
if (controller.chooseUse(Outcome.Exile, "Exile a historic card from your graveyard?", source, game)) {
Cost cost = new ExileFromGraveCost(new TargetCardInYourGraveyard(filter));
if (cost.canPay(source, source, controller.getId(), game)
&& cost.pay(source, game, source, controller.getId(), false, null)) {
return true;
}
}
if (controller != null) {
controller.discard(1, false, false, source, game);
return true;
}
return false;
controller.discard(1, false, false, source, game);
return true;
}
}

View file

@ -11,7 +11,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.common.FilterNoncreatureCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.common.TargetCardInYourGraveyard;
@ -22,11 +22,12 @@ import java.util.UUID;
*/
public final class VadrokApexOfThunder extends CardImpl {
private static final FilterCard filter = new FilterNoncreatureCard(
private static final FilterCard filter = new FilterCard(
"noncreature card with mana value 3 or less from your graveyard"
);
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
}

View file

@ -18,7 +18,6 @@ import mage.constants.TargetController;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterNoncreatureCard;
import mage.filter.predicate.Predicates;
/**
@ -27,12 +26,13 @@ import mage.filter.predicate.Predicates;
*/
public final class ValleyFloodcaller extends CardImpl {
private static final FilterCard nonCreatureFilter = new FilterNoncreatureCard("noncreature spells");
private static final FilterCard nonCreatureFilter = new FilterCard("noncreature spells");
private static final FilterCreaturePermanent creatureFilter =
new FilterCreaturePermanent("Birds, Frogs, Otters, and Rats");
static {
nonCreatureFilter.add(Predicates.not(CardType.CREATURE.getPredicate()));
creatureFilter.add(TargetController.YOU.getControllerPredicate());
creatureFilter.add(Predicates.or(
SubType.BIRD.getPredicate(),

View file

@ -33,7 +33,7 @@ public final class WaxmaneBaku extends CardImpl {
this.toughness = new MageInt(2);
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Waxmane Baku.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
// {1}, Remove X ki counters from Waxmane Baku: Tap X target creatures.
Ability ability = new SimpleActivatedAbility(new TapTargetEffect("tap X target creatures"), new GenericManaCost(1));

View file

@ -32,7 +32,7 @@ public final class YukiOnna extends CardImpl {
ability.addTarget(new TargetArtifactPermanent());
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Yuki-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPIRIT_OR_ARCANE_CARD, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.FILTER_SPELL_SPIRIT_OR_ARCANE, true));
}
private YukiOnna(final YukiOnna card) {

View file

@ -24,12 +24,6 @@ public final class StaticFilters {
private StaticFilters() {
}
public static final FilterSpiritOrArcaneCard FILTER_SPIRIT_OR_ARCANE_CARD = new FilterSpiritOrArcaneCard();
static {
FILTER_SPIRIT_OR_ARCANE_CARD.setLockedFilter(true);
}
public static final FilterCard FILTER_CARD = new FilterCard("card");
static {
@ -158,24 +152,20 @@ public final class StaticFilters {
FILTER_CARD_CREATURE_A_GRAVEYARD.setLockedFilter(true);
}
public static final FilterNoncreatureCard FILTER_CARD_NON_CREATURE = new FilterNoncreatureCard();
public static final FilterCard FILTER_CARD_NON_CREATURE = new FilterCard();
static {
FILTER_CARD_NON_CREATURE.add(Predicates.not(CardType.CREATURE.getPredicate()));
FILTER_CARD_NON_CREATURE.setLockedFilter(true);
}
public static final FilterNoncreatureCard FILTER_CARD_A_NON_CREATURE = new FilterNoncreatureCard("a noncreature card");
public static final FilterCard FILTER_CARD_A_NON_CREATURE = new FilterCard("a noncreature card");
static {
FILTER_CARD_A_NON_CREATURE.add(Predicates.not(CardType.CREATURE.getPredicate()));
FILTER_CARD_A_NON_CREATURE.setLockedFilter(true);
}
public static final FilterNoncreatureCard FILTER_CARDS_NON_CREATURE = new FilterNoncreatureCard("noncreature cards");
static {
FILTER_CARDS_NON_CREATURE.setLockedFilter(true);
}
public static final FilterLandCard FILTER_CARD_LAND = new FilterLandCard();
static {
@ -520,9 +510,13 @@ public final class StaticFilters {
FILTER_CONTROLLED_PERMANENT_LANDS.setLockedFilter(true);
}
public static final FilterPermanent FILTER_CONTROLLED_PERMANENT_CREATURE_OR_PLANESWALKER = new FilterControlledCreatureOrPlaneswalkerPermanent("creature or planeswalker you control");
public static final FilterPermanent FILTER_CONTROLLED_PERMANENT_CREATURE_OR_PLANESWALKER = new FilterControlledPermanent("creature or planeswalker you control");
static {
FILTER_CONTROLLED_PERMANENT_CREATURE_OR_PLANESWALKER.add(Predicates.or(
CardType.CREATURE.getPredicate(),
CardType.PLANESWALKER.getPredicate()
));
FILTER_CONTROLLED_PERMANENT_CREATURE_OR_PLANESWALKER.setLockedFilter(true);
}
@ -1047,12 +1041,30 @@ public final class StaticFilters {
FILTER_SPELL_AN_ENCHANTMENT.setLockedFilter(true);
}
public static final FilterSpell FILTER_SPELL_AN_ARTIFACT = new FilterArtifactSpell("an artifact spell");
public static final FilterSpell FILTER_SPELL_AN_ARTIFACT = new FilterSpell("an artifact spell");
static {
FILTER_SPELL_AN_ARTIFACT.add(CardType.ARTIFACT.getPredicate());
FILTER_SPELL_AN_ARTIFACT.setLockedFilter(true);
}
public static final FilterSpell FILTER_SPELL_SPIRIT_OR_ARCANE = new FilterSpell("a Spirit or Arcane spell");
static {
FILTER_SPELL_SPIRIT_OR_ARCANE.add(Predicates.or(
SubType.SPIRIT.getPredicate(),
SubType.ARCANE.getPredicate()
));
FILTER_SPELL_SPIRIT_OR_ARCANE.setLockedFilter(true);
}
public static final FilterSpell FILTER_SPELL_HISTORIC = new FilterSpell("a historic spell");
static {
FILTER_SPELL_HISTORIC.add(HistoricPredicate.instance);
FILTER_SPELL_HISTORIC.setLockedFilter(true);
}
public static final FilterSpell FILTER_SPELL_KICKED_A = new FilterSpell("a kicked spell");
static {

View file

@ -1,21 +0,0 @@
package mage.filter.common;
import mage.constants.CardType;
import mage.filter.FilterSpell;
/**
*
* @author Jgod
*/
public class FilterArtifactSpell extends FilterSpell {
public FilterArtifactSpell() {
this("artifact spell");
}
public FilterArtifactSpell(String name) {
super(name);
this.add(CardType.ARTIFACT.getPredicate());
}
}

View file

@ -1,46 +0,0 @@
package mage.filter.common;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.predicate.Predicates;
/**
* @author LevelX2
*/
public class FilterControlledCreatureOrPlaneswalkerPermanent extends FilterControlledPermanent {
public FilterControlledCreatureOrPlaneswalkerPermanent() {
this("creature or planeswalker you control");
}
public FilterControlledCreatureOrPlaneswalkerPermanent(SubType subType) {
this(subType, "a " + subType + " creature or a " + subType + " planeswalker");
}
public FilterControlledCreatureOrPlaneswalkerPermanent(SubType subType, String name) {
super(name);
this.add(Predicates.or(
CardType.CREATURE.getPredicate(),
CardType.PLANESWALKER.getPredicate()
));
this.add(subType.getPredicate());
}
public FilterControlledCreatureOrPlaneswalkerPermanent(String name) {
super(name);
this.add(Predicates.or(
CardType.CREATURE.getPredicate(),
CardType.PLANESWALKER.getPredicate()
));
}
protected FilterControlledCreatureOrPlaneswalkerPermanent(final FilterControlledCreatureOrPlaneswalkerPermanent filter) {
super(filter);
}
@Override
public FilterControlledCreatureOrPlaneswalkerPermanent copy() {
return new FilterControlledCreatureOrPlaneswalkerPermanent(this);
}
}

View file

@ -1,28 +0,0 @@
package mage.filter.common;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.HistoricPredicate;
/**
* @author LevelX2
*/
public class FilterHistoricCard extends FilterCard {
public FilterHistoricCard() {
this("historic card");
}
public FilterHistoricCard(String name) {
super(name);
this.add(HistoricPredicate.instance);
}
protected FilterHistoricCard(final FilterHistoricCard filter) {
super(filter);
}
@Override
public FilterHistoricCard copy() {
return new FilterHistoricCard(this);
}
}

View file

@ -1,24 +0,0 @@
package mage.filter.common;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.HistoricPredicate;
/**
* @author igoudt
*/
public class FilterHistoricSpell extends FilterSpell {
public FilterHistoricSpell() {
super("a historic spell");
this.add(HistoricPredicate.instance);
}
protected FilterHistoricSpell(final FilterHistoricSpell filter) {
super(filter);
}
@Override
public FilterHistoricSpell copy() {
return new FilterHistoricSpell(this);
}
}

View file

@ -1,26 +0,0 @@
package mage.filter.common;
import mage.constants.CardType;
import mage.filter.FilterSpell;
public class FilterInstantSpell extends FilterSpell {
public FilterInstantSpell() {
this("instant spell");
}
public FilterInstantSpell(String name) {
super(name);
this.add(CardType.INSTANT.getPredicate());
}
protected FilterInstantSpell(final FilterInstantSpell filter) {
super(filter);
}
@Override
public FilterInstantSpell copy() {
return new FilterInstantSpell(this);
}
}

View file

@ -1,29 +0,0 @@
package mage.filter.common;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
/**
* @author ssouders412
*/
public class FilterNoncreatureCard extends FilterCard {
public FilterNoncreatureCard() {
this("noncreature card");
}
public FilterNoncreatureCard(String name) {
super(name);
this.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
protected FilterNoncreatureCard(final FilterNoncreatureCard filter) {
super(filter);
}
@Override
public FilterNoncreatureCard copy() {
return new FilterNoncreatureCard(this);
}
}

View file

@ -1,26 +0,0 @@
package mage.filter.common;
import mage.constants.SubType;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
public class FilterSpiritOrArcaneCard extends FilterSpell {
public FilterSpiritOrArcaneCard() {
this("a Spirit or Arcane spell");
}
public FilterSpiritOrArcaneCard(String name) {
super(name);
this.add(Predicates.or(SubType.SPIRIT.getPredicate(), SubType.ARCANE.getPredicate()));
}
protected FilterSpiritOrArcaneCard(final FilterSpiritOrArcaneCard filter) {
super(filter);
}
@Override
public FilterSpiritOrArcaneCard copy() {
return new FilterSpiritOrArcaneCard(this);
}
}

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