updated SpellCastTriggeredAbility to use FilterSpell

This commit is contained in:
BetaSteward 2012-03-08 22:49:23 -05:00
parent c9d2192eaf
commit 243fd32fa3
80 changed files with 309 additions and 196 deletions

View file

@ -51,11 +51,13 @@ import mage.game.permanent.token.SpiritToken;
*/
public class BakuAltar extends CardImpl<BakuAltar> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public BakuAltar(UUID ownerId) {
super(ownerId, 152, "Baku Altar", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "BOK";
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Baku Altar.
this.addAbility(new SpellCastTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance(1)), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance(1)), filter, true));
// {2}, {tap}, Remove a ki counter from Baku Altar: Put a 1/1 colorless Spirit creature token onto the battlefield.
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new SpiritToken(), 1), new GenericManaCost(2));
ability.addCost(new TapSourceCost());

View file

@ -45,6 +45,8 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
*/
public class KamiOfTatteredShoji extends CardImpl<KamiOfTatteredShoji> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public KamiOfTatteredShoji(UUID ownerId) {
super(ownerId, 11, "Kami of Tattered Shoji", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}");
this.expansionSetCode = "BOK";
@ -53,7 +55,7 @@ public class KamiOfTatteredShoji extends CardImpl<KamiOfTatteredShoji> {
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 SpellCastTriggeredAbility(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn), new FilterSpiritOrArcaneCard(), false));
this.addAbility(new SpellCastTriggeredAbility(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn), filter, false));
}
public KamiOfTatteredShoji(final KamiOfTatteredShoji card) {

View file

@ -45,6 +45,8 @@ import mage.game.permanent.token.Token;
*/
public class OyobiWhoSplitTheHeavens extends CardImpl<OyobiWhoSplitTheHeavens> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public OyobiWhoSplitTheHeavens(UUID ownerId) {
super(ownerId, 18, "Oyobi, Who Split the Heavens", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{W}");
this.expansionSetCode = "BOK";
@ -55,7 +57,7 @@ public class OyobiWhoSplitTheHeavens extends CardImpl<OyobiWhoSplitTheHeavens> {
this.toughness = new MageInt(6);
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Spirit or Arcane spell, put a 3/3 white Spirit creature token with flying onto the battlefield.
this.addAbility(new SpellCastTriggeredAbility(new CreateTokenEffect(new AnotherSpiritToken()), new FilterSpiritOrArcaneCard(), false));
this.addAbility(new SpellCastTriggeredAbility(new CreateTokenEffect(new AnotherSpiritToken()), filter, false));
}
public OyobiWhoSplitTheHeavens(final OyobiWhoSplitTheHeavens card) {

View file

@ -44,6 +44,8 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
*/
public class ScaledHulk extends CardImpl<ScaledHulk> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public ScaledHulk(UUID ownerId) {
super(ownerId, 143, "Scaled Hulk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{G}");
this.expansionSetCode = "BOK";
@ -52,7 +54,7 @@ public class ScaledHulk extends CardImpl<ScaledHulk> {
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 SpellCastTriggeredAbility(new BoostSourceEffect(2, 2, Constants.Duration.EndOfTurn), new FilterSpiritOrArcaneCard(), false));
this.addAbility(new SpellCastTriggeredAbility(new BoostSourceEffect(2, 2, Constants.Duration.EndOfTurn), filter, false));
}
public ScaledHulk(final ScaledHulk card) {

View file

@ -42,19 +42,17 @@ import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterSpiritOrArcaneCard;
/**
* @author Loki
*/
public class Earthshaker extends CardImpl<Earthshaker> {
private final static FilterCard spellFilter = new FilterCard("a Spirit or Arcane spell");
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
private final static FilterCreaturePermanent creatureFilter = new FilterCreaturePermanent("creature without flying");
static {
spellFilter.getSubtype().add("Spirit");
spellFilter.getSubtype().add("Arcane");
spellFilter.setScopeSubtype(Filter.ComparisonScope.Any);
creatureFilter.getAbilities().add((Ability) FlyingAbility.getInstance());
creatureFilter.setNotAbilities(true);
}
@ -66,7 +64,7 @@ public class Earthshaker extends CardImpl<Earthshaker> {
this.color.setRed(true);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
this.addAbility(new SpellCastTriggeredAbility(new DamageAllEffect(new StaticValue(2) , creatureFilter), spellFilter, false));
this.addAbility(new SpellCastTriggeredAbility(new DamageAllEffect(new StaticValue(2) , creatureFilter), filter, false));
}
public Earthshaker(final Earthshaker card) {

View file

@ -46,6 +46,9 @@ import mage.target.common.TargetCreaturePermanent;
* @author Loki
*/
public class GuardianOfSolitude extends CardImpl<GuardianOfSolitude> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public GuardianOfSolitude(UUID ownerId) {
super(ownerId, 64, "Guardian of Solitude", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.expansionSetCode = "CHK";
@ -53,7 +56,7 @@ public class GuardianOfSolitude extends CardImpl<GuardianOfSolitude> {
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(2);
Ability ability = new SpellCastTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn), filter, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -51,6 +51,9 @@ import mage.game.permanent.Permanent;
* @author Loki
*/
public class HikariTwilightGuardian extends CardImpl<HikariTwilightGuardian> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public HikariTwilightGuardian (UUID ownerId) {
super(ownerId, 12, "Hikari, Twilight Guardian", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
this.expansionSetCode = "CHK";
@ -60,7 +63,7 @@ public class HikariTwilightGuardian extends CardImpl<HikariTwilightGuardian> {
this.power = new MageInt(4);
this.toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new SpellCastTriggeredAbility(new HikariTwilightGuardianEffect(), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new HikariTwilightGuardianEffect(), filter, true));
}
public HikariTwilightGuardian (final HikariTwilightGuardian card) {

View file

@ -44,6 +44,9 @@ import mage.target.common.TargetCreaturePermanent;
* @author Loki
*/
public class HorizonSeed extends CardImpl<HorizonSeed> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public HorizonSeed(UUID ownerId) {
super(ownerId, 15, "Horizon Seed", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}");
this.expansionSetCode = "CHK";
@ -51,7 +54,7 @@ public class HorizonSeed extends CardImpl<HorizonSeed> {
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
Ability ability = new SpellCastTriggeredAbility(new RegenerateTargetEffect(), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new RegenerateTargetEffect(), filter, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -49,6 +49,9 @@ import mage.target.common.TargetCreaturePermanent;
* @author Loki
*/
public class InnocenceKami extends CardImpl<InnocenceKami> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public InnocenceKami(UUID ownerId) {
super(ownerId, 18, "Innocence Kami", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
this.expansionSetCode = "CHK";
@ -60,7 +63,7 @@ public class InnocenceKami extends CardImpl<InnocenceKami> {
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
this.addAbility(new SpellCastTriggeredAbility(new UntapSourceEffect(), new FilterSpiritOrArcaneCard(), false));
this.addAbility(new SpellCastTriggeredAbility(new UntapSourceEffect(), filter, false));
}
public InnocenceKami(final InnocenceKami card) {

View file

@ -40,6 +40,7 @@ import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.common.FilterSpiritOrArcaneCard;
import mage.game.permanent.token.Token;
/**
@ -47,14 +48,8 @@ import mage.game.permanent.token.Token;
*/
public class JadeIdol extends CardImpl<JadeIdol> {
private final static FilterCard filter = new FilterCard("a Spirit or Arcane spell");
static {
filter.getSubtype().add("Spirit");
filter.getSubtype().add("Arcane");
filter.setScopeSubtype(Filter.ComparisonScope.Any);
}
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public JadeIdol(UUID ownerId) {
super(ownerId, 256, "Jade Idol", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
this.expansionSetCode = "CHK";

View file

@ -46,6 +46,9 @@ import mage.target.common.TargetCreaturePermanent;
* @author Loki
*/
public class KamiOfFiresRoar extends CardImpl<KamiOfFiresRoar> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public KamiOfFiresRoar(UUID ownerId) {
super(ownerId, 174, "Kami of Fire's Roar", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.expansionSetCode = "CHK";
@ -53,7 +56,7 @@ public class KamiOfFiresRoar extends CardImpl<KamiOfFiresRoar> {
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
Ability ability = new SpellCastTriggeredAbility(new GainAbilityTargetEffect(CantBlockAbility.getInstance(), Constants.Duration.EndOfTurn), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new GainAbilityTargetEffect(CantBlockAbility.getInstance(), Constants.Duration.EndOfTurn), filter, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -44,6 +44,8 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
*/
public class KamiOfTheHunt extends CardImpl<KamiOfTheHunt> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public KamiOfTheHunt(UUID ownerId) {
super(ownerId, 219, "Kami of the Hunt", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.expansionSetCode = "CHK";
@ -51,7 +53,7 @@ public class KamiOfTheHunt extends CardImpl<KamiOfTheHunt> {
this.color.setGreen(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.addAbility(new SpellCastTriggeredAbility(new BoostSourceEffect(1, 1, Constants.Duration.EndOfTurn), new FilterSpiritOrArcaneCard(), false));
this.addAbility(new SpellCastTriggeredAbility(new BoostSourceEffect(1, 1, Constants.Duration.EndOfTurn), filter, false));
}
public KamiOfTheHunt(final KamiOfTheHunt card) {

View file

@ -47,6 +47,9 @@ import mage.target.common.TargetCreaturePermanent;
* @author Loki
*/
public class KamiOfTheWaningMoon extends CardImpl<KamiOfTheWaningMoon> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public KamiOfTheWaningMoon(UUID ownerId) {
super(ownerId, 120, "Kami of the Waning Moon", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.expansionSetCode = "CHK";
@ -55,7 +58,7 @@ public class KamiOfTheWaningMoon extends CardImpl<KamiOfTheWaningMoon> {
this.power = new MageInt(1);
this.toughness = new MageInt(1);
this.addAbility(FlyingAbility.getInstance());
Ability ability = new SpellCastTriggeredAbility(new GainAbilityTargetEffect(FearAbility.getInstance(), Constants.Duration.EndOfTurn), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new GainAbilityTargetEffect(FearAbility.getInstance(), Constants.Duration.EndOfTurn), filter, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -47,6 +47,9 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
* @author Loki
*/
public class KodamaOfTheSouthTree extends CardImpl<KodamaOfTheSouthTree> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public KodamaOfTheSouthTree(UUID ownerId) {
super(ownerId, 223, "Kodama of the South Tree", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.expansionSetCode = "CHK";
@ -55,7 +58,7 @@ public class KodamaOfTheSouthTree extends CardImpl<KodamaOfTheSouthTree> {
this.color.setGreen(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
Ability ability = new SpellCastTriggeredAbility(new BoostControlledEffect(1, 1, Constants.Duration.EndOfTurn, new FilterCreaturePermanent(), true), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new BoostControlledEffect(1, 1, Constants.Duration.EndOfTurn, new FilterCreaturePermanent(), true), filter, false);
ability.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Constants.Duration.EndOfTurn, new FilterCreaturePermanent(), true));
this.addAbility(ability);
}

View file

@ -47,6 +47,9 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
* @author Loki
*/
public class OrbweaverKumo extends CardImpl<OrbweaverKumo> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public OrbweaverKumo(UUID ownerId) {
super(ownerId, 231, "Orbweaver Kumo", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
this.expansionSetCode = "CHK";
@ -55,7 +58,7 @@ public class OrbweaverKumo extends CardImpl<OrbweaverKumo> {
this.power = new MageInt(3);
this.toughness = new MageInt(4);
this.addAbility(ReachAbility.getInstance());
this.addAbility(new SpellCastTriggeredAbility(new GainAbilitySourceEffect(new ForestwalkAbility(), Constants.Duration.EndOfTurn), new FilterSpiritOrArcaneCard(), false));
this.addAbility(new SpellCastTriggeredAbility(new GainAbilitySourceEffect(new ForestwalkAbility(), Constants.Duration.EndOfTurn), filter, false));
}
public OrbweaverKumo(final OrbweaverKumo card) {

View file

@ -44,6 +44,9 @@ import mage.target.common.TargetNonBasicLandPermanent;
* @author Loki
*/
public class OreGorger extends CardImpl<OreGorger> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public OreGorger(UUID ownerId) {
super(ownerId, 182, "Ore Gorger", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.expansionSetCode = "CHK";
@ -51,7 +54,7 @@ public class OreGorger extends CardImpl<OreGorger> {
this.color.setRed(true);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
Ability ability = new SpellCastTriggeredAbility(new DestroyTargetEffect(), new FilterSpiritOrArcaneCard(), true);
Ability ability = new SpellCastTriggeredAbility(new DestroyTargetEffect(), filter, true);
ability.addTarget(new TargetNonBasicLandPermanent());
this.addAbility(ability);
}

View file

@ -43,6 +43,9 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
* @author Loki
*/
public class SireOfTheStorm extends CardImpl<SireOfTheStorm> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public SireOfTheStorm(UUID ownerId) {
super(ownerId, 85, "Sire of the Storm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}{U}");
this.expansionSetCode = "CHK";
@ -52,7 +55,7 @@ public class SireOfTheStorm extends CardImpl<SireOfTheStorm> {
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new SpellCastTriggeredAbility(new DrawCardControllerEffect(1), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new DrawCardControllerEffect(1), filter, true));
}
public SireOfTheStorm(final SireOfTheStorm card) {

View file

@ -46,6 +46,9 @@ import mage.target.common.TargetLandPermanent;
* @author Loki
*/
public class Soilshaper extends CardImpl<Soilshaper> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public Soilshaper(UUID ownerId) {
super(ownerId, 243, "Soilshaper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.expansionSetCode = "CHK";
@ -53,7 +56,7 @@ public class Soilshaper extends CardImpl<Soilshaper> {
this.color.setGreen(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
Ability ability = new SpellCastTriggeredAbility(new BecomesCreatureTargetEffect(new SoilshaperToken(), "land", Duration.EndOfTurn), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new BecomesCreatureTargetEffect(new SoilshaperToken(), "land", Duration.EndOfTurn), filter, false);
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
}

View file

@ -44,6 +44,9 @@ import mage.target.common.TargetCreaturePermanent;
* @author Loki
*/
public class SoulOfMagma extends CardImpl<SoulOfMagma> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public SoulOfMagma(UUID ownerId) {
super(ownerId, 189, "Soul of Magma", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.expansionSetCode = "CHK";
@ -51,7 +54,7 @@ public class SoulOfMagma extends CardImpl<SoulOfMagma> {
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
Ability ability = new SpellCastTriggeredAbility(new DamageTargetEffect(1), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new DamageTargetEffect(1), filter, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -48,7 +48,9 @@ import mage.target.common.TargetCreaturePermanent;
public class TellerOfTales extends CardImpl<TellerOfTales> {
// Outcome.Benefit, "tap or untap target creature"
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
// Outcome.Benefit, "tap or untap target creature"
public TellerOfTales(UUID ownerId) {
super(ownerId, 95, "Teller of Tales", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
@ -60,7 +62,7 @@ public class TellerOfTales extends CardImpl<TellerOfTales> {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Spirit or Arcane spell, you may tap or untap target creature.
Ability ability = new SpellCastTriggeredAbility(new MayTapOrUntapTargetEffect(),new FilterSpiritOrArcaneCard(), true);
Ability ability = new SpellCastTriggeredAbility(new MayTapOrUntapTargetEffect(),filter, true);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -46,6 +46,9 @@ import mage.target.common.TargetOpponent;
* @author Loki
*/
public class ThiefOfHope extends CardImpl<ThiefOfHope> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public ThiefOfHope(UUID ownerId) {
super(ownerId, 147, "Thief of Hope", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.expansionSetCode = "CHK";
@ -53,7 +56,7 @@ public class ThiefOfHope extends CardImpl<ThiefOfHope> {
this.color.setBlack(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
Ability ability = new SpellCastTriggeredAbility(new LoseLifeTargetEffect(1), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new LoseLifeTargetEffect(1), filter, false);
ability.addEffect(new GainLifeEffect(1));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);

View file

@ -34,7 +34,7 @@ import mage.Constants.Rarity;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.permanent.token.AngelToken;
/**
@ -43,7 +43,7 @@ import mage.game.permanent.token.AngelToken;
*/
public class SigilOfTheEmptyThrone extends CardImpl<SigilOfTheEmptyThrone> {
private static final FilterCard filter = new FilterCard("an enchantment spell");
private static final FilterSpell filter = new FilterSpell("an enchantment spell");
static {
filter.getCardType().add(CardType.ENCHANTMENT);

View file

@ -28,7 +28,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -41,7 +40,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.TargetPlayer;
@ -52,8 +51,8 @@ public class BalefireLiege extends CardImpl<BalefireLiege> {
private final static FilterCreaturePermanent filterRedCreature = new FilterCreaturePermanent("red creatures");
private final static FilterCreaturePermanent filterWhiteCreature = new FilterCreaturePermanent("white creatures");
private final static FilterCard filterRedSpell = new FilterCard("a red spell");
private final static FilterCard filterWhiteSpell = new FilterCard("a white spell");
private final static FilterSpell filterRedSpell = new FilterSpell("a red spell");
private final static FilterSpell filterWhiteSpell = new FilterSpell("a white spell");
static {
filterRedCreature.setUseColor(true);

View file

@ -28,7 +28,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -41,7 +40,7 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.target.common.TargetCreaturePermanent;
/**
@ -49,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class BallynockTrapper extends CardImpl<BallynockTrapper> {
private final static FilterCard filterWhiteSpell = new FilterCard("a white spell");
private final static FilterSpell filterWhiteSpell = new FilterSpell("a white spell");
static {
filterWhiteSpell.setUseColor(true);

View file

@ -28,7 +28,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
@ -40,15 +39,15 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
* @author Loki
*/
public class BelligerentHatchling extends CardImpl<BelligerentHatchling> {
private final static FilterCard filterRedSpell = new FilterCard("a red spell");
private final static FilterCard filterWhiteSpell = new FilterCard("a white spell");
private final static FilterSpell filterRedSpell = new FilterSpell("a red spell");
private final static FilterSpell filterWhiteSpell = new FilterSpell("a white spell");
static {
filterRedSpell.setUseColor(true);

View file

@ -29,7 +29,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -41,7 +40,7 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.target.TargetPlayer;
/**
@ -49,7 +48,7 @@ import mage.target.TargetPlayer;
* @author Loki
*/
public class CinderPyromancer extends CardImpl<CinderPyromancer> {
private static final FilterCard filter = new FilterCard("a red spell");
private static final FilterSpell filter = new FilterSpell("a red spell");
static {
filter.getColor().setRed(true);

View file

@ -29,7 +29,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -37,13 +36,11 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -56,8 +53,8 @@ import mage.target.common.TargetCreaturePermanent;
public class DeathbringerLiege extends CardImpl<DeathbringerLiege> {
private final static FilterCreaturePermanent filterWhite = new FilterCreaturePermanent("white creatures");
private final static FilterCreaturePermanent filterBlack = new FilterCreaturePermanent("black creatures");
private final static FilterCard filterWhiteSpellCard = new FilterCard("a white spell");
private final static FilterCard filterBlackSpellCard = new FilterCard("a black spell");
private final static FilterSpell filterWhiteSpellCard = new FilterSpell("a white spell");
private final static FilterSpell filterBlackSpellCard = new FilterSpell("a black spell");
static {
filterWhite.setUseColor(true);

View file

@ -28,7 +28,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
@ -37,7 +36,7 @@ import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.WolfToken;
@ -46,8 +45,8 @@ import mage.game.permanent.token.WolfToken;
*/
public class FableOfWolfAndOwl extends CardImpl<FableOfWolfAndOwl> {
private final static FilterCard filterGreenSpell = new FilterCard("a green spell");
private final static FilterCard filterBlueSpell = new FilterCard("a blue spell");
private final static FilterSpell filterGreenSpell = new FilterSpell("a green spell");
private final static FilterSpell filterBlueSpell = new FilterSpell("a blue spell");
static {
filterGreenSpell.setUseColor(true);

View file

@ -28,7 +28,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -42,7 +41,7 @@ import mage.abilities.effects.common.UntapSourceEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.target.common.TargetCreaturePermanent;
/**
@ -52,7 +51,7 @@ import mage.target.common.TargetCreaturePermanent;
public class MerrowLevitator extends CardImpl<MerrowLevitator> {
private final static FilterCard filterBlueSpell = new FilterCard("a blue spell");
private final static FilterSpell filterBlueSpell = new FilterSpell("a blue spell");
static {
filterBlueSpell.setUseColor(true);

View file

@ -39,7 +39,7 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.abilities.keyword.WitherAbility;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -47,8 +47,8 @@ import mage.filter.FilterCard;
*/
public class NoxiousHatchling extends CardImpl<NoxiousHatchling> {
private final static FilterCard filterBlackSpell = new FilterCard("a black spell");
private final static FilterCard filterGreenSpell = new FilterCard("a green spell");
private final static FilterSpell filterBlackSpell = new FilterSpell("a black spell");
private final static FilterSpell filterGreenSpell = new FilterSpell("a green spell");
static {
filterBlackSpell.setUseColor(true);

View file

@ -28,7 +28,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -44,15 +43,15 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.abilities.keyword.ShroudAbility;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
* @author Loki
*/
public class SturdyHatchling extends CardImpl<SturdyHatchling> {
private final static FilterCard filterGreenSpell = new FilterCard("a green spell");
private final static FilterCard filterBlueSpell = new FilterCard("a blue spell");
private final static FilterSpell filterGreenSpell = new FilterSpell("a green spell");
private final static FilterSpell filterBlueSpell = new FilterSpell("a blue spell");
static {
filterGreenSpell.setUseColor(true);

View file

@ -28,7 +28,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
@ -40,15 +39,15 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
* @author Loki
*/
public class VoraciousHatchling extends CardImpl<VoraciousHatchling> {
private final static FilterCard filterWhiteSpell = new FilterCard("a white spell");
private final static FilterCard filterBlackSpell = new FilterCard("a black spell");
private final static FilterSpell filterWhiteSpell = new FilterSpell("a white spell");
private final static FilterSpell filterBlackSpell = new FilterSpell("a black spell");
static {
filterWhiteSpell.setUseColor(true);

View file

@ -40,7 +40,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.target.common.TargetCreatureOrPlayer;
/**
@ -49,7 +49,7 @@ import mage.target.common.TargetCreatureOrPlayer;
*/
public class Gelectrode extends CardImpl<Gelectrode> {
private final static FilterCard filter = new FilterCard("an instant or sorcery spell");
private final static FilterSpell filter = new FilterSpell("an instant or sorcery spell");
static {
filter.getCardType().add(CardType.INSTANT);

View file

@ -38,7 +38,7 @@ import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
@ -48,9 +48,9 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class TiborAndLumia extends CardImpl<TiborAndLumia> {
private final static FilterCard filterBlue = new FilterCard("a blue spell");
private final static FilterSpell filterBlue = new FilterSpell("a blue spell");
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying");
private final static FilterCard filterRed = new FilterCard("a red spell");
private final static FilterSpell filterRed = new FilterSpell("a red spell");
static {
filterBlue.setUseColor(true);
@ -60,13 +60,7 @@ public class TiborAndLumia extends CardImpl<TiborAndLumia> {
filterRed.setUseColor(true);
filterRed.getColor().setRed(true);
}
static {
}
public TiborAndLumia(UUID ownerId) {
super(ownerId, 135, "Tibor and Lumia", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{R}");
this.expansionSetCode = "GPT";

View file

@ -37,14 +37,14 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
* @author Loki
*/
public class WeeDragonauts extends CardImpl<WeeDragonauts> {
private final static FilterCard filter = new FilterCard("instant or sorcery spell");
private final static FilterSpell filter = new FilterSpell("instant or sorcery spell");
static {
filter.getCardType().add(CardType.INSTANT);

View file

@ -44,6 +44,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.events.GameEvent.EventType;
import mage.players.Player;
@ -54,7 +55,7 @@ import mage.players.Player;
*/
public class CharmbreakerDevils extends CardImpl<CharmbreakerDevils> {
private static final FilterCard filter = new FilterCard("instant or sorcery card");
private static final FilterSpell filter = new FilterSpell("instant or sorcery card");
static {
filter.getCardType().add(CardType.INSTANT);

View file

@ -27,6 +27,7 @@
*/
package mage.sets.lorwyn;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
@ -35,9 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.FilterCard;
import java.util.UUID;
import mage.filter.FilterSpell;
/**
*
@ -45,7 +44,7 @@ import java.util.UUID;
*/
public class ElvishHandservant extends CardImpl<ElvishHandservant> {
private final static FilterCard filter = new FilterCard("Giant");
private final static FilterSpell filter = new FilterSpell("Giant");
static {
filter.getSubtype().add("Giant");

View file

@ -27,6 +27,7 @@
*/
package mage.sets.lorwyn;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
@ -34,18 +35,16 @@ import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.permanent.token.ElfToken;
import java.util.UUID;
/**
*
* @author Loki
*/
public class LysAlanaHuntmaster extends CardImpl<LysAlanaHuntmaster> {
private final static FilterCard filter = new FilterCard("Elf spell");
private final static FilterSpell filter = new FilterSpell("Elf spell");
static {
filter.getSubtype().add("Elf");

View file

@ -27,6 +27,7 @@
*/
package mage.sets.lorwyn;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -36,18 +37,16 @@ import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author Loki
*/
public class ThorntoothWitch extends CardImpl<ThorntoothWitch> {
private final static FilterCard filter = new FilterCard("Treefolk");
private final static FilterSpell filter = new FilterSpell("Treefolk");
static {
filter.getSubtype().add("Treefolk");

View file

@ -34,7 +34,7 @@ import mage.MageInt;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -42,7 +42,7 @@ import mage.filter.FilterCard;
*/
public class MesaEnchantress extends CardImpl<MesaEnchantress> {
private static final FilterCard filter = new FilterCard("an enchantment spell");
private static final FilterSpell filter = new FilterSpell("an enchantment spell");
static {
filter.getCardType().add(CardType.ENCHANTMENT);

View file

@ -27,6 +27,7 @@
*/
package mage.sets.magic2012;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -38,25 +39,23 @@ import mage.abilities.keyword.BloodthirstAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import java.util.UUID;
/**
* @author nantuko
*/
public class BloodlordOfVaasgoth extends CardImpl<BloodlordOfVaasgoth> {
private static final FilterCard filterCard = new FilterCard("a Vampire creature spell");
private static final FilterSpell filter = new FilterSpell("a Vampire creature spell");
static {
filterCard.getCardType().add(CardType.CREATURE);
filterCard.setScopeCardType(Filter.ComparisonScope.Any);
filterCard.getSubtype().add("Vampire");
filterCard.setScopeSubtype(Filter.ComparisonScope.Any);
filter.getCardType().add(CardType.CREATURE);
filter.setScopeCardType(Filter.ComparisonScope.Any);
filter.getSubtype().add("Vampire");
filter.setScopeSubtype(Filter.ComparisonScope.Any);
}
public BloodlordOfVaasgoth(UUID ownerId) {
@ -75,7 +74,7 @@ public class BloodlordOfVaasgoth extends CardImpl<BloodlordOfVaasgoth> {
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Vampire creature spell, it gains bloodthirst 3.
this.addAbility(new SpellCastTriggeredAbility(new BloodlordOfVaasgothEffect(), filterCard, false, true));
this.addAbility(new SpellCastTriggeredAbility(new BloodlordOfVaasgothEffect(), filter, false, true));
}
public BloodlordOfVaasgoth(final BloodlordOfVaasgoth card) {

View file

@ -34,7 +34,7 @@ import mage.MageInt;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactCard;
import mage.filter.FilterSpell;
import mage.target.common.TargetCreaturePermanent;
/**
@ -43,7 +43,7 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class MirranSpy extends CardImpl<MirranSpy> {
private static final FilterArtifactCard filter = new FilterArtifactCard("an artifact spell");
private static final FilterSpell filter = new FilterSpell("an artifact spell");
public MirranSpy(UUID ownerId) {
super(ownerId, 26, "Mirran Spy", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");

View file

@ -28,7 +28,6 @@
package mage.sets.morningtide;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -42,7 +41,7 @@ import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -50,7 +49,7 @@ import mage.filter.FilterCard;
*/
public class InspiredSprite extends CardImpl<InspiredSprite> {
private final static FilterCard filter = new FilterCard("Wizard");
private final static FilterSpell filter = new FilterSpell("Wizard");
static {
filter.getSubtype().add("Wizard");

View file

@ -38,7 +38,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class LysAlanaBowmaster extends CardImpl<LysAlanaBowmaster> {
private final static FilterCard filterElf = new FilterCard("Elf");
private final static FilterSpell filterElf = new FilterSpell("Elf");
private final static FilterCreaturePermanent filterFlying = new FilterCreaturePermanent("creature with flying");
static {

View file

@ -45,7 +45,7 @@ import mage.abilities.effects.common.DynamicManaEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -53,7 +53,7 @@ import mage.filter.FilterCard;
*/
public class ShrineOfBoundlessGrowth extends CardImpl<ShrineOfBoundlessGrowth> {
private static final FilterCard filter = new FilterCard("a green spell");
private static final FilterSpell filter = new FilterSpell("a green spell");
static {
filter.getColor().setGreen(true);

View file

@ -29,7 +29,6 @@
package mage.sets.newphyrexia;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -45,7 +44,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.target.common.TargetCreatureOrPlayer;
/**
@ -53,7 +52,7 @@ import mage.target.common.TargetCreatureOrPlayer;
* @author <author>
*/
public class ShrineOfBurningRage extends CardImpl<ShrineOfBurningRage> {
private final static FilterCard filter = new FilterCard("a red spell");
private final static FilterSpell filter = new FilterSpell("a red spell");
static {
filter.getColor().setRed(true);

View file

@ -44,7 +44,7 @@ import mage.abilities.effects.common.DiscardTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.target.TargetPlayer;
/**
@ -53,7 +53,7 @@ import mage.target.TargetPlayer;
*/
public class ShrineOfLimitlessPower extends CardImpl<ShrineOfLimitlessPower> {
private static final FilterCard filter = new FilterCard("a black spell");
private static final FilterSpell filter = new FilterSpell("a black spell");
static {
filter.getColor().setBlack(true);

View file

@ -44,7 +44,7 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.permanent.token.MyrToken;
/**
@ -53,7 +53,7 @@ import mage.game.permanent.token.MyrToken;
*/
public class ShrineOfLoyalLegions extends CardImpl<ShrineOfLoyalLegions> {
private static final FilterCard filter = new FilterCard("a white spell");
private static final FilterSpell filter = new FilterSpell("a white spell");
static {
filter.getColor().setWhite(true);

View file

@ -47,6 +47,7 @@ import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -58,7 +59,7 @@ import mage.target.TargetCard;
*/
public class ShrineOfPiercingVision extends CardImpl<ShrineOfPiercingVision> {
private static final FilterCard filter = new FilterCard("a blue spell");
private static final FilterSpell filter = new FilterSpell("a blue spell");
static {
filter.getColor().setBlue(true);

View file

@ -28,7 +28,6 @@
package mage.sets.ravnika;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -37,7 +36,8 @@ import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreatureCard;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.game.permanent.token.Token;
/**
@ -46,6 +46,13 @@ import mage.game.permanent.token.Token;
*/
public class HalcyonGlaze extends CardImpl<HalcyonGlaze> {
private static final FilterSpell filter = new FilterSpell("a creature spell");
static {
filter.getCardType().add(CardType.CREATURE);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public HalcyonGlaze(UUID ownerId) {
super(ownerId, 54, "Halcyon Glaze", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}");
this.expansionSetCode = "RAV";
@ -53,7 +60,7 @@ public class HalcyonGlaze extends CardImpl<HalcyonGlaze> {
this.color.setBlue(true);
// Whenever you cast a creature spell, Halcyon Glaze becomes a 4/4 Illusion creature with flying until end of turn. It's still an enchantment.
this.addAbility(new SpellCastTriggeredAbility(new BecomesCreatureSourceEffect(new HalcyonGlazeToken(), "enchantment", Constants.Duration.EndOfTurn), new FilterCreatureCard(), false));
this.addAbility(new SpellCastTriggeredAbility(new BecomesCreatureSourceEffect(new HalcyonGlazeToken(), "enchantment", Constants.Duration.EndOfTurn), filter, false));
}
public HalcyonGlaze(final HalcyonGlaze card) {

View file

@ -34,6 +34,8 @@ import mage.MageInt;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreatureCard;
/**
@ -42,6 +44,13 @@ import mage.filter.common.FilterCreatureCard;
*/
public class PrimordialSage extends CardImpl<PrimordialSage> {
private static final FilterSpell filter = new FilterSpell("a creature spell");
static {
filter.getCardType().add(CardType.CREATURE);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public PrimordialSage(UUID ownerId) {
super(ownerId, 177, "Primordial Sage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
this.expansionSetCode = "RAV";
@ -52,7 +61,7 @@ public class PrimordialSage extends CardImpl<PrimordialSage> {
this.toughness = new MageInt(5);
// Whenever you cast a creature spell, you may draw a card.
this.addAbility(new SpellCastTriggeredAbility(new DrawCardControllerEffect(1), new FilterCreatureCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new DrawCardControllerEffect(1), filter, true));
}
public PrimordialSage(final PrimordialSage card) {

View file

@ -36,7 +36,7 @@ import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -44,7 +44,7 @@ import mage.filter.FilterCard;
*/
public class KilnFiend extends CardImpl<KilnFiend> {
private static final FilterCard filter = new FilterCard("an instant or sorcery spell");
private static final FilterSpell filter = new FilterSpell("an instant or sorcery spell");
static {
filter.getCardType().add(CardType.INSTANT);
filter.getCardType().add(CardType.SORCERY);

View file

@ -39,7 +39,7 @@ import mage.abilities.dynamicvalue.common.AuraAttachedCount;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -47,7 +47,7 @@ import mage.filter.FilterCard;
*/
public class KorSpiritdancer extends CardImpl<KorSpiritdancer> {
private static final FilterCard filter = new FilterCard("an Aura spell");
private static final FilterSpell filter = new FilterSpell("an Aura spell");
static {
filter.getSubtype().add("Aura");

View file

@ -37,7 +37,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.Filter.ComparisonScope;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -49,7 +49,7 @@ import mage.target.common.TargetCreatureOrPlayer;
*/
public class SphinxBoneWand extends CardImpl<SphinxBoneWand> {
private static final FilterCard filter = new FilterCard("an instant or sorcery spell");
private static final FilterSpell filter = new FilterSpell("an instant or sorcery spell");
static {
filter.getCardType().add(CardType.INSTANT);

View file

@ -45,6 +45,8 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class BriarknitKami extends CardImpl<BriarknitKami> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public BriarknitKami(UUID ownerId) {
super(ownerId, 124, "Briarknit Kami", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
this.expansionSetCode = "SOK";
@ -53,7 +55,7 @@ public class BriarknitKami extends CardImpl<BriarknitKami> {
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 SpellCastTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new FilterSpiritOrArcaneCard(), false);
Ability ability = new SpellCastTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), filter, false);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -42,6 +42,8 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
*/
public class FiddleheadKami extends CardImpl<FiddleheadKami> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public FiddleheadKami(UUID ownerId) {
super(ownerId, 130, "Fiddlehead Kami", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.expansionSetCode = "SOK";
@ -51,7 +53,7 @@ public class FiddleheadKami extends CardImpl<FiddleheadKami> {
this.toughness = new MageInt(3);
// Whenever you cast a Spirit or Arcane spell, regenerate Fiddlehead Kami.
this.addAbility(new SpellCastTriggeredAbility(new RegenerateSourceEffect(), new FilterSpiritOrArcaneCard(), false));
this.addAbility(new SpellCastTriggeredAbility(new RegenerateSourceEffect(), filter, false));
}
public FiddleheadKami(final FiddleheadKami card) {

View file

@ -44,6 +44,8 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
*/
public class HaruOnna extends CardImpl<HaruOnna> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public HaruOnna(UUID ownerId) {
super(ownerId, 132, "Haru-Onna", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.expansionSetCode = "SOK";
@ -55,7 +57,7 @@ public class HaruOnna extends CardImpl<HaruOnna> {
// When Haru-Onna enters the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(1)));
// Whenever you cast a Spirit or Arcane spell, you may return Haru-Onna to its owner's hand.
this.addAbility(new SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
}
public HaruOnna(final HaruOnna card) {

View file

@ -46,6 +46,8 @@ import mage.target.TargetPlayer;
*/
public class KemuriOnna extends CardImpl<KemuriOnna> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public KemuriOnna(UUID ownerId) {
super(ownerId, 76, "Kemuri-Onna", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.expansionSetCode = "SOK";
@ -59,7 +61,7 @@ public class KemuriOnna extends CardImpl<KemuriOnna> {
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 SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
}
public KemuriOnna(final KemuriOnna card) {

View file

@ -46,6 +46,8 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class KiriOnna extends CardImpl<KiriOnna> {
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public KiriOnna(UUID ownerId) {
super(ownerId, 43, "Kiri-Onna", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}");
this.expansionSetCode = "SOK";
@ -59,7 +61,7 @@ public class KiriOnna extends CardImpl<KiriOnna> {
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 SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
}
public KiriOnna(final KiriOnna card) {

View file

@ -48,7 +48,8 @@ import mage.target.TargetPermanent;
*/
public class NikkoOnna extends CardImpl<NikkoOnna> {
private final static FilterPermanent filter = new FilterPermanent("enchantment");
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
private final static FilterPermanent filterTarget = new FilterPermanent("enchantment");
static {
filter.getCardType().add(CardType.ENCHANTMENT);
@ -65,10 +66,10 @@ public class NikkoOnna extends CardImpl<NikkoOnna> {
// When Nikko-Onna enters the battlefield, destroy target enchantment.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
ability.addTarget(new TargetPermanent(filter));
ability.addTarget(new TargetPermanent(filterTarget));
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Nikko-Onna to its owner's hand.
this.addAbility(new SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
}
public NikkoOnna(final NikkoOnna card) {

View file

@ -35,7 +35,7 @@ import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -43,7 +43,7 @@ import mage.filter.FilterCard;
*/
public class RekiTheHistoryOfKamigawa extends CardImpl<RekiTheHistoryOfKamigawa> {
private final static FilterCard filter = new FilterCard("legendary spell");
private final static FilterSpell filter = new FilterSpell("legendary spell");
static {
filter.getSupertype().add("Legendary");

View file

@ -48,7 +48,8 @@ import mage.target.TargetPermanent;
*/
public class YukiOnna extends CardImpl<YukiOnna> {
private final static FilterPermanent filter = new FilterPermanent("artifact");
private final static FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
private final static FilterPermanent filterTarget = new FilterPermanent("artifact");
static {
filter.getCardType().add(CardType.ARTIFACT);
@ -65,10 +66,10 @@ public class YukiOnna extends CardImpl<YukiOnna> {
// When Yuki-Onna enters the battlefield, destroy target artifact.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
ability.addTarget(new TargetPermanent(filter));
ability.addTarget(new TargetPermanent(filterTarget));
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Yuki-Onna to its owner's hand.
this.addAbility(new SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
}
public YukiOnna(final YukiOnna card) {

View file

@ -29,7 +29,6 @@
package mage.sets.scarsofmirrodin;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -40,7 +39,8 @@ import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactCard;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -51,7 +51,11 @@ import mage.target.common.TargetCreatureOrPlayer;
*/
public class Embersmith extends CardImpl<Embersmith> {
private static final FilterArtifactCard filter = new FilterArtifactCard("an artifact spell");
private static final FilterSpell filter = new FilterSpell("an artifact spell");
static {
filter.getCardType().add(CardType.ARTIFACT);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public Embersmith(UUID ownerId) {
super(ownerId, 87, "Embersmith", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");

View file

@ -36,11 +36,12 @@ import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.common.FilterArtifactCard;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.game.permanent.token.Token;
/**
@ -49,7 +50,11 @@ import mage.game.permanent.token.Token;
*/
public class GolemFoundry extends CardImpl<GolemFoundry> {
private static final FilterArtifactCard filter = new FilterArtifactCard("an artifact spell");
private static final FilterSpell filter = new FilterSpell("an artifact spell");
static {
filter.getCardType().add(CardType.ARTIFACT);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public GolemFoundry (UUID ownerId) {
super(ownerId, 160, "Golem Foundry", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{3}");

View file

@ -43,6 +43,8 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreatureCard;
/**
@ -52,12 +54,14 @@ import mage.filter.common.FilterCreatureCard;
public class HandOfThePraetors extends CardImpl<HandOfThePraetors> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with infect");
private static final FilterCreatureCard filterSpell = new FilterCreatureCard("a creature spell with infect");
private static final FilterSpell filterSpell = new FilterSpell("a creature spell with infect");
static {
filter.getAbilities().add(InfectAbility.getInstance());
filter.setNotAbilities(false);
filterSpell.getAbilities().add(InfectAbility.getInstance());
filterSpell.getCardType().add(CardType.CREATURE);
filterSpell.setScopeCardType(Filter.ComparisonScope.Any);
}
public HandOfThePraetors (UUID ownerId) {

View file

@ -29,7 +29,6 @@
package mage.sets.scarsofmirrodin;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -40,7 +39,8 @@ import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactCard;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.players.Player;
@ -50,7 +50,11 @@ import mage.players.Player;
*/
public class Lifesmith extends CardImpl<Lifesmith> {
private static final FilterArtifactCard filter = new FilterArtifactCard("an artifact spell");
private static final FilterSpell filter = new FilterSpell("an artifact spell");
static {
filter.getCardType().add(CardType.ARTIFACT);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public Lifesmith (UUID ownerId) {
super(ownerId, 124, "Lifesmith", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");

View file

@ -29,7 +29,6 @@
package mage.sets.scarsofmirrodin;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
@ -40,7 +39,8 @@ import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactCard;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.permanent.token.MyrToken;
@ -50,7 +50,11 @@ import mage.game.permanent.token.MyrToken;
*/
public class Myrsmith extends CardImpl<Myrsmith> {
private static final FilterArtifactCard filter = new FilterArtifactCard("an artifact spell");
private static final FilterSpell filter = new FilterSpell("an artifact spell");
static {
filter.getCardType().add(CardType.ARTIFACT);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public Myrsmith (UUID ownerId) {
super(ownerId, 16, "Myrsmith", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");

View file

@ -29,7 +29,6 @@
package mage.sets.scarsofmirrodin;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
@ -39,7 +38,8 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactCard;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.target.common.TargetCreaturePermanent;
/**
@ -48,7 +48,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class Painsmith extends CardImpl<Painsmith> {
private static final FilterArtifactCard filter = new FilterArtifactCard("an artifact spell");
private static final FilterSpell filter = new FilterSpell("an artifact spell");
static {
filter.getCardType().add(CardType.ARTIFACT);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public Painsmith (UUID ownerId) {
super(ownerId, 74, "Painsmith", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}");

View file

@ -29,14 +29,14 @@
package mage.sets.scarsofmirrodin;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactCard;
import mage.filter.Filter;
import mage.filter.FilterSpell;
/**
*
@ -44,7 +44,11 @@ import mage.filter.common.FilterArtifactCard;
*/
public class Riddlesmith extends CardImpl<Riddlesmith> {
private static final FilterArtifactCard filter = new FilterArtifactCard("an artifact spell");
private static final FilterSpell filter = new FilterSpell("an artifact spell");
static {
filter.getCardType().add(CardType.ARTIFACT);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public Riddlesmith (UUID ownerId) {
super(ownerId, 40, "Riddlesmith", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");

View file

@ -37,7 +37,7 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -45,8 +45,8 @@ import mage.filter.FilterCard;
*/
public class EmberstrikeDuo extends CardImpl<EmberstrikeDuo> {
private static final FilterCard blackFilter = new FilterCard("a black spell");
private static final FilterCard redFilter = new FilterCard("a red spell");
private static final FilterSpell blackFilter = new FilterSpell("a black spell");
private static final FilterSpell redFilter = new FilterSpell("a red spell");
static {
blackFilter.getColor().setBlack(true);

View file

@ -37,7 +37,7 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -45,8 +45,8 @@ import mage.filter.FilterCard;
*/
public class GravelgillDuo extends CardImpl<GravelgillDuo> {
private static final FilterCard blueFilter = new FilterCard("a blue spell");
private static final FilterCard blackFilter = new FilterCard("a black spell");
private static final FilterSpell blueFilter = new FilterSpell("a blue spell");
private static final FilterSpell blackFilter = new FilterSpell("a black spell");
static {
blueFilter.getColor().setBlue(true);

View file

@ -37,7 +37,7 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -45,8 +45,8 @@ import mage.filter.FilterCard;
*/
public class SafeholdDuo extends CardImpl<SafeholdDuo> {
private static final FilterCard whiteFilter = new FilterCard("a white spell");
private static final FilterCard greenFilter = new FilterCard("a green spell");
private static final FilterSpell whiteFilter = new FilterSpell("a white spell");
private static final FilterSpell greenFilter = new FilterSpell("a green spell");
static {
whiteFilter.getColor().setWhite(true);

View file

@ -37,7 +37,7 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.ForestwalkAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -45,8 +45,8 @@ import mage.filter.FilterCard;
*/
public class TattermungeDuo extends CardImpl<TattermungeDuo> {
private static final FilterCard redFilter = new FilterCard("a red spell");
private static final FilterCard greenFilter = new FilterCard("a green spell");
private static final FilterSpell redFilter = new FilterSpell("a red spell");
private static final FilterSpell greenFilter = new FilterSpell("a green spell");
static {
redFilter.getColor().setRed(true);

View file

@ -37,7 +37,7 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -45,8 +45,8 @@ import mage.filter.FilterCard;
*/
public class ThistledownDuo extends CardImpl<ThistledownDuo> {
private static final FilterCard whiteFilter = new FilterCard("a white spell");
private static final FilterCard blueFilter = new FilterCard("a blue spell");
private static final FilterSpell whiteFilter = new FilterSpell("a white spell");
private static final FilterSpell blueFilter = new FilterSpell("a blue spell");
static {
whiteFilter.getColor().setWhite(true);

View file

@ -36,7 +36,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -44,7 +44,7 @@ import mage.filter.FilterCard;
*/
public class QuirionDryad extends CardImpl<QuirionDryad> {
private final static FilterCard filter = new FilterCard("white, blue, black, or red spell");
private final static FilterSpell filter = new FilterSpell("white, blue, black, or red spell");
static {
filter.setUseColor(true);

View file

@ -35,7 +35,7 @@ import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.keyword.ShroudAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
/**
*
@ -43,7 +43,7 @@ import mage.filter.FilterCard;
*/
public class ArgothianEnchantress extends CardImpl<ArgothianEnchantress> {
private static final FilterCard filter = new FilterCard("an Enchantment spell");
private static final FilterSpell filter = new FilterSpell("an Enchantment spell");
static {
filter.getCardType().add(CardType.ENCHANTMENT);

View file

@ -44,7 +44,9 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -59,6 +61,12 @@ import mage.target.common.TargetControlledCreaturePermanent;
*/
public class QuestForTheHolyRelic extends CardImpl<QuestForTheHolyRelic> {
private static final FilterSpell filter = new FilterSpell("a creature spell");
static {
filter.getCardType().add(CardType.CREATURE);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public QuestForTheHolyRelic(UUID ownerId) {
super(ownerId, 33, "Quest for the Holy Relic", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}");
this.expansionSetCode = "ZEN";
@ -66,7 +74,7 @@ public class QuestForTheHolyRelic extends CardImpl<QuestForTheHolyRelic> {
this.color.setWhite(true);
// Whenever you cast a creature spell, you may put a quest counter on Quest for the Holy Relic.
this.addAbility(new SpellCastTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), new FilterCreatureCard(), true));
this.addAbility(new SpellCastTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), filter, true));
// Remove five quest counters from Quest for the Holy Relic and sacrifice it: Search your library for an Equipment card, put it onto the battlefield, and attach it to a creature you control. Then shuffle your library.
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new QuestForTheHolyRelicEffect(), new RemoveCountersSourceCost(CounterType.QUEST.createInstance(5)));
ability.addCost(new SacrificeSourceCost());

View file

@ -31,6 +31,7 @@ import mage.Constants.Zone;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.Spell;
@ -42,8 +43,8 @@ import mage.target.targetpointer.FixedTarget;
*/
public class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTriggeredAbility> {
private static final FilterCard spellCard = new FilterCard("a spell");
protected FilterCard filter;
private static final FilterSpell spellCard = new FilterSpell("a spell");
protected FilterSpell filter;
/**
* If true, the source that triggered the ability will be set as target to effect.
@ -55,11 +56,11 @@ public class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTri
this.filter = spellCard;
}
public SpellCastTriggeredAbility(Effect effect, FilterCard filter, boolean optional) {
public SpellCastTriggeredAbility(Effect effect, FilterSpell filter, boolean optional) {
this(effect, filter, optional, false);
}
public SpellCastTriggeredAbility(Effect effect, FilterCard filter, boolean optional, boolean rememberSource) {
public SpellCastTriggeredAbility(Effect effect, FilterSpell filter, boolean optional, boolean rememberSource) {
super(Zone.BATTLEFIELD, effect, optional);
this.filter = filter;
this.rememberSource = rememberSource;

View file

@ -29,6 +29,8 @@
package mage.filter;
import java.util.UUID;
import mage.Constants.Zone;
import mage.game.Game;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
@ -38,6 +40,9 @@ import mage.game.stack.StackObject;
*/
public class FilterSpell extends FilterStackObject<FilterSpell> {
protected Zone fromZone = Zone.ALL;
protected boolean notFromZone = false;
public FilterSpell() {
super("spell");
}
@ -60,12 +65,31 @@ public class FilterSpell extends FilterStackObject<FilterSpell> {
if (!(spell instanceof Spell))
return notFilter;
if (((Spell)spell).getFromZone().match(fromZone) == notFromZone)
return notFilter;
return super.match(spell);
}
@Override
public boolean match(StackObject spell, UUID playerId, Game game) {
if (!this.match(spell))
return notFilter;
return super.match(spell, playerId, game);
}
@Override
public FilterSpell copy() {
return new FilterSpell(this);
}
public void setFromZone(Zone fromZone) {
this.fromZone = fromZone;
}
public void setNotFromZone(boolean notFromZone) {
this.notFromZone = notFromZone;
}
}

View file

@ -1,9 +1,9 @@
package mage.filter.common;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
public class FilterSpiritOrArcaneCard extends FilterCard<FilterSpiritOrArcaneCard> {
public class FilterSpiritOrArcaneCard extends FilterSpell {
public FilterSpiritOrArcaneCard() {
this("a Spirit or Arcane spell");