From c2b157d79046019a26ebd9a8299d3f68859bfd43 Mon Sep 17 00:00:00 2001 From: igoudt Date: Mon, 24 Jul 2017 08:41:42 +0200 Subject: [PATCH] rewrite filter_artifact_or_enchantment_card --- Mage.Sets/src/mage/cards/a/Abolish.java | 7 ++++--- Mage.Sets/src/mage/cards/a/ActOfAuthority.java | 9 +++++---- Mage.Sets/src/mage/cards/a/AltarsLight.java | 7 ++++--- .../src/mage/cards/a/AppetiteForTheUnnatural.java | 10 +++++----- Mage.Sets/src/mage/cards/a/ArtisansSorrow.java | 7 ++++--- Mage.Sets/src/mage/cards/a/AuraOfSilence.java | 7 ++++--- Mage.Sets/src/mage/cards/a/AuraShards.java | 6 +++--- Mage.Sets/src/mage/cards/b/BreakAsunder.java | 7 ++++--- Mage.Sets/src/mage/cards/c/CapashenUnicorn.java | 7 ++++--- Mage.Sets/src/mage/cards/c/CausticCaterpillar.java | 7 ++++--- Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java | 7 ++++--- Mage.Sets/src/mage/cards/d/Decommission.java | 7 ++++--- Mage.Sets/src/mage/cards/d/Deglamer.java | 7 ++++--- Mage.Sets/src/mage/cards/d/DestructiveRevelry.java | 7 ++++--- Mage.Sets/src/mage/cards/d/DevoutChaplain.java | 7 ++++--- Mage.Sets/src/mage/cards/d/DevoutWitness.java | 7 ++++--- Mage.Sets/src/mage/cards/d/Disenchant.java | 7 ++++--- Mage.Sets/src/mage/cards/d/DismantlingBlow.java | 7 ++++--- Mage.Sets/src/mage/cards/d/DispellersCapsule.java | 7 ++++--- Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java | 7 ++++--- Mage.Sets/src/mage/cards/f/FateForgotten.java | 7 ++++--- Mage.Sets/src/mage/cards/f/FiligreeFracture.java | 7 ++++--- Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java | 7 ++++--- .../src/mage/cards/f/FreyaliseLlanowarsFury.java | 7 ++++--- Mage.Sets/src/mage/cards/g/GleefulSabotage.java | 7 ++++--- Mage.Sets/src/mage/cards/h/HarmonicSliver.java | 7 ++++--- Mage.Sets/src/mage/cards/h/HideSeek.java | 7 ++++--- Mage.Sets/src/mage/cards/i/IndrikStomphowler.java | 7 ++++--- Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java | 7 ++++--- Mage.Sets/src/mage/cards/k/KorSanctifiers.java | 7 ++++--- Mage.Sets/src/mage/cards/k/KrosanGrip.java | 7 ++++--- Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java | 7 ++++--- Mage.Sets/src/mage/cards/m/MockeryOfNature.java | 7 ++++--- Mage.Sets/src/mage/cards/m/MysticMelting.java | 7 ++++--- Mage.Sets/src/mage/cards/n/NantukoVigilante.java | 7 ++++--- Mage.Sets/src/mage/cards/n/NaturalEnd.java | 7 ++++--- Mage.Sets/src/mage/cards/n/Naturalize.java | 7 ++++--- Mage.Sets/src/mage/cards/n/NaturesClaim.java | 7 ++++--- Mage.Sets/src/mage/cards/n/NullmageAdvocate.java | 7 ++++--- Mage.Sets/src/mage/cards/n/NullmageShepherd.java | 7 ++++--- Mage.Sets/src/mage/cards/o/OrimsThunder.java | 7 ++++--- Mage.Sets/src/mage/cards/q/QasaliPridemage.java | 7 ++++--- Mage.Sets/src/mage/cards/q/QuietDisrepair.java | 7 ++++--- Mage.Sets/src/mage/cards/r/RayOfDistortion.java | 7 ++++--- Mage.Sets/src/mage/cards/r/ReclamationSage.java | 7 ++++--- Mage.Sets/src/mage/cards/r/ReduceToDreams.java | 7 ++++--- Mage.Sets/src/mage/cards/r/RelicCrush.java | 11 +++++------ Mage.Sets/src/mage/cards/r/ReliquaryMonk.java | 7 ++++--- Mage.Sets/src/mage/cards/r/RendingVines.java | 7 ++++--- Mage.Sets/src/mage/cards/r/ReturnToDust.java | 9 +++++---- Mage.Sets/src/mage/cards/r/RevokeExistence.java | 7 ++++--- Mage.Sets/src/mage/cards/r/RonomUnicorn.java | 7 ++++--- Mage.Sets/src/mage/cards/r/RootOut.java | 7 ++++--- Mage.Sets/src/mage/cards/s/Scrapheap.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SealOfCleansing.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SealOfPrimordium.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SeedSpark.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SliceinTwain.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SolemnOffering.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SpringsageRitual.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SternProctor.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SultaiCharm.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SunderingGrowth.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SunderingVitae.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SylvokReplica.java | 7 ++++--- Mage.Sets/src/mage/cards/t/TerashisGrasp.java | 7 ++++--- Mage.Sets/src/mage/cards/u/UnravelTheAether.java | 7 ++++--- Mage.Sets/src/mage/cards/v/ViridianZealot.java | 7 ++++--- Mage.Sets/src/mage/cards/w/WearAway.java | 7 ++++--- Mage.Sets/src/mage/cards/w/WickerboughElder.java | 7 ++++--- Mage/src/main/java/mage/filter/StaticFilters.java | 1 + 71 files changed, 284 insertions(+), 217 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/Abolish.java b/Mage.Sets/src/mage/cards/a/Abolish.java index bbba820f90..90a814ecab 100644 --- a/Mage.Sets/src/mage/cards/a/Abolish.java +++ b/Mage.Sets/src/mage/cards/a/Abolish.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.common.DiscardTargetCost; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,11 +35,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterCard; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; import mage.target.common.TargetCardInHand; +import java.util.UUID; + /** * * @author Backfir3 @@ -62,7 +63,7 @@ public class Abolish extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public Abolish(final Abolish card) { diff --git a/Mage.Sets/src/mage/cards/a/ActOfAuthority.java b/Mage.Sets/src/mage/cards/a/ActOfAuthority.java index c423e5c069..b950c130f7 100644 --- a/Mage.Sets/src/mage/cards/a/ActOfAuthority.java +++ b/Mage.Sets/src/mage/cards/a/ActOfAuthority.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -39,12 +38,14 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author LevelX2 @@ -57,11 +58,11 @@ public class ActOfAuthority extends CardImpl { // When Act of Authority enters the battlefield, you may exile target artifact or enchantment. Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), true); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); // At the beginning of your upkeep, you may exile target artifact or enchantment. If you do, its controller gains control of Act of Authority. ability = new BeginningOfUpkeepTriggeredAbility(new ActOfAuthorityEffect(), TargetController.YOU, true); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AltarsLight.java b/Mage.Sets/src/mage/cards/a/AltarsLight.java index fa57addaf6..1720890bfa 100644 --- a/Mage.Sets/src/mage/cards/a/AltarsLight.java +++ b/Mage.Sets/src/mage/cards/a/AltarsLight.java @@ -27,14 +27,15 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class AltarsLight extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public AltarsLight(final AltarsLight card) { diff --git a/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java b/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java index a4ae37c7b1..6f723aa96c 100644 --- a/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java +++ b/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java @@ -27,28 +27,28 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** - * * @author spjspj */ public class AppetiteForTheUnnatural extends CardImpl { public AppetiteForTheUnnatural(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); // Destroy target artifact or enchantment. You gain 2 life. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new GainLifeEffect(2)); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public AppetiteForTheUnnatural(final AppetiteForTheUnnatural card) { diff --git a/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java b/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java index c531f3b2de..8e5a778172 100644 --- a/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java +++ b/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java @@ -27,15 +27,16 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class ArtisansSorrow extends CardImpl { // Destroy target artifact or enchantment. Scry 2. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new ScryEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/a/AuraOfSilence.java b/Mage.Sets/src/mage/cards/a/AuraOfSilence.java index 16614a595f..4fe523c1e2 100644 --- a/Mage.Sets/src/mage/cards/a/AuraOfSilence.java +++ b/Mage.Sets/src/mage/cards/a/AuraOfSilence.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -39,11 +38,13 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.target.TargetPermanent; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author emerald000 @@ -57,7 +58,7 @@ public class AuraOfSilence extends CardImpl { // Sacrifice Aura of Silence: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AuraShards.java b/Mage.Sets/src/mage/cards/a/AuraShards.java index dfa4b71325..ab6f562f02 100644 --- a/Mage.Sets/src/mage/cards/a/AuraShards.java +++ b/Mage.Sets/src/mage/cards/a/AuraShards.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,9 +35,10 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.StaticFilters; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author emerald000 @@ -50,7 +50,7 @@ public class AuraShards extends CardImpl { // Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment. Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, true, "Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment"); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BreakAsunder.java b/Mage.Sets/src/mage/cards/b/BreakAsunder.java index 043e87d09b..08be9b9290 100644 --- a/Mage.Sets/src/mage/cards/b/BreakAsunder.java +++ b/Mage.Sets/src/mage/cards/b/BreakAsunder.java @@ -27,16 +27,17 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Jgod @@ -48,7 +49,7 @@ public class BreakAsunder extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java b/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java index e5a479197a..7af92028e8 100644 --- a/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java +++ b/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author anonymous @@ -58,7 +59,7 @@ public class CapashenUnicorn extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java b/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java index d0658e0da4..e9a15e7099 100644 --- a/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java +++ b/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,7 +57,7 @@ public class CausticCaterpillar extends CardImpl { // {1}{G}, Sacrifice Caustic Caterpillar: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java b/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java index c6633b55c5..2b85bbf7b6 100644 --- a/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java +++ b/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author emerald000 @@ -52,7 +53,7 @@ public class ConclaveNaturalists extends CardImpl { // When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment. Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/Decommission.java b/Mage.Sets/src/mage/cards/d/Decommission.java index 0c5542bd12..8f0d2a60cf 100644 --- a/Mage.Sets/src/mage/cards/d/Decommission.java +++ b/Mage.Sets/src/mage/cards/d/Decommission.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.condition.common.RevoltCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,10 +34,12 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; import mage.watchers.common.RevoltWatcher; +import java.util.UUID; + /** * * @author emerald000 @@ -50,7 +51,7 @@ public class Decommission extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Revolt — If a permanent you controlled left the battlefield this turn, you gain 3 life. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(3), RevoltCondition.instance, "
Revolt — If a permanent you controlled left the battlefield this turn, you gain 3 life.")); diff --git a/Mage.Sets/src/mage/cards/d/Deglamer.java b/Mage.Sets/src/mage/cards/d/Deglamer.java index cc1785534a..1cf77a6f05 100644 --- a/Mage.Sets/src/mage/cards/d/Deglamer.java +++ b/Mage.Sets/src/mage/cards/d/Deglamer.java @@ -27,14 +27,15 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class Deglamer extends CardImpl { // Choose target artifact or enchantment. Its owner shuffles it into his or her library. this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public Deglamer(final Deglamer card) { diff --git a/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java b/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java index 8cad2a2da9..67b69f3529 100644 --- a/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java +++ b/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java @@ -27,20 +27,21 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class DestructiveRevelry extends CardImpl { // Destroy target artifact or enchantment. Destructive Revelry deals 2 damage to that permanent's controller. this.getSpellAbility().addEffect(new DestructiveRevelryEffect()); - Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); this.getSpellAbility().addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/d/DevoutChaplain.java b/Mage.Sets/src/mage/cards/d/DevoutChaplain.java index b3df20e715..67ab966e72 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutChaplain.java +++ b/Mage.Sets/src/mage/cards/d/DevoutChaplain.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,6 +46,8 @@ import mage.filter.predicate.permanent.TappedPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * @author noxx @@ -71,7 +72,7 @@ public class DevoutChaplain extends CardImpl { // {T}, Tap two untapped Humans you control: Exile target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost()); ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, 2, humanFilter, false))); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DevoutWitness.java b/Mage.Sets/src/mage/cards/d/DevoutWitness.java index ce8a70d3fd..00a183c887 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutWitness.java +++ b/Mage.Sets/src/mage/cards/d/DevoutWitness.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -60,7 +61,7 @@ public class DevoutWitness extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/Disenchant.java b/Mage.Sets/src/mage/cards/d/Disenchant.java index ab421fa7a4..de0bae89d1 100644 --- a/Mage.Sets/src/mage/cards/d/Disenchant.java +++ b/Mage.Sets/src/mage/cards/d/Disenchant.java @@ -27,14 +27,15 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class Disenchant extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public Disenchant(final Disenchant card) { diff --git a/Mage.Sets/src/mage/cards/d/DismantlingBlow.java b/Mage.Sets/src/mage/cards/d/DismantlingBlow.java index c6c820e46f..8ffc9aced3 100644 --- a/Mage.Sets/src/mage/cards/d/DismantlingBlow.java +++ b/Mage.Sets/src/mage/cards/d/DismantlingBlow.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.condition.common.KickedCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,9 +35,11 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class DismantlingBlow extends CardImpl { this.addAbility(new KickerAbility("{2}{U}")); // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // If Dismantling Blow was kicked, draw two cards. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DrawCardSourceControllerEffect(2), diff --git a/Mage.Sets/src/mage/cards/d/DispellersCapsule.java b/Mage.Sets/src/mage/cards/d/DispellersCapsule.java index 0e85bafc00..3ccf3a72cb 100644 --- a/Mage.Sets/src/mage/cards/d/DispellersCapsule.java +++ b/Mage.Sets/src/mage/cards/d/DispellersCapsule.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -37,9 +36,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -51,7 +52,7 @@ public class DispellersCapsule extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{W}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java b/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java index 8675238f6b..75128d052c 100644 --- a/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java +++ b/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java @@ -27,14 +27,15 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -47,7 +48,7 @@ public class FadeIntoAntiquity extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public FadeIntoAntiquity(final FadeIntoAntiquity card) { diff --git a/Mage.Sets/src/mage/cards/f/FateForgotten.java b/Mage.Sets/src/mage/cards/f/FateForgotten.java index 88fec4d8c5..3bf8ebc94c 100644 --- a/Mage.Sets/src/mage/cards/f/FateForgotten.java +++ b/Mage.Sets/src/mage/cards/f/FateForgotten.java @@ -27,14 +27,15 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -46,7 +47,7 @@ public class FateForgotten extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public FateForgotten(final FateForgotten card) { diff --git a/Mage.Sets/src/mage/cards/f/FiligreeFracture.java b/Mage.Sets/src/mage/cards/f/FiligreeFracture.java index 6b3033faf9..9506339dae 100644 --- a/Mage.Sets/src/mage/cards/f/FiligreeFracture.java +++ b/Mage.Sets/src/mage/cards/f/FiligreeFracture.java @@ -27,19 +27,20 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author North @@ -50,7 +51,7 @@ public class FiligreeFracture extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); // Destroy target artifact or enchantment. If that permanent was blue or black, draw a card. - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new FiligreeFractureEffect()); } diff --git a/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java b/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java index d204524620..580572e466 100644 --- a/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java +++ b/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java @@ -27,16 +27,17 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -48,7 +49,7 @@ public class ForsakeTheWorldly extends CardImpl { // Exile target artifact or enchantment. getSpellAbility().addEffect(new ExileTargetEffect()); - getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java b/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java index a8f2eb3ac1..602d0b3c1d 100644 --- a/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java +++ b/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.LoyaltyAbility; import mage.abilities.common.CanBeYourCommanderAbility; @@ -39,12 +38,14 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.permanent.token.FreyaliseLlanowarsFuryToken; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -67,7 +68,7 @@ public class FreyaliseLlanowarsFury extends CardImpl { this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new FreyaliseLlanowarsFuryToken()), 2)); // -2: Destroy target artifact or enchantment. LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new DestroyTargetEffect(), -2); - loyaltyAbility.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + loyaltyAbility.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(loyaltyAbility); // -6: Draw a card for each green creature you control. this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterGreen)), -6)); diff --git a/Mage.Sets/src/mage/cards/g/GleefulSabotage.java b/Mage.Sets/src/mage/cards/g/GleefulSabotage.java index ffb579e63b..176d08a772 100644 --- a/Mage.Sets/src/mage/cards/g/GleefulSabotage.java +++ b/Mage.Sets/src/mage/cards/g/GleefulSabotage.java @@ -27,15 +27,16 @@ */ package mage.cards.g; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.ConspireAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -47,7 +48,7 @@ public class GleefulSabotage extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Conspire this.addAbility(new ConspireAbility(getId(), ConspireAbility.ConspireTargets.ONE)); diff --git a/Mage.Sets/src/mage/cards/h/HarmonicSliver.java b/Mage.Sets/src/mage/cards/h/HarmonicSliver.java index 66c25749c3..393353e2b2 100644 --- a/Mage.Sets/src/mage/cards/h/HarmonicSliver.java +++ b/Mage.Sets/src/mage/cards/h/HarmonicSliver.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -40,11 +39,13 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,7 +66,7 @@ public class HarmonicSliver extends CardImpl { // All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment." TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); - TargetPermanent target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + TargetPermanent target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); ability.addTarget(target); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( ability, Duration.WhileOnBattlefield, diff --git a/Mage.Sets/src/mage/cards/h/HideSeek.java b/Mage.Sets/src/mage/cards/h/HideSeek.java index 5a7a79386e..6e7f88e0b2 100644 --- a/Mage.Sets/src/mage/cards/h/HideSeek.java +++ b/Mage.Sets/src/mage/cards/h/HideSeek.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.PutOnLibraryTargetEffect; @@ -38,13 +37,15 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SpellAbilityType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * * @author LevelX2 @@ -57,7 +58,7 @@ public class HideSeek extends SplitCard { // Hide // Put target artifact or enchantment on the bottom of its owner's library. getLeftHalfCard().getSpellAbility().addEffect(new PutOnLibraryTargetEffect(false)); - getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Seek // Search target opponent's library for a card and exile it. You gain life equal to its converted mana cost. Then that player shuffles his or her library.. diff --git a/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java b/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java index 56ae9c86b9..4ba730da6e 100644 --- a/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java +++ b/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java @@ -27,7 +27,6 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -50,7 +51,7 @@ public class IndrikStomphowler extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java b/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java index 0f3aaa3771..20a597b9f6 100644 --- a/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java +++ b/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java @@ -27,14 +27,15 @@ */ package mage.cards.i; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class IronwrightsCleansing extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } diff --git a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java index d296685289..c137f0f7ef 100644 --- a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java +++ b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java @@ -27,7 +27,6 @@ */ package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; @@ -37,9 +36,11 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -59,7 +60,7 @@ public class KorSanctifiers extends CardImpl { // When Kor Sanctifiers enters the battlefield, if it was kicked, destroy target artifact or enchantment. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target artifact or enchantment.")); } diff --git a/Mage.Sets/src/mage/cards/k/KrosanGrip.java b/Mage.Sets/src/mage/cards/k/KrosanGrip.java index 308b44a08a..9d5c27f353 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanGrip.java +++ b/Mage.Sets/src/mage/cards/k/KrosanGrip.java @@ -27,15 +27,16 @@ */ package mage.cards.k; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.SplitSecondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author jonubuu @@ -48,7 +49,7 @@ public class KrosanGrip extends CardImpl { // Split second this.addAbility(new SplitSecondAbility()); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java b/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java index f4aab133d5..5edadb5827 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java +++ b/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java @@ -28,7 +28,6 @@ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -57,7 +58,7 @@ public class LeoninRelicWarder extends CardImpl { this.toughness = new MageInt(2); Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); diff --git a/Mage.Sets/src/mage/cards/m/MockeryOfNature.java b/Mage.Sets/src/mage/cards/m/MockeryOfNature.java index b1366b71ee..2816ee6dbc 100644 --- a/Mage.Sets/src/mage/cards/m/MockeryOfNature.java +++ b/Mage.Sets/src/mage/cards/m/MockeryOfNature.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; @@ -37,9 +36,11 @@ import mage.abilities.keyword.EmergeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) @@ -58,7 +59,7 @@ public class MockeryOfNature extends CardImpl { // When you cast Mockery of Nature, you may destroy target artifact or enchantment. Ability ability = new CastSourceTriggeredAbility(new DestroyTargetEffect(), true); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MysticMelting.java b/Mage.Sets/src/mage/cards/m/MysticMelting.java index 8b159d8c3b..3c4690c0cd 100644 --- a/Mage.Sets/src/mage/cards/m/MysticMelting.java +++ b/Mage.Sets/src/mage/cards/m/MysticMelting.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -49,7 +50,7 @@ public class MysticMelting extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( diff --git a/Mage.Sets/src/mage/cards/n/NantukoVigilante.java b/Mage.Sets/src/mage/cards/n/NantukoVigilante.java index c072f3e01a..3c69a0d2db 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoVigilante.java +++ b/Mage.Sets/src/mage/cards/n/NantukoVigilante.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; @@ -37,9 +36,11 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -59,7 +60,7 @@ public class NantukoVigilante extends CardImpl { this.addAbility(new MorphAbility(this,new ManaCostsImpl("{1}{G}"))); // When Nantuko Vigilante is turned face up, destroy target artifact or enchantment. Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DestroyTargetEffect()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NaturalEnd.java b/Mage.Sets/src/mage/cards/n/NaturalEnd.java index f7ad7e2752..b243906ef7 100644 --- a/Mage.Sets/src/mage/cards/n/NaturalEnd.java +++ b/Mage.Sets/src/mage/cards/n/NaturalEnd.java @@ -27,15 +27,16 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author North @@ -48,7 +49,7 @@ public class NaturalEnd extends CardImpl { // Destroy target artifact or enchantment. You gain 3 life. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new GainLifeEffect(3)); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public NaturalEnd(final NaturalEnd card) { diff --git a/Mage.Sets/src/mage/cards/n/Naturalize.java b/Mage.Sets/src/mage/cards/n/Naturalize.java index afcc179b6c..680a33ad02 100644 --- a/Mage.Sets/src/mage/cards/n/Naturalize.java +++ b/Mage.Sets/src/mage/cards/n/Naturalize.java @@ -27,14 +27,15 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LokiX @@ -45,7 +46,7 @@ public class Naturalize extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/n/NaturesClaim.java b/Mage.Sets/src/mage/cards/n/NaturesClaim.java index 17c14e2472..4e93552176 100644 --- a/Mage.Sets/src/mage/cards/n/NaturesClaim.java +++ b/Mage.Sets/src/mage/cards/n/NaturesClaim.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,12 +34,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -53,7 +54,7 @@ public class NaturesClaim extends CardImpl { // Destroy target artifact or enchantment. Its controller gains 4 life. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new NaturesClaimEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public NaturesClaim(final NaturesClaim card) { diff --git a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java index 21a069ac67..66ea79d1f5 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java +++ b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -40,11 +39,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; import mage.target.common.TargetCardInOpponentsGraveyard; import mage.target.targetpointer.SecondTargetPointer; +import java.util.UUID; + /** * * @author LevelX2 @@ -67,7 +68,7 @@ public class NullmageAdvocate extends CardImpl { effect.setTargetPointer(new SecondTargetPointer()); ability.addEffect(effect); ability.addTarget(new TargetCardInOpponentsGraveyard(2,2, new FilterCard("two target cards from an opponent's graveyard"), true)); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NullmageShepherd.java b/Mage.Sets/src/mage/cards/n/NullmageShepherd.java index f206b5b602..4a6bf2d529 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageShepherd.java +++ b/Mage.Sets/src/mage/cards/n/NullmageShepherd.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -37,13 +36,15 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author Loki @@ -65,7 +66,7 @@ public class NullmageShepherd extends CardImpl { // Tap four untapped creatures you control: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(4, 4, filterCost, true))); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrimsThunder.java b/Mage.Sets/src/mage/cards/o/OrimsThunder.java index cb3e953781..fce6af284b 100644 --- a/Mage.Sets/src/mage/cards/o/OrimsThunder.java +++ b/Mage.Sets/src/mage/cards/o/OrimsThunder.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -40,12 +39,14 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -60,7 +61,7 @@ public class OrimsThunder extends CardImpl { // Destroy target artifact or enchantment. If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature. this.getSpellAbility().addEffect(new OrimsThunderEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new OrimsThunderEffect2(), KickedCondition.instance, diff --git a/Mage.Sets/src/mage/cards/q/QasaliPridemage.java b/Mage.Sets/src/mage/cards/q/QasaliPridemage.java index 75cd47cc87..173e05f26a 100644 --- a/Mage.Sets/src/mage/cards/q/QasaliPridemage.java +++ b/Mage.Sets/src/mage/cards/q/QasaliPridemage.java @@ -27,7 +27,6 @@ */ package mage.cards.q; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,10 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author North @@ -62,7 +63,7 @@ public class QasaliPridemage extends CardImpl { // {1}, Sacrifice Qasali Pridemage: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}")); ability.addCost(new SacrificeSourceCost()); - Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); ability.addTarget(target); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/q/QuietDisrepair.java b/Mage.Sets/src/mage/cards/q/QuietDisrepair.java index 95994a64ba..5b80f8a0a0 100644 --- a/Mage.Sets/src/mage/cards/q/QuietDisrepair.java +++ b/Mage.Sets/src/mage/cards/q/QuietDisrepair.java @@ -27,7 +27,6 @@ */ package mage.cards.q; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -40,9 +39,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -55,7 +56,7 @@ public class QuietDisrepair extends CardImpl { // Enchant artifact or enchantment - TargetPermanent auraTarget = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + TargetPermanent auraTarget = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); diff --git a/Mage.Sets/src/mage/cards/r/RayOfDistortion.java b/Mage.Sets/src/mage/cards/r/RayOfDistortion.java index 476a4335b7..f673841dd3 100644 --- a/Mage.Sets/src/mage/cards/r/RayOfDistortion.java +++ b/Mage.Sets/src/mage/cards/r/RayOfDistortion.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlashbackAbility; @@ -35,9 +34,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author cbt33 @@ -49,7 +50,7 @@ public class RayOfDistortion extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Flashback {4}{W}{W} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{W}{W}"), TimingRule.INSTANT)); } diff --git a/Mage.Sets/src/mage/cards/r/ReclamationSage.java b/Mage.Sets/src/mage/cards/r/ReclamationSage.java index 966d5ddde7..8b90d6cc31 100644 --- a/Mage.Sets/src/mage/cards/r/ReclamationSage.java +++ b/Mage.Sets/src/mage/cards/r/ReclamationSage.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +55,7 @@ public class ReclamationSage extends CardImpl { // When Reclamation Sage enters the battlefield, you may destroy target artifact or enchantment. Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/ReduceToDreams.java b/Mage.Sets/src/mage/cards/r/ReduceToDreams.java index 1d2e37fc41..8fb1942318 100644 --- a/Mage.Sets/src/mage/cards/r/ReduceToDreams.java +++ b/Mage.Sets/src/mage/cards/r/ReduceToDreams.java @@ -27,12 +27,13 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -44,7 +45,7 @@ public class ReduceToDreams extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}"); // Return all artifacts and enchantments to their owners' hands. - this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public ReduceToDreams(final ReduceToDreams card) { diff --git a/Mage.Sets/src/mage/cards/r/RelicCrush.java b/Mage.Sets/src/mage/cards/r/RelicCrush.java index ca7aa3ec40..305c8e8b68 100644 --- a/Mage.Sets/src/mage/cards/r/RelicCrush.java +++ b/Mage.Sets/src/mage/cards/r/RelicCrush.java @@ -27,16 +27,16 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -47,12 +47,11 @@ public class RelicCrush extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{G}"); // Destroy target artifact or enchantment and up to one other target artifact or enchantment. - FilterPermanent filter = new FilterArtifactOrEnchantmentPermanent(); Effect effect = new DestroyTargetEffect(false, true); effect.setText("Destroy target artifact or enchantment and up to one other target artifact or enchantment"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPermanent(filter)); - this.getSpellAbility().addTarget(new TargetPermanent(0, 1, filter, false)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(0, 1, StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT, false)); } public RelicCrush(final RelicCrush card) { diff --git a/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java b/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java index 79e96eb499..081276e98b 100644 --- a/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java +++ b/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -54,7 +55,7 @@ public class ReliquaryMonk extends CardImpl { // When Reliquary Monk dies, destroy target artifact or enchantment. Ability ability = new DiesTriggeredAbility(new DestroyTargetEffect(), false); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RendingVines.java b/Mage.Sets/src/mage/cards/r/RendingVines.java index 8ae5d1da6f..e6f5126f45 100644 --- a/Mage.Sets/src/mage/cards/r/RendingVines.java +++ b/Mage.Sets/src/mage/cards/r/RendingVines.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,12 +34,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -53,7 +54,7 @@ public class RendingVines extends CardImpl { // Destroy target artifact or enchantment if its converted mana cost is less than or equal to the number of cards in your hand. this.getSpellAbility().addEffect(new RendingVinesEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/cards/r/ReturnToDust.java b/Mage.Sets/src/mage/cards/r/ReturnToDust.java index 76fb7d67f1..eb3fca9b21 100644 --- a/Mage.Sets/src/mage/cards/r/ReturnToDust.java +++ b/Mage.Sets/src/mage/cards/r/ReturnToDust.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.effects.Effect; @@ -35,10 +34,12 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author emerald000 @@ -63,10 +64,10 @@ public class ReturnToDust extends CardImpl { public void adjustTargets(Ability ability, Game game) { if (ability instanceof SpellAbility) { if (game.getActivePlayerId().equals(ability.getControllerId()) && game.isMainPhase()) { - ability.addTarget(new TargetPermanent(1, 2, new FilterArtifactOrEnchantmentPermanent(), false)); + ability.addTarget(new TargetPermanent(1, 2, StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT, false)); } else { - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } } } diff --git a/Mage.Sets/src/mage/cards/r/RevokeExistence.java b/Mage.Sets/src/mage/cards/r/RevokeExistence.java index a3a4ed51e0..19f167e71d 100644 --- a/Mage.Sets/src/mage/cards/r/RevokeExistence.java +++ b/Mage.Sets/src/mage/cards/r/RevokeExistence.java @@ -27,14 +27,15 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class RevokeExistence extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public RevokeExistence(final RevokeExistence card) { diff --git a/Mage.Sets/src/mage/cards/r/RonomUnicorn.java b/Mage.Sets/src/mage/cards/r/RonomUnicorn.java index d7c700f7be..2558993edc 100644 --- a/Mage.Sets/src/mage/cards/r/RonomUnicorn.java +++ b/Mage.Sets/src/mage/cards/r/RonomUnicorn.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -37,9 +36,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Jgod @@ -54,7 +55,7 @@ public class RonomUnicorn extends CardImpl { // Sacrifice Ronom Unicorn: Destroy target enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RootOut.java b/Mage.Sets/src/mage/cards/r/RootOut.java index bb6f18008b..28603d1203 100644 --- a/Mage.Sets/src/mage/cards/r/RootOut.java +++ b/Mage.Sets/src/mage/cards/r/RootOut.java @@ -27,16 +27,17 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.keyword.InvestigateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +49,7 @@ public class RootOut extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Investigate. Effect effect = new InvestigateEffect(); effect.setText("
Investigate. (Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")"); diff --git a/Mage.Sets/src/mage/cards/s/Scrapheap.java b/Mage.Sets/src/mage/cards/s/Scrapheap.java index dc2292e70d..d92e8d8738 100644 --- a/Mage.Sets/src/mage/cards/s/Scrapheap.java +++ b/Mage.Sets/src/mage/cards/s/Scrapheap.java @@ -27,20 +27,21 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author Plopman @@ -90,7 +91,7 @@ class ScrapheapTriggeredAbility extends TriggeredAbilityImpl { if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); if (permanent != null && permanent.getOwnerId().equals(this.getControllerId())) { - if (new FilterArtifactOrEnchantmentPermanent().match(permanent, sourceId, controllerId, game)) { + if (StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT.match(permanent, sourceId, controllerId, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/s/SealOfCleansing.java b/Mage.Sets/src/mage/cards/s/SealOfCleansing.java index 5e8354265e..0ede3eeb00 100644 --- a/Mage.Sets/src/mage/cards/s/SealOfCleansing.java +++ b/Mage.Sets/src/mage/cards/s/SealOfCleansing.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -36,9 +35,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -50,7 +51,7 @@ public class SealOfCleansing extends CardImpl { // Sacrifice Seal of Cleansing: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java b/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java index 3794f09b09..de8062390d 100644 --- a/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java +++ b/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -36,9 +35,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -50,7 +51,7 @@ public class SealOfPrimordium extends CardImpl { // Sacrifice Seal of Primordium: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SeedSpark.java b/Mage.Sets/src/mage/cards/s/SeedSpark.java index cac607702c..a42b3b4a34 100644 --- a/Mage.Sets/src/mage/cards/s/SeedSpark.java +++ b/Mage.Sets/src/mage/cards/s/SeedSpark.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.condition.common.ManaWasSpentCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; @@ -36,10 +35,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.permanent.token.SaprolingToken; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Wehk @@ -50,7 +51,7 @@ public class SeedSpark extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}"); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); //If {G} was spent to cast Seed Spark, create two 1/1 green Saproling creature tokens. diff --git a/Mage.Sets/src/mage/cards/s/SliceinTwain.java b/Mage.Sets/src/mage/cards/s/SliceinTwain.java index 95e702609b..abb03b3116 100644 --- a/Mage.Sets/src/mage/cards/s/SliceinTwain.java +++ b/Mage.Sets/src/mage/cards/s/SliceinTwain.java @@ -28,15 +28,16 @@ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -48,7 +49,7 @@ public class SliceinTwain extends CardImpl { this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public SliceinTwain (final SliceinTwain card) { diff --git a/Mage.Sets/src/mage/cards/s/SolemnOffering.java b/Mage.Sets/src/mage/cards/s/SolemnOffering.java index 055dbea7d8..e936622b66 100644 --- a/Mage.Sets/src/mage/cards/s/SolemnOffering.java +++ b/Mage.Sets/src/mage/cards/s/SolemnOffering.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -46,7 +47,7 @@ public class SolemnOffering extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}"); // Destroy target artifact or enchantment. You gain 4 life. - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new GainLifeEffect(4)); } diff --git a/Mage.Sets/src/mage/cards/s/SpringsageRitual.java b/Mage.Sets/src/mage/cards/s/SpringsageRitual.java index ee6b01354b..8968858461 100644 --- a/Mage.Sets/src/mage/cards/s/SpringsageRitual.java +++ b/Mage.Sets/src/mage/cards/s/SpringsageRitual.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class SpringsageRitual extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}"); // Destroy target artifact or enchantment. You gain 4 life. - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new GainLifeEffect(4)); } diff --git a/Mage.Sets/src/mage/cards/s/SternProctor.java b/Mage.Sets/src/mage/cards/s/SternProctor.java index c2f54f2fe4..7003d55225 100644 --- a/Mage.Sets/src/mage/cards/s/SternProctor.java +++ b/Mage.Sets/src/mage/cards/s/SternProctor.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -54,7 +55,7 @@ public class SternProctor extends CardImpl { // When Stern Proctor enters the battlefield, return target artifact or enchantment to its owner's hand. Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); - TargetPermanent target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + TargetPermanent target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); ability.addTarget(target); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SultaiCharm.java b/Mage.Sets/src/mage/cards/s/SultaiCharm.java index 5fe3e9ec13..a7a09b0b61 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiCharm.java +++ b/Mage.Sets/src/mage/cards/s/SultaiCharm.java @@ -27,19 +27,20 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Mode; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.MonocoloredPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -64,7 +65,7 @@ public class SultaiCharm extends CardImpl { // * Destroy target artifact or enchantment. Mode mode = new Mode(); mode.getEffects().add(new DestroyTargetEffect()); - mode.getTargets().add(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + mode.getTargets().add(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addMode(mode); // * Draw two cards, then discard a card. diff --git a/Mage.Sets/src/mage/cards/s/SunderingGrowth.java b/Mage.Sets/src/mage/cards/s/SunderingGrowth.java index eaa35753d3..acbf893398 100644 --- a/Mage.Sets/src/mage/cards/s/SunderingGrowth.java +++ b/Mage.Sets/src/mage/cards/s/SunderingGrowth.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.PopulateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevleX2 @@ -48,7 +49,7 @@ public class SunderingGrowth extends CardImpl { // Destroy target artifact or enchantment, then populate. // (Create a token that's a copy of a creature token you control.) - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new PopulateEffect("then")); } diff --git a/Mage.Sets/src/mage/cards/s/SunderingVitae.java b/Mage.Sets/src/mage/cards/s/SunderingVitae.java index df9c402f4f..42d29173b0 100644 --- a/Mage.Sets/src/mage/cards/s/SunderingVitae.java +++ b/Mage.Sets/src/mage/cards/s/SunderingVitae.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author jonubuu @@ -48,7 +49,7 @@ public class SunderingVitae extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/s/SylvokReplica.java b/Mage.Sets/src/mage/cards/s/SylvokReplica.java index 84f7ee5ba3..c67cd56009 100644 --- a/Mage.Sets/src/mage/cards/s/SylvokReplica.java +++ b/Mage.Sets/src/mage/cards/s/SylvokReplica.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -56,7 +57,7 @@ public class SylvokReplica extends CardImpl { // {G}, Sacrifice Sylvok Replica: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TerashisGrasp.java b/Mage.Sets/src/mage/cards/t/TerashisGrasp.java index 81e7983ce7..84d36347e3 100644 --- a/Mage.Sets/src/mage/cards/t/TerashisGrasp.java +++ b/Mage.Sets/src/mage/cards/t/TerashisGrasp.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,12 +34,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class TerashisGrasp extends CardImpl { this.subtype.add("Arcane"); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); // You gain life equal to its converted mana cost. this.getSpellAbility().addEffect(new TerashisGraspEffect()); diff --git a/Mage.Sets/src/mage/cards/u/UnravelTheAether.java b/Mage.Sets/src/mage/cards/u/UnravelTheAether.java index a45c0d13ad..8780b61626 100644 --- a/Mage.Sets/src/mage/cards/u/UnravelTheAether.java +++ b/Mage.Sets/src/mage/cards/u/UnravelTheAether.java @@ -27,14 +27,15 @@ */ package mage.cards.u; -import java.util.UUID; import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class UnravelTheAether extends CardImpl { // Choose target artifact or enchantment. Its owner shuffles it into his or her library. this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public UnravelTheAether(final UnravelTheAether card) { diff --git a/Mage.Sets/src/mage/cards/v/ViridianZealot.java b/Mage.Sets/src/mage/cards/v/ViridianZealot.java index 0b0271e581..ccd4f184ae 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianZealot.java +++ b/Mage.Sets/src/mage/cards/v/ViridianZealot.java @@ -27,7 +27,6 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -57,7 +58,7 @@ public class ViridianZealot extends CardImpl { // {1}{G}, Sacrifice Viridian Zealot: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WearAway.java b/Mage.Sets/src/mage/cards/w/WearAway.java index c4a1b52fae..1d7aa3aff7 100644 --- a/Mage.Sets/src/mage/cards/w/WearAway.java +++ b/Mage.Sets/src/mage/cards/w/WearAway.java @@ -27,16 +27,17 @@ */ package mage.cards.w; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,7 @@ public class WearAway extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); this.getSpellAbility().addTarget(target); // Splice onto Arcane {3}{G} this.addAbility(new SpliceOntoArcaneAbility("{3}{G}")); diff --git a/Mage.Sets/src/mage/cards/w/WickerboughElder.java b/Mage.Sets/src/mage/cards/w/WickerboughElder.java index a37ca0f2f6..ad74f13525 100644 --- a/Mage.Sets/src/mage/cards/w/WickerboughElder.java +++ b/Mage.Sets/src/mage/cards/w/WickerboughElder.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; @@ -42,9 +41,11 @@ import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -63,7 +64,7 @@ public class WickerboughElder extends CardImpl { // {G}, Remove a -1/-1 counter from Wickerbough Elder: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.G)); ability.addCost(new RemoveCountersSourceCost(CounterType.M1M1.createInstance(1))); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index ff16f24eca..61d2143052 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -22,6 +22,7 @@ public final class StaticFilters { public static final FilterSpiritOrArcaneCard SPIRIT_OR_ARCANE_CARD = new FilterSpiritOrArcaneCard(); + public static final FilterArtifactOrEnchantmentPermanent ARTIFACT_OR_ENCHANTMENT_PERMANENT = new FilterArtifactOrEnchantmentPermanent(); public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard(); public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard();