From ba9ede4d6681d7a4f23f192fed0a6cb792fb7d72 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sat, 29 Jul 2023 13:46:16 -0400 Subject: [PATCH] fix some text and StaticFilters (#10698) * StaticFilters: "a noncreature spell" * StaticFilters: "other creatures you control" * unrelated text fixes * CMM text fixes * fix error * fix apostrophe * adjustments --- Mage.Sets/src/mage/cards/a/AetherGale.java | 5 ++- Mage.Sets/src/mage/cards/a/AncientOoze.java | 4 +-- .../src/mage/cards/a/AvacynAngelOfHope.java | 15 +++------ Mage.Sets/src/mage/cards/b/BasrisAcolyte.java | 12 ++----- Mage.Sets/src/mage/cards/b/BloodFunnel.java | 7 +---- .../src/mage/cards/c/CatharsCompanion.java | 12 ++----- .../src/mage/cards/c/CunningBreezedancer.java | 13 ++------ .../src/mage/cards/d/DeeprootChampion.java | 13 ++------ .../src/mage/cards/d/DesolationGiant.java | 8 ++--- .../src/mage/cards/d/DreadCacodemon.java | 11 +------ .../src/mage/cards/e/EarthquakeDragon.java | 5 ++- .../src/mage/cards/e/ElusiveSpellfist.java | 13 ++------ .../src/mage/cards/e/EzurisPredation.java | 2 +- .../src/mage/cards/f/FinaleOfDevastation.java | 31 +++++++------------ .../src/mage/cards/f/FirebrandArcher.java | 13 ++------ .../src/mage/cards/g/GuardianOfFaith.java | 12 ++----- .../src/mage/cards/j/JeskaiAscendancy.java | 13 ++------ .../src/mage/cards/k/KahoMinamoHistorian.java | 3 +- .../cards/k/KambalConsulOfAllocation.java | 12 ++----- Mage.Sets/src/mage/cards/m/Magmaroth.java | 12 ++----- .../src/mage/cards/m/MelekIzzetParagon.java | 2 +- .../mage/cards/m/MikaeusTheUnhallowed.java | 8 +++-- Mage.Sets/src/mage/cards/m/MistfireAdept.java | 12 ++----- .../src/mage/cards/m/MonasteryMentor.java | 13 ++------ Mage.Sets/src/mage/cards/m/MythRealized.java | 12 ++----- .../mage/cards/n/NarsetEnlightenedMaster.java | 2 +- .../src/mage/cards/n/NezahalPrimalTide.java | 11 +------ Mage.Sets/src/mage/cards/p/PersonalTutor.java | 2 +- .../src/mage/cards/p/PrimevalBounty.java | 10 +----- .../src/mage/cards/p/PristineSkywise.java | 12 ++----- .../src/mage/cards/q/QuietContemplation.java | 11 +------ .../src/mage/cards/r/RecklessBushwhacker.java | 12 ++----- Mage.Sets/src/mage/cards/r/RegalBehemoth.java | 2 +- Mage.Sets/src/mage/cards/r/Riddleform.java | 11 ++----- .../src/mage/cards/r/RiseFromTheTides.java | 2 +- .../src/mage/cards/s/SageOfTheInwardEye.java | 11 +------ .../src/mage/cards/s/ScrollOfTheMasters.java | 13 ++------ .../src/mage/cards/s/SeekerOfTheWay.java | 12 ++----- .../mage/cards/s/ShuYunTheSilentTempest.java | 12 ++----- .../src/mage/cards/s/SkywiseTeachings.java | 13 ++------ .../src/mage/cards/s/SoulbladeDjinn.java | 12 ++----- Mage.Sets/src/mage/cards/s/SparkDouble.java | 3 +- Mage.Sets/src/mage/cards/s/SpriteDragon.java | 11 ++----- .../src/mage/cards/s/SqueeGoblinNabob.java | 6 ++-- Mage.Sets/src/mage/cards/s/StrongarmMonk.java | 12 ++----- .../src/mage/cards/s/StudentOfOjutai.java | 12 ++----- .../src/mage/cards/t/TemptWithVengeance.java | 2 +- .../mage/cards/t/TombOfTheSpiritDragon.java | 3 +- .../src/mage/cards/t/TorrentialGearhulk.java | 2 +- Mage.Sets/src/mage/cards/z/ZephyrScribe.java | 12 ++----- 50 files changed, 115 insertions(+), 359 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AetherGale.java b/Mage.Sets/src/mage/cards/a/AetherGale.java index 18505e8e6de..830164797b2 100644 --- a/Mage.Sets/src/mage/cards/a/AetherGale.java +++ b/Mage.Sets/src/mage/cards/a/AetherGale.java @@ -1,4 +1,3 @@ - package mage.cards.a; import java.util.UUID; @@ -6,7 +5,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterNonlandPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetNonlandPermanent; /** @@ -21,7 +20,7 @@ public final class AetherGale extends CardImpl { // Return six target nonland permanents to their owners' hands. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); - this.getSpellAbility().addTarget(new TargetNonlandPermanent(6,6, new FilterNonlandPermanent(), false)); + this.getSpellAbility().addTarget(new TargetNonlandPermanent(6,6, StaticFilters.FILTER_PERMANENTS_NON_LAND, false)); } private AetherGale(final AetherGale card) { diff --git a/Mage.Sets/src/mage/cards/a/AncientOoze.java b/Mage.Sets/src/mage/cards/a/AncientOoze.java index 9624db1ebf2..87c07ddf862 100644 --- a/Mage.Sets/src/mage/cards/a/AncientOoze.java +++ b/Mage.Sets/src/mage/cards/a/AncientOoze.java @@ -31,7 +31,7 @@ public final class AncientOoze extends CardImpl { Zone.ALL, new SetBasePowerToughnessSourceEffect( new TotalPermanentsManaValue(StaticFilters.FILTER_OTHER_CONTROLLED_CREATURES) - ) + ).setText("{this}'s power and toughness are each equal to the total mana value of other creatures you control") )); } @@ -43,4 +43,4 @@ public final class AncientOoze extends CardImpl { public AncientOoze copy() { return new AncientOoze(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/a/AvacynAngelOfHope.java b/Mage.Sets/src/mage/cards/a/AvacynAngelOfHope.java index 914e899f403..c8a44d2eb81 100644 --- a/Mage.Sets/src/mage/cards/a/AvacynAngelOfHope.java +++ b/Mage.Sets/src/mage/cards/a/AvacynAngelOfHope.java @@ -1,19 +1,16 @@ - package mage.cards.a; import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.common.FilterControlledPermanent; - +import mage.filter.StaticFilters; /** * @author noxx @@ -33,11 +30,9 @@ public final class AvacynAngelOfHope extends CardImpl { this.addAbility(VigilanceAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance()); - // Other permanents you control are indestructible. - FilterControlledPermanent filter = new FilterControlledPermanent("Other permanents you control"); - Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, true); - effect.setText("Other permanents you control are indestructible"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + // Other permanents you control have indestructible. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENTS, true))); } private AvacynAngelOfHope(final AvacynAngelOfHope card) { diff --git a/Mage.Sets/src/mage/cards/b/BasrisAcolyte.java b/Mage.Sets/src/mage/cards/b/BasrisAcolyte.java index eeb0dd12f10..e19e1d0f9ba 100644 --- a/Mage.Sets/src/mage/cards/b/BasrisAcolyte.java +++ b/Mage.Sets/src/mage/cards/b/BasrisAcolyte.java @@ -10,9 +10,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; import java.util.UUID; @@ -22,12 +20,6 @@ import java.util.UUID; */ public final class BasrisAcolyte extends CardImpl { - private static final FilterPermanent filter = new FilterControlledCreaturePermanent("other creatures you control"); - - static { - filter.add(AnotherPredicate.instance); - } - public BasrisAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); @@ -44,7 +36,7 @@ public final class BasrisAcolyte extends CardImpl { new AddCountersTargetEffect(CounterType.P1P1.createInstance()) .setText("put a +1/+1 counter on each of up to two other target creatures you control") ); - ability.addTarget(new TargetPermanent(0, 2, filter, false)); + ability.addTarget(new TargetPermanent(0, 2, StaticFilters.FILTER_OTHER_CONTROLLED_CREATURES, false)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BloodFunnel.java b/Mage.Sets/src/mage/cards/b/BloodFunnel.java index 37b45e7845a..834033b0b61 100644 --- a/Mage.Sets/src/mage/cards/b/BloodFunnel.java +++ b/Mage.Sets/src/mage/cards/b/BloodFunnel.java @@ -1,4 +1,3 @@ - package mage.cards.b; import java.util.UUID; @@ -13,10 +12,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.FilterSpell; import mage.filter.StaticFilters; import mage.filter.predicate.Predicates; -import mage.target.common.TargetControlledCreaturePermanent; /** * @@ -25,11 +22,9 @@ import mage.target.common.TargetControlledCreaturePermanent; public final class BloodFunnel extends CardImpl { private static final FilterCard filter = new FilterCard("Noncreature spells"); - private static final FilterSpell filterNoncreature = new FilterSpell("a noncreature spell"); static { filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - filterNoncreature.add(Predicates.not(CardType.CREATURE.getPredicate())); } public BloodFunnel(UUID ownerId, CardSetInfo setInfo) { @@ -43,7 +38,7 @@ public final class BloodFunnel extends CardImpl { effect.setText("counter that spell unless you sacrifice a creature"); this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, effect, - filterNoncreature, + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false, true)); } diff --git a/Mage.Sets/src/mage/cards/c/CatharsCompanion.java b/Mage.Sets/src/mage/cards/c/CatharsCompanion.java index 981776139d7..e537ae37af9 100644 --- a/Mage.Sets/src/mage/cards/c/CatharsCompanion.java +++ b/Mage.Sets/src/mage/cards/c/CatharsCompanion.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.UUID; @@ -11,19 +10,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) */ public final class CatharsCompanion extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public CatharsCompanion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); @@ -32,7 +25,8 @@ public final class CatharsCompanion extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a noncreature spell, Cathar's Companion gains indestructible until end of turn. - this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), filter, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } private CatharsCompanion(final CatharsCompanion card) { diff --git a/Mage.Sets/src/mage/cards/c/CunningBreezedancer.java b/Mage.Sets/src/mage/cards/c/CunningBreezedancer.java index cd0c045e6cf..d9d303fa514 100644 --- a/Mage.Sets/src/mage/cards/c/CunningBreezedancer.java +++ b/Mage.Sets/src/mage/cards/c/CunningBreezedancer.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.UUID; @@ -11,20 +10,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * * @author fireshoes */ public final class CunningBreezedancer extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public CunningBreezedancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{U}"); @@ -36,7 +28,8 @@ public final class CunningBreezedancer extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever you cast a noncreature spell, Cunning Breezedancer gets +2/+2 until end of turn. - this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), filter, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } private CunningBreezedancer(final CunningBreezedancer card) { diff --git a/Mage.Sets/src/mage/cards/d/DeeprootChampion.java b/Mage.Sets/src/mage/cards/d/DeeprootChampion.java index ba2b759ac42..8d6655e788f 100644 --- a/Mage.Sets/src/mage/cards/d/DeeprootChampion.java +++ b/Mage.Sets/src/mage/cards/d/DeeprootChampion.java @@ -1,4 +1,3 @@ - package mage.cards.d; import java.util.UUID; @@ -10,8 +9,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * @@ -19,12 +17,6 @@ import mage.filter.predicate.Predicates; */ public final class DeeprootChampion extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public DeeprootChampion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); @@ -34,7 +26,8 @@ public final class DeeprootChampion extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a noncreature spell, put a +1/+1 counter on Deeproot Champion. - this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } private DeeprootChampion(final DeeprootChampion card) { diff --git a/Mage.Sets/src/mage/cards/d/DesolationGiant.java b/Mage.Sets/src/mage/cards/d/DesolationGiant.java index fc5bc53630d..81a2ebe491a 100644 --- a/Mage.Sets/src/mage/cards/d/DesolationGiant.java +++ b/Mage.Sets/src/mage/cards/d/DesolationGiant.java @@ -1,4 +1,3 @@ - package mage.cards.d; import java.util.UUID; @@ -12,7 +11,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.TargetController; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AnotherPredicate; @@ -23,12 +22,9 @@ import mage.filter.predicate.mageobject.AnotherPredicate; public final class DesolationGiant extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creatures"); - private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("other creatures you control"); static { filter.add(AnotherPredicate.instance); - filter2.add(AnotherPredicate.instance); - filter2.add(TargetController.YOU.getControllerPredicate()); } public DesolationGiant(UUID ownerId, CardSetInfo setInfo) { @@ -41,7 +37,7 @@ public final class DesolationGiant extends CardImpl { this.addAbility(new KickerAbility("{W}{W}")); // When Desolation Giant enters the battlefield, destroy all other creatures you control. If it was kicked, destroy all other creatures instead. this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyAllEffect(filter), - new DestroyAllEffect(filter2), KickedCondition.ONCE, "destroy all other creatures you control. If it was kicked, destroy all other creatures instead."))); + new DestroyAllEffect(StaticFilters.FILTER_OTHER_CONTROLLED_CREATURES), KickedCondition.ONCE, "destroy all other creatures you control. If it was kicked, destroy all other creatures instead."))); } private DesolationGiant(final DesolationGiant card) { diff --git a/Mage.Sets/src/mage/cards/d/DreadCacodemon.java b/Mage.Sets/src/mage/cards/d/DreadCacodemon.java index c1a3bdf24e3..bfe55c0e9c5 100644 --- a/Mage.Sets/src/mage/cards/d/DreadCacodemon.java +++ b/Mage.Sets/src/mage/cards/d/DreadCacodemon.java @@ -12,10 +12,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.TargetController; import mage.filter.StaticFilters; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.AnotherPredicate; import mage.watchers.common.CastFromHandWatcher; /** @@ -23,12 +20,6 @@ import mage.watchers.common.CastFromHandWatcher; */ public final class DreadCacodemon extends CardImpl { - private static final FilterCreaturePermanent otherCreaturesYouControl = new FilterCreaturePermanent("other creatures you control"); - static { - otherCreaturesYouControl.add(TargetController.YOU.getControllerPredicate()); - otherCreaturesYouControl.add(AnotherPredicate.instance); - } - public DreadCacodemon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{7}{B}{B}{B}"); this.subtype.add(SubType.DEMON); @@ -38,7 +29,7 @@ public final class DreadCacodemon extends CardImpl { // When Dread Cacodemon enters the battlefield, // if you cast it from your hand, destroy all creatures your opponents control, then tap all other creatures you control. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES)); - ability.addEffect(new TapAllEffect(otherCreaturesYouControl)); + ability.addEffect(new TapAllEffect(StaticFilters.FILTER_OTHER_CONTROLLED_CREATURES)); this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourcePermanentCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, destroy all creatures your opponents control, then tap all other creatures you control."), new CastFromHandWatcher()); } diff --git a/Mage.Sets/src/mage/cards/e/EarthquakeDragon.java b/Mage.Sets/src/mage/cards/e/EarthquakeDragon.java index 4cbed6277e3..a2020f4f1da 100644 --- a/Mage.Sets/src/mage/cards/e/EarthquakeDragon.java +++ b/Mage.Sets/src/mage/cards/e/EarthquakeDragon.java @@ -27,8 +27,7 @@ import java.util.UUID; */ public final class EarthquakeDragon extends CardImpl { - - private static final FilterPermanent filter = new FilterControlledPermanent(SubType.DRAGON); + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.DRAGON, "Dragons you control"); private static final TotalPermanentsManaValue xValue = new TotalPermanentsManaValue(filter); @@ -69,4 +68,4 @@ public final class EarthquakeDragon extends CardImpl { public EarthquakeDragon copy() { return new EarthquakeDragon(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/e/ElusiveSpellfist.java b/Mage.Sets/src/mage/cards/e/ElusiveSpellfist.java index 33c3c32fb54..1f416104bdd 100644 --- a/Mage.Sets/src/mage/cards/e/ElusiveSpellfist.java +++ b/Mage.Sets/src/mage/cards/e/ElusiveSpellfist.java @@ -1,4 +1,3 @@ - package mage.cards.e; import java.util.UUID; @@ -13,20 +12,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * * @author fireshoes */ public final class ElusiveSpellfist extends CardImpl { - - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public ElusiveSpellfist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); @@ -36,7 +28,8 @@ public final class ElusiveSpellfist extends CardImpl { this.toughness = new MageInt(3); // Whenever you cast a noncreature spell, Elusive Spellfist gets +1/+0 until end of turn and can't be blocked this turn. - Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1,0,Duration.EndOfTurn), filterNonCreature, false); + Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1,0,Duration.EndOfTurn), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false); Effect effect = new CantBeBlockedSourceEffect(Duration.EndOfTurn); effect.setText("and can't be blocked this turn"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/e/EzurisPredation.java b/Mage.Sets/src/mage/cards/e/EzurisPredation.java index 842b0054083..cd323cf53cb 100644 --- a/Mage.Sets/src/mage/cards/e/EzurisPredation.java +++ b/Mage.Sets/src/mage/cards/e/EzurisPredation.java @@ -48,7 +48,7 @@ class EzurisPredationEffect extends OneShotEffect { public EzurisPredationEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "For each creature your opponents control, create a 4/4 green Phyrexian Beast creature token. Each of those Beasts fights a different one of those creatures"; + this.staticText = "For each creature your opponents control, create a 4/4 green Phyrexian Beast creature token. Each of those tokens fights a different one of those creatures"; } public EzurisPredationEffect(final EzurisPredationEffect effect) { diff --git a/Mage.Sets/src/mage/cards/f/FinaleOfDevastation.java b/Mage.Sets/src/mage/cards/f/FinaleOfDevastation.java index 948a3187578..95c003323f5 100644 --- a/Mage.Sets/src/mage/cards/f/FinaleOfDevastation.java +++ b/Mage.Sets/src/mage/cards/f/FinaleOfDevastation.java @@ -1,23 +1,22 @@ package mage.cards.f; -import java.util.UUID; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; - import mage.abilities.Ability; -import mage.constants.Outcome; -import mage.game.Game; -import mage.filter.FilterCard; -import mage.filter.common.FilterCreaturePermanent; -import mage.constants.CardType; -import mage.abilities.effects.common.search.SearchLibraryGraveyardWithLessMVPutIntoPlay; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.constants.Duration; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.search.SearchLibraryGraveyardWithLessMVPutIntoPlay; import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import java.util.UUID; /** * @@ -25,16 +24,10 @@ import mage.abilities.keyword.HasteAbility; */ public final class FinaleOfDevastation extends CardImpl { - private static final FilterCard filter = new FilterCard("creature"); - - static { - filter.add(CardType.CREATURE.getPredicate()); - } - public FinaleOfDevastation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}{G}"); // Search your library and/or graveyard for a creature card with converted mana cost X or less and put it onto the battlefield. If you search your library this way, shuffle it. - this.getSpellAbility().addEffect(new SearchLibraryGraveyardWithLessMVPutIntoPlay(filter)); + this.getSpellAbility().addEffect(new SearchLibraryGraveyardWithLessMVPutIntoPlay(StaticFilters.FILTER_CARD_CREATURE)); // If X is 10 or more, creatures you control get +X/+X and gain haste until end of turn. this.getSpellAbility().addEffect(new FinaleOfDevastationEffect()); } @@ -76,4 +69,4 @@ class FinaleOfDevastationEffect extends OneShotEffect { } return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/FirebrandArcher.java b/Mage.Sets/src/mage/cards/f/FirebrandArcher.java index ed7ab9f4b1f..82e604d7ca0 100644 --- a/Mage.Sets/src/mage/cards/f/FirebrandArcher.java +++ b/Mage.Sets/src/mage/cards/f/FirebrandArcher.java @@ -1,4 +1,3 @@ - package mage.cards.f; import java.util.UUID; @@ -10,8 +9,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.TargetController; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * @@ -19,12 +17,6 @@ import mage.filter.predicate.Predicates; */ public final class FirebrandArcher extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public FirebrandArcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); @@ -34,7 +26,8 @@ public final class FirebrandArcher extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a noncreature spell, Firebrand Archer deals 1 damage to each opponent. - addAbility(new SpellCastControllerTriggeredAbility(new DamagePlayersEffect(1, TargetController.OPPONENT), filter, false)); + addAbility(new SpellCastControllerTriggeredAbility(new DamagePlayersEffect(1, TargetController.OPPONENT), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } private FirebrandArcher(final FirebrandArcher card) { diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfFaith.java b/Mage.Sets/src/mage/cards/g/GuardianOfFaith.java index 11761a1bc93..d161282b49f 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfFaith.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfFaith.java @@ -11,8 +11,7 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -21,13 +20,6 @@ import mage.target.common.TargetControlledCreaturePermanent; */ public final class GuardianOfFaith extends CardImpl { - private static final FilterControlledCreaturePermanent filter - = new FilterControlledCreaturePermanent("other creatures you control"); - - static { - filter.add(AnotherPredicate.instance); - } - public GuardianOfFaith(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); @@ -46,7 +38,7 @@ public final class GuardianOfFaith extends CardImpl { Ability ability = new EntersBattlefieldTriggeredAbility(new PhaseOutTargetEffect( "any number of other target creatures you control" )); - ability.addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, false)); + ability.addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, StaticFilters.FILTER_OTHER_CONTROLLED_CREATURES, false)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/j/JeskaiAscendancy.java b/Mage.Sets/src/mage/cards/j/JeskaiAscendancy.java index 3518ed7b63d..d4f071c7a3b 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiAscendancy.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiAscendancy.java @@ -1,4 +1,3 @@ - package mage.cards.j; import java.util.UUID; @@ -12,9 +11,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.FilterSpell; import mage.filter.StaticFilters; -import mage.filter.predicate.Predicates; /** * @@ -22,18 +19,12 @@ import mage.filter.predicate.Predicates; */ public final class JeskaiAscendancy extends CardImpl { - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public JeskaiAscendancy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{R}{W}"); // Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn. Untap those creatures. Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn); - Ability ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, false); + Ability ability = new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_A_NON_CREATURE, false); effect = new UntapAllControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURE, "Untap those creatures"); ability.addEffect(effect); this.addAbility(ability); @@ -41,7 +32,7 @@ public final class JeskaiAscendancy extends CardImpl { // Whenever you cast a noncreature spell, you may draw a card. If you do, discard a card. effect = new DrawDiscardControllerEffect(1, 1); effect.setText("you may draw a card. If you do, discard a card"); - ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, true); + ability = new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_A_NON_CREATURE, true); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java b/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java index 8ef34e87fd2..390ade9e894 100644 --- a/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java +++ b/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java @@ -69,8 +69,7 @@ class KahoMinamoHistorianEffect extends SearchEffect { public KahoMinamoHistorianEffect() { super(new TargetCardInLibrary(0, 3, filter), Outcome.Benefit); - this.staticText = "search your library for up to three instant cards " - + "and exile them. Then shuffle"; + this.staticText = "search your library for up to three instant cards, exile them, then shuffle"; } public KahoMinamoHistorianEffect(final KahoMinamoHistorianEffect effect) { diff --git a/Mage.Sets/src/mage/cards/k/KambalConsulOfAllocation.java b/Mage.Sets/src/mage/cards/k/KambalConsulOfAllocation.java index 9d505e0b9cd..6db2cee7d4b 100644 --- a/Mage.Sets/src/mage/cards/k/KambalConsulOfAllocation.java +++ b/Mage.Sets/src/mage/cards/k/KambalConsulOfAllocation.java @@ -1,4 +1,3 @@ - package mage.cards.k; import java.util.UUID; @@ -15,8 +14,7 @@ import mage.constants.SubType; import mage.constants.SetTargetPointer; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * @@ -24,11 +22,6 @@ import mage.filter.predicate.Predicates; */ public final class KambalConsulOfAllocation extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public KambalConsulOfAllocation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); this.supertype.add(SuperType.LEGENDARY); @@ -38,7 +31,8 @@ public final class KambalConsulOfAllocation extends CardImpl { this.toughness = new MageInt(3); // Whenever an opponent casts a noncreature spell, that player loses 2 life and you gain 2 life. - Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), filter, false, SetTargetPointer.PLAYER); + Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false, SetTargetPointer.PLAYER); Effect effect = new GainLifeEffect(2); effect.setText("and you gain 2 life"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/m/Magmaroth.java b/Mage.Sets/src/mage/cards/m/Magmaroth.java index 77059e991ed..065e875805d 100644 --- a/Mage.Sets/src/mage/cards/m/Magmaroth.java +++ b/Mage.Sets/src/mage/cards/m/Magmaroth.java @@ -12,17 +12,10 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; public final class Magmaroth extends CardImpl{ - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public Magmaroth(UUID ownerId, CardSetInfo cardSetInfo){ super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); subtype.add(SubType.ELEMENTAL); @@ -33,7 +26,8 @@ public final class Magmaroth extends CardImpl{ addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance()), TargetController.YOU, false)); // Whenever you cast a noncreature spell, remove a -1/-1 counter from Magmaroth - addAbility(new SpellCastControllerTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), filterNonCreature, false)); + addAbility(new SpellCastControllerTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } diff --git a/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java b/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java index e8bbe4f7880..4570aba615f 100644 --- a/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java +++ b/Mage.Sets/src/mage/cards/m/MelekIzzetParagon.java @@ -24,7 +24,7 @@ import java.util.UUID; */ public final class MelekIzzetParagon extends CardImpl { - private static final FilterCard filter = new FilterCard("cast instant or sorcery spells"); + private static final FilterCard filter = new FilterCard("cast instant and sorcery spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/cards/m/MikaeusTheUnhallowed.java b/Mage.Sets/src/mage/cards/m/MikaeusTheUnhallowed.java index 69fcea1fd81..be4e7c2b819 100644 --- a/Mage.Sets/src/mage/cards/m/MikaeusTheUnhallowed.java +++ b/Mage.Sets/src/mage/cards/m/MikaeusTheUnhallowed.java @@ -2,6 +2,7 @@ package mage.cards.m; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DestroyTargetEffect; @@ -47,8 +48,11 @@ public final class MikaeusTheUnhallowed extends CardImpl { this.addAbility(new MikaeusTheUnhallowedAbility()); // Other non-Human creatures you control get +1/+1 and have undying. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new UndyingAbility(), Duration.WhileOnBattlefield, filter, true))); + Ability ability = new SimpleStaticAbility(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true)); + ability.addEffect(new GainAbilityControlledEffect(new UndyingAbility(), Duration.WhileOnBattlefield, filter, true) + .setText("and have undying. (When a creature with undying dies, if it had no +1/+1 counters on it," + + " return it to the battlefield under its owner's control with a +1/+1 counter on it.)")); + this.addAbility(ability); } private MikaeusTheUnhallowed(final MikaeusTheUnhallowed card) { diff --git a/Mage.Sets/src/mage/cards/m/MistfireAdept.java b/Mage.Sets/src/mage/cards/m/MistfireAdept.java index 3f68c552ae3..99eb0c5e7bc 100644 --- a/Mage.Sets/src/mage/cards/m/MistfireAdept.java +++ b/Mage.Sets/src/mage/cards/m/MistfireAdept.java @@ -1,4 +1,3 @@ - package mage.cards.m; import java.util.UUID; @@ -13,8 +12,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; /** @@ -22,11 +20,6 @@ import mage.target.common.TargetCreaturePermanent; * @author emerald000 */ public final class MistfireAdept extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public MistfireAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); @@ -39,7 +32,8 @@ public final class MistfireAdept extends CardImpl { this.addAbility(new ProwessAbility()); // Whenever you cast a noncreature spell, target creature gains flying until end of turn. - Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), filter, false); + Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MonasteryMentor.java b/Mage.Sets/src/mage/cards/m/MonasteryMentor.java index 54976c8bbf1..46bdba33114 100644 --- a/Mage.Sets/src/mage/cards/m/MonasteryMentor.java +++ b/Mage.Sets/src/mage/cards/m/MonasteryMentor.java @@ -1,4 +1,3 @@ - package mage.cards.m; import java.util.UUID; @@ -10,8 +9,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import mage.game.permanent.token.MonasteryMentorToken; /** @@ -20,12 +18,6 @@ import mage.game.permanent.token.MonasteryMentorToken; */ public final class MonasteryMentor extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public MonasteryMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.subtype.add(SubType.HUMAN); @@ -37,7 +29,8 @@ public final class MonasteryMentor extends CardImpl { this.addAbility(new ProwessAbility()); // Whenever you cast a noncreature spell, create a 1/1 white Monk creature token with prowess. - this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new MonasteryMentorToken()), filter, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new MonasteryMentorToken()), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } private MonasteryMentor(final MonasteryMentor card) { diff --git a/Mage.Sets/src/mage/cards/m/MythRealized.java b/Mage.Sets/src/mage/cards/m/MythRealized.java index 8e0df46a7f4..c87dd76f304 100644 --- a/Mage.Sets/src/mage/cards/m/MythRealized.java +++ b/Mage.Sets/src/mage/cards/m/MythRealized.java @@ -1,4 +1,3 @@ - package mage.cards.m; import java.util.UUID; @@ -17,8 +16,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.counters.CounterType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import mage.game.permanent.token.TokenImpl; /** @@ -28,17 +26,13 @@ import mage.game.permanent.token.TokenImpl; public final class MythRealized extends CardImpl { private static final DynamicValue loreCounterCount = new CountersSourceCount(CounterType.LORE); - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public MythRealized(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); // Whenever you cast a noncreature spell, put a lore counter on Myth Realized. - this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.LORE.createInstance()), filterNonCreature, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.LORE.createInstance()), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); // {2}{W}: Put a lore counter on Myth Realized. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.LORE.createInstance()), new ManaCostsImpl<>("{2}{W}"))); diff --git a/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java b/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java index 79cd90e46cb..b1366697eec 100644 --- a/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java +++ b/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java @@ -57,7 +57,7 @@ class NarsetEnlightenedMasterExileEffect extends OneShotEffect { public NarsetEnlightenedMasterExileEffect() { super(Outcome.Discard); - staticText = "exile the top four cards of your library. Until end of turn, you may cast noncreature cards exiled with {this} this turn without paying their mana costs"; + staticText = "exile the top four cards of your library. Until end of turn, you may cast noncreature spells from among those cards without paying their mana costs"; } public NarsetEnlightenedMasterExileEffect(final NarsetEnlightenedMasterExileEffect effect) { diff --git a/Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java b/Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java index 3f00adadf15..cbefd0bb256 100644 --- a/Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java +++ b/Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java @@ -20,10 +20,7 @@ import mage.constants.SetTargetPointer; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.FilterSpell; import mage.filter.StaticFilters; -import mage.filter.predicate.Predicates; import mage.target.common.TargetCardInHand; /** @@ -32,12 +29,6 @@ import mage.target.common.TargetCardInHand; */ public final class NezahalPrimalTide extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public NezahalPrimalTide(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); @@ -56,7 +47,7 @@ public final class NezahalPrimalTide extends CardImpl { // Whenever an opponent casts a noncreature spell, draw a card. this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, - new DrawCardSourceControllerEffect(1), filter, false, SetTargetPointer.NONE)); + new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false, SetTargetPointer.NONE)); // Discard three cards: Exile Nezahal. Return it to the battlefield tapped under its owner's control at the beginning of the next end step. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileReturnBattlefieldOwnerNextEndStepSourceEffect(true), diff --git a/Mage.Sets/src/mage/cards/p/PersonalTutor.java b/Mage.Sets/src/mage/cards/p/PersonalTutor.java index c91cd14a59a..90c3dee0181 100644 --- a/Mage.Sets/src/mage/cards/p/PersonalTutor.java +++ b/Mage.Sets/src/mage/cards/p/PersonalTutor.java @@ -14,7 +14,7 @@ import mage.target.common.TargetCardInLibrary; * @author Plopman */ public final class PersonalTutor extends CardImpl { - private static final FilterCard filter = new FilterCard("Sorcery card"); + private static final FilterCard filter = new FilterCard("sorcery card"); static{ filter.add(CardType.SORCERY.getPredicate()); } diff --git a/Mage.Sets/src/mage/cards/p/PrimevalBounty.java b/Mage.Sets/src/mage/cards/p/PrimevalBounty.java index 83761edbc5c..eaaed230000 100644 --- a/Mage.Sets/src/mage/cards/p/PrimevalBounty.java +++ b/Mage.Sets/src/mage/cards/p/PrimevalBounty.java @@ -10,9 +10,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.counters.CounterType; -import mage.filter.FilterSpell; import mage.filter.StaticFilters; -import mage.filter.predicate.Predicates; import mage.game.permanent.token.BeastToken; import mage.target.common.TargetControlledCreaturePermanent; @@ -23,12 +21,6 @@ import java.util.UUID; */ public final class PrimevalBounty extends CardImpl { - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public PrimevalBounty(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{G}"); @@ -40,7 +32,7 @@ public final class PrimevalBounty extends CardImpl { // Whenever you cast a noncreature spell, put three +1/+1 counters on target creature you control. Ability ability = new SpellCastControllerTriggeredAbility( new AddCountersTargetEffect(CounterType.P1P1.createInstance(3)), - filterNonCreature, false + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false ); ability.addTarget(new TargetControlledCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/p/PristineSkywise.java b/Mage.Sets/src/mage/cards/p/PristineSkywise.java index c1233126b19..5ceb86005f8 100644 --- a/Mage.Sets/src/mage/cards/p/PristineSkywise.java +++ b/Mage.Sets/src/mage/cards/p/PristineSkywise.java @@ -1,4 +1,3 @@ - package mage.cards.p; import java.util.UUID; @@ -13,20 +12,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * * @author fireshoes */ public final class PristineSkywise extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public PristineSkywise(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{U}"); @@ -38,7 +30,7 @@ public final class PristineSkywise extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever you cast a noncreature spell, untap Pristine Skywise. It gains protection from the color of your choice until the end of turn. - Ability ability = new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, false); + Ability ability = new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false); ability.addEffect(new GainProtectionFromColorSourceEffect(Duration.EndOfTurn)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/q/QuietContemplation.java b/Mage.Sets/src/mage/cards/q/QuietContemplation.java index 25de5c921b1..5d3358c991c 100644 --- a/Mage.Sets/src/mage/cards/q/QuietContemplation.java +++ b/Mage.Sets/src/mage/cards/q/QuietContemplation.java @@ -1,4 +1,3 @@ - package mage.cards.q; import java.util.UUID; @@ -12,9 +11,7 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; import mage.filter.StaticFilters; -import mage.filter.predicate.Predicates; import mage.target.common.TargetCreaturePermanent; /** @@ -22,12 +19,6 @@ import mage.target.common.TargetCreaturePermanent; * @author LevelX2 */ public final class QuietContemplation extends CardImpl { - - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public QuietContemplation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); @@ -38,7 +29,7 @@ public final class QuietContemplation extends CardImpl { Effect effect = new DontUntapInControllersNextUntapStepTargetEffect(); effect.setText("and it doesn't untap during its controller's next untap step"); doIfCostPaid.addEffect(effect); - Ability ability = new SpellCastControllerTriggeredAbility(doIfCostPaid, filterNonCreature, false); + Ability ability = new SpellCastControllerTriggeredAbility(doIfCostPaid, StaticFilters.FILTER_SPELL_A_NON_CREATURE, false); ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java b/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java index 5d8dc12d4fb..dc2b3ed5812 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java +++ b/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java @@ -1,4 +1,3 @@ - package mage.cards.r; import java.util.UUID; @@ -15,8 +14,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.StaticFilters; /** * @@ -24,12 +22,6 @@ import mage.filter.predicate.mageobject.AnotherPredicate; */ public final class RecklessBushwhacker extends CardImpl { - private static final FilterControlledCreaturePermanent FILTER = new FilterControlledCreaturePermanent("other creatures you control"); - - static { - FILTER.add(AnotherPredicate.instance); - } - public RecklessBushwhacker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.GOBLIN); @@ -46,7 +38,7 @@ public final class RecklessBushwhacker extends CardImpl { // When Reckless Bushwhacker enters the battlefield, if its surge cost was paid, other creatures you control get +1/+0 and gain haste until end of turn. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn, true), false); - ability.addEffect(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, FILTER, true)); + ability.addEffect(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_OTHER_CONTROLLED_CREATURES, true)); this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, SurgedCondition.instance, "When {this} enters the battlefield, if its surge cost was paid, other creatures you control get +1/+0 and gain haste until end of turn.")); diff --git a/Mage.Sets/src/mage/cards/r/RegalBehemoth.java b/Mage.Sets/src/mage/cards/r/RegalBehemoth.java index d7cf1cc91f2..0f776c0db84 100644 --- a/Mage.Sets/src/mage/cards/r/RegalBehemoth.java +++ b/Mage.Sets/src/mage/cards/r/RegalBehemoth.java @@ -81,6 +81,6 @@ class RegalBehemothTriggeredManaAbility extends TriggeredManaAbility { @Override public String getRule() { - return "Whenever you tap a land for mana while you're the monarch, add one mana of any color."; + return "Whenever you tap a land for mana while you're the monarch, add an additional one mana of any color."; } } diff --git a/Mage.Sets/src/mage/cards/r/Riddleform.java b/Mage.Sets/src/mage/cards/r/Riddleform.java index 350efc30035..36c579ef636 100644 --- a/Mage.Sets/src/mage/cards/r/Riddleform.java +++ b/Mage.Sets/src/mage/cards/r/Riddleform.java @@ -17,8 +17,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import mage.game.permanent.token.TokenImpl; /** @@ -27,18 +26,12 @@ import mage.game.permanent.token.TokenImpl; */ public final class Riddleform extends CardImpl { - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public Riddleform(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); // Whenever you cast a noncreature spell, you may have Riddleform become a 3/3 Sphinx creature with flying in addition to its other types until end of turn. Effect effect = new BecomesCreatureSourceEffect(new RiddleformToken(), CardType.ENCHANTMENT, Duration.EndOfTurn); - this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, effect, filterNonCreature, true, true)); + this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL_A_NON_CREATURE, true, true)); // {2}{U}: Scry 1. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new ManaCostsImpl<>("{2}{U}")); diff --git a/Mage.Sets/src/mage/cards/r/RiseFromTheTides.java b/Mage.Sets/src/mage/cards/r/RiseFromTheTides.java index 319d824b513..7504b4a2d60 100644 --- a/Mage.Sets/src/mage/cards/r/RiseFromTheTides.java +++ b/Mage.Sets/src/mage/cards/r/RiseFromTheTides.java @@ -17,7 +17,7 @@ import java.util.UUID; */ public final class RiseFromTheTides extends CardImpl { - private static final DynamicValue cardsCount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY); + private static final DynamicValue cardsCount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_AND_SORCERY); public RiseFromTheTides(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}"); diff --git a/Mage.Sets/src/mage/cards/s/SageOfTheInwardEye.java b/Mage.Sets/src/mage/cards/s/SageOfTheInwardEye.java index a155d326308..235919c5f92 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfTheInwardEye.java +++ b/Mage.Sets/src/mage/cards/s/SageOfTheInwardEye.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -12,9 +11,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; import mage.filter.StaticFilters; -import mage.filter.predicate.Predicates; /** * @@ -22,12 +19,6 @@ import mage.filter.predicate.Predicates; */ public final class SageOfTheInwardEye extends CardImpl { - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public SageOfTheInwardEye(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}{W}"); this.subtype.add(SubType.DJINN); @@ -41,7 +32,7 @@ public final class SageOfTheInwardEye extends CardImpl { // Whenever you cast a noncreature spell, creatures you control gain lifelink until end of turn. this.addAbility(new SpellCastControllerTriggeredAbility( new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false), - filterNonCreature, false)); + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } diff --git a/Mage.Sets/src/mage/cards/s/ScrollOfTheMasters.java b/Mage.Sets/src/mage/cards/s/ScrollOfTheMasters.java index 189029d43c4..9af409e8924 100644 --- a/Mage.Sets/src/mage/cards/s/ScrollOfTheMasters.java +++ b/Mage.Sets/src/mage/cards/s/ScrollOfTheMasters.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -18,8 +17,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -28,17 +26,12 @@ import mage.target.common.TargetControlledCreaturePermanent; */ public final class ScrollOfTheMasters extends CardImpl { - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public ScrollOfTheMasters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // Whenever you cast a noncreature spell, put a lore counter on Scroll of the Masters. - this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.LORE.createInstance()), filterNonCreature, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.LORE.createInstance()), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); // {3}, {T}: Target creature you control gets +1/+1 until end of turn for each lore counter on Scroll of the Masters. DynamicValue xValue = new CountersSourceCount(CounterType.LORE); diff --git a/Mage.Sets/src/mage/cards/s/SeekerOfTheWay.java b/Mage.Sets/src/mage/cards/s/SeekerOfTheWay.java index 61806ddf496..6fea5e626ad 100644 --- a/Mage.Sets/src/mage/cards/s/SeekerOfTheWay.java +++ b/Mage.Sets/src/mage/cards/s/SeekerOfTheWay.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -12,19 +11,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * * @author emerald000 */ public final class SeekerOfTheWay extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public SeekerOfTheWay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); @@ -38,7 +31,8 @@ public final class SeekerOfTheWay extends CardImpl { this.addAbility(new ProwessAbility()); // Whenever you cast a noncreature spell, Seeker of the Way gains lifelink until end of turn. - this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn), filter, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn) + .setText("{this} gains lifelink until end of turn"), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } private SeekerOfTheWay(final SeekerOfTheWay card) { diff --git a/Mage.Sets/src/mage/cards/s/ShuYunTheSilentTempest.java b/Mage.Sets/src/mage/cards/s/ShuYunTheSilentTempest.java index b37d94ce4ec..a4bf94d8f88 100644 --- a/Mage.Sets/src/mage/cards/s/ShuYunTheSilentTempest.java +++ b/Mage.Sets/src/mage/cards/s/ShuYunTheSilentTempest.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -16,8 +15,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; /** @@ -26,12 +24,6 @@ import mage.target.common.TargetCreaturePermanent; */ public final class ShuYunTheSilentTempest extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public ShuYunTheSilentTempest(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); this.supertype.add(SuperType.LEGENDARY); @@ -48,7 +40,7 @@ public final class ShuYunTheSilentTempest extends CardImpl { new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{R/W}{R/W}"), "Pay to let target creature gain double strike?"), - filter, false); + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/SkywiseTeachings.java b/Mage.Sets/src/mage/cards/s/SkywiseTeachings.java index af23359c86e..1ef1cc2f654 100644 --- a/Mage.Sets/src/mage/cards/s/SkywiseTeachings.java +++ b/Mage.Sets/src/mage/cards/s/SkywiseTeachings.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -9,8 +8,7 @@ import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import mage.game.permanent.token.DjinnMonkToken; /** @@ -19,17 +17,12 @@ import mage.game.permanent.token.DjinnMonkToken; */ public final class SkywiseTeachings extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public SkywiseTeachings(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); // Whenever you cast a noncreature spell, you may pay {1}{U}. If you do, create a 2/2 blue Djinn Monk creature token with flying. - this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new DjinnMonkToken()), new ManaCostsImpl<>("{1}{U}")), filter, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new DjinnMonkToken()), new ManaCostsImpl<>("{1}{U}")), + StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } diff --git a/Mage.Sets/src/mage/cards/s/SoulbladeDjinn.java b/Mage.Sets/src/mage/cards/s/SoulbladeDjinn.java index 839f5ed74d4..a5916032ed1 100644 --- a/Mage.Sets/src/mage/cards/s/SoulbladeDjinn.java +++ b/Mage.Sets/src/mage/cards/s/SoulbladeDjinn.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -13,20 +12,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * * @author fireshoes */ public final class SoulbladeDjinn extends CardImpl { - - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public SoulbladeDjinn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); @@ -39,7 +31,7 @@ public final class SoulbladeDjinn extends CardImpl { // Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn. Effect effect = new BoostControlledEffect(1,1,Duration.EndOfTurn); - Ability ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, false); + Ability ability = new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_A_NON_CREATURE, false); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SparkDouble.java b/Mage.Sets/src/mage/cards/s/SparkDouble.java index 69e1e1b81ad..d8eb6d4ba71 100644 --- a/Mage.Sets/src/mage/cards/s/SparkDouble.java +++ b/Mage.Sets/src/mage/cards/s/SparkDouble.java @@ -61,8 +61,7 @@ class SparkDoubleCopyApplier extends CopyApplier { @Override public String getText() { return ", except it enters with an additional +1/+1 counter on it if it's a creature, it enters with " - + "an additional loyalty counter on it if it's a planeswalker, and it isn't legendary if " - + "that permanent is legendary"; + + "an additional loyalty counter on it if it's a planeswalker, and it isn't legendary"; } @Override diff --git a/Mage.Sets/src/mage/cards/s/SpriteDragon.java b/Mage.Sets/src/mage/cards/s/SpriteDragon.java index cdc45e891d4..d7dc4b0fe28 100644 --- a/Mage.Sets/src/mage/cards/s/SpriteDragon.java +++ b/Mage.Sets/src/mage/cards/s/SpriteDragon.java @@ -10,8 +10,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; import java.util.UUID; @@ -20,12 +19,6 @@ import java.util.UUID; */ public final class SpriteDragon extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public SpriteDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{R}"); @@ -42,7 +35,7 @@ public final class SpriteDragon extends CardImpl { // Whenever you cast a noncreature spell, put a +1/+1 counter on Sprite Dragon. this.addAbility(new SpellCastControllerTriggeredAbility( - new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter, false + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false )); } diff --git a/Mage.Sets/src/mage/cards/s/SqueeGoblinNabob.java b/Mage.Sets/src/mage/cards/s/SqueeGoblinNabob.java index 1a5ae5c0fba..1db64177fdb 100644 --- a/Mage.Sets/src/mage/cards/s/SqueeGoblinNabob.java +++ b/Mage.Sets/src/mage/cards/s/SqueeGoblinNabob.java @@ -1,10 +1,9 @@ - package mage.cards.s; import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -28,7 +27,8 @@ public final class SqueeGoblinNabob extends CardImpl { this.toughness = new MageInt(1); // At the beginning of your upkeep, you may return Squee, Goblin Nabob from your graveyard to your hand. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ReturnToHandSourceEffect(), TargetController.YOU, true)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), TargetController.YOU, true) + .setTriggerPhrase("At the beginning of your upkeep, ")); } private SqueeGoblinNabob(final SqueeGoblinNabob card) { diff --git a/Mage.Sets/src/mage/cards/s/StrongarmMonk.java b/Mage.Sets/src/mage/cards/s/StrongarmMonk.java index fb7a0fd3980..5362f4b8acf 100644 --- a/Mage.Sets/src/mage/cards/s/StrongarmMonk.java +++ b/Mage.Sets/src/mage/cards/s/StrongarmMonk.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -12,20 +11,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * * @author fireshoes */ public final class StrongarmMonk extends CardImpl { - - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public StrongarmMonk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); @@ -36,7 +28,7 @@ public final class StrongarmMonk extends CardImpl { // Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn. Effect effect = new BoostControlledEffect(1,1,Duration.EndOfTurn); - Ability ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, false); + Ability ability = new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_A_NON_CREATURE, false); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StudentOfOjutai.java b/Mage.Sets/src/mage/cards/s/StudentOfOjutai.java index 4e11eb9b513..18423608203 100644 --- a/Mage.Sets/src/mage/cards/s/StudentOfOjutai.java +++ b/Mage.Sets/src/mage/cards/s/StudentOfOjutai.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -9,20 +8,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * * @author fireshoes */ public final class StudentOfOjutai extends CardImpl { - - private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell"); - - static { - filterNonCreature.add(Predicates.not(CardType.CREATURE.getPredicate())); - } public StudentOfOjutai(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); @@ -32,7 +24,7 @@ public final class StudentOfOjutai extends CardImpl { this.toughness = new MageInt(4); // Whenever you cast a noncreature spell, you gain 2 life. - this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(2), filterNonCreature, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(2), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } private StudentOfOjutai(final StudentOfOjutai card) { diff --git a/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java b/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java index 9055f6d66b6..997abff93c2 100644 --- a/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java +++ b/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java @@ -40,7 +40,7 @@ class TemptWithVengeanceEffect extends OneShotEffect { public TemptWithVengeanceEffect() { super(Outcome.PutLandInPlay); - this.staticText = "Tempting offer — create X 1/1 red Elemental creature tokens with haste. Each opponent may create X 1/1 red Elemental creature tokens with haste. For each opponent who does, create X 1/1 red Elemental creature tokens with haste"; + this.staticText = "Tempting offer — Create X 1/1 red Elemental creature tokens with haste. Each opponent may create X 1/1 red Elemental creature tokens with haste. For each opponent who does, create X 1/1 red Elemental creature tokens with haste"; } public TemptWithVengeanceEffect(final TemptWithVengeanceEffect effect) { diff --git a/Mage.Sets/src/mage/cards/t/TombOfTheSpiritDragon.java b/Mage.Sets/src/mage/cards/t/TombOfTheSpiritDragon.java index 817fc221b90..06e4fff92a4 100644 --- a/Mage.Sets/src/mage/cards/t/TombOfTheSpiritDragon.java +++ b/Mage.Sets/src/mage/cards/t/TombOfTheSpiritDragon.java @@ -34,7 +34,8 @@ public final class TombOfTheSpiritDragon extends CardImpl { // T: Add 1 this.addAbility(new ColorlessManaAbility()); // 2, T: You gain 1 life for each colorless creature you control - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)), new GenericManaCost(2)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)) + .setText("you gain 1 life for each colorless creature you control"), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TorrentialGearhulk.java b/Mage.Sets/src/mage/cards/t/TorrentialGearhulk.java index cd9eec7e8a7..82a0848c51c 100644 --- a/Mage.Sets/src/mage/cards/t/TorrentialGearhulk.java +++ b/Mage.Sets/src/mage/cards/t/TorrentialGearhulk.java @@ -65,7 +65,7 @@ class TorrentialGearhulkEffect extends OneShotEffect { TorrentialGearhulkEffect() { super(Outcome.PlayForFree); this.staticText = "you may cast target instant card from your graveyard without paying its mana cost. " - + "If that card would be put into your graveyard this turn, exile it instead"; + + "If that spell would be put into your graveyard, exile it instead"; } TorrentialGearhulkEffect(final TorrentialGearhulkEffect effect) { diff --git a/Mage.Sets/src/mage/cards/z/ZephyrScribe.java b/Mage.Sets/src/mage/cards/z/ZephyrScribe.java index 95c4576bcf6..65e11bc79c9 100644 --- a/Mage.Sets/src/mage/cards/z/ZephyrScribe.java +++ b/Mage.Sets/src/mage/cards/z/ZephyrScribe.java @@ -1,4 +1,3 @@ - package mage.cards.z; import java.util.UUID; @@ -15,8 +14,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; +import mage.filter.StaticFilters; /** * @@ -24,12 +22,6 @@ import mage.filter.predicate.Predicates; */ public final class ZephyrScribe extends CardImpl { - private static final FilterSpell filter = new FilterSpell("a noncreature spell"); - - static { - filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - } - public ZephyrScribe(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); this.subtype.add(SubType.HUMAN, SubType.MONK); @@ -42,7 +34,7 @@ public final class ZephyrScribe extends CardImpl { this.addAbility(ability); // Whenever you cast a noncreature spell, untap Zephyr Scribe. - this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, false)); + this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false)); } private ZephyrScribe(final ZephyrScribe card) {