From c2b157d79046019a26ebd9a8299d3f68859bfd43 Mon Sep 17 00:00:00 2001 From: igoudt Date: Mon, 24 Jul 2017 08:41:42 +0200 Subject: [PATCH 1/3] 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(); From 216e269a31631e3d5244c254e1169506958861aa Mon Sep 17 00:00:00 2001 From: igoudt Date: Mon, 24 Jul 2017 08:55:43 +0200 Subject: [PATCH 2/3] use static filter for enchantment permanents --- Mage.Sets/src/mage/cards/a/AbzanAdvantage.java | 7 ++++--- Mage.Sets/src/mage/cards/a/AuraThief.java | 7 ++++--- Mage.Sets/src/mage/cards/b/BubblingBeebles.java | 7 ++++--- Mage.Sets/src/mage/cards/c/CleansingMeditation.java | 7 ++++--- Mage.Sets/src/mage/cards/d/DrakeFamiliar.java | 10 ++++------ Mage.Sets/src/mage/cards/f/FemerefEnchantress.java | 7 ++++--- Mage.Sets/src/mage/cards/h/HarmonicConvergence.java | 13 +++++++------ Mage.Sets/src/mage/cards/h/HiddenAncients.java | 7 ++++--- Mage.Sets/src/mage/cards/h/HiddenGibbons.java | 7 ++++--- Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java | 7 ++++--- Mage.Sets/src/mage/cards/h/HiddenSpider.java | 7 ++++--- Mage.Sets/src/mage/cards/k/KiorasDismissal.java | 7 ++++--- Mage.Sets/src/mage/cards/l/LagonnaBandElder.java | 7 ++++--- Mage.Sets/src/mage/cards/m/MultanisDecree.java | 7 ++++--- Mage.Sets/src/mage/cards/o/OpalArchangel.java | 7 ++++--- Mage.Sets/src/mage/cards/o/OpalCaryatid.java | 7 ++++--- Mage.Sets/src/mage/cards/o/OpalChampion.java | 7 ++++--- Mage.Sets/src/mage/cards/o/OpalGargoyle.java | 7 ++++--- Mage.Sets/src/mage/cards/o/OpalGuardian.java | 7 ++++--- Mage.Sets/src/mage/cards/p/Paraselene.java | 7 ++++--- Mage.Sets/src/mage/cards/p/PatriciansScorn.java | 7 ++++--- Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java | 7 ++++--- Mage.Sets/src/mage/cards/s/SphereOfSafety.java | 7 ++++--- Mage.Sets/src/mage/cards/t/TetheredGriffin.java | 7 ++++--- Mage.Sets/src/mage/cards/v/VigilantMartyr.java | 7 ++++--- Mage.Sets/src/mage/cards/w/WardOfBones.java | 8 ++++---- Mage.Sets/src/mage/cards/w/Wirecat.java | 8 ++++---- Mage/src/main/java/mage/filter/StaticFilters.java | 1 + 28 files changed, 112 insertions(+), 89 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AbzanAdvantage.java b/Mage.Sets/src/mage/cards/a/AbzanAdvantage.java index 0428d851d3..e9afd1b79c 100644 --- a/Mage.Sets/src/mage/cards/a/AbzanAdvantage.java +++ b/Mage.Sets/src/mage/cards/a/AbzanAdvantage.java @@ -27,15 +27,16 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.SacrificeEffect; import mage.abilities.effects.keyword.BolsterEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author emerald000 @@ -46,7 +47,7 @@ public class AbzanAdvantage extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // Target player sacrifices an enchantment. Bolster 1. - this.getSpellAbility().addEffect(new SacrificeEffect(new FilterEnchantmentPermanent(), 1, "Target player")); + this.getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, 1, "Target player")); this.getSpellAbility().addEffect(new BolsterEffect(1)); this.getSpellAbility().addTarget(new TargetPlayer()); } diff --git a/Mage.Sets/src/mage/cards/a/AuraThief.java b/Mage.Sets/src/mage/cards/a/AuraThief.java index 67f91ef523..9e5bff2c14 100644 --- a/Mage.Sets/src/mage/cards/a/AuraThief.java +++ b/Mage.Sets/src/mage/cards/a/AuraThief.java @@ -5,7 +5,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; @@ -19,11 +18,13 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SubType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author nick.myers @@ -75,7 +76,7 @@ class AuraThiefDiesTriggeredEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { boolean ret = false; - for(Permanent enchantment : game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getControllerId(), game)) { + for(Permanent enchantment : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getControllerId(), game)) { ContinuousEffect gainControl = new GainControlTargetEffect(Duration.EndOfGame); gainControl.setTargetPointer(new FixedTarget(enchantment.getId())); game.addEffect(gainControl, source); diff --git a/Mage.Sets/src/mage/cards/b/BubblingBeebles.java b/Mage.Sets/src/mage/cards/b/BubblingBeebles.java index 3c46ee6bec..cd0c641e7b 100644 --- a/Mage.Sets/src/mage/cards/b/BubblingBeebles.java +++ b/Mage.Sets/src/mage/cards/b/BubblingBeebles.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.DefendingPlayerControlsCondition; @@ -39,7 +38,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -57,7 +58,7 @@ public class BubblingBeebles extends CardImpl { // Bubbling Beebles can't be blocked as long as defending player controls an enchantment. Effect effect = new ConditionalRestrictionEffect( new CantBeBlockedSourceEffect(), - new DefendingPlayerControlsCondition(new FilterEnchantmentPermanent())); + new DefendingPlayerControlsCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT)); effect.setText("{this} can't be blocked as long as defending player controls an enchantment"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/c/CleansingMeditation.java b/Mage.Sets/src/mage/cards/c/CleansingMeditation.java index caa725cdbb..8efd70c13d 100644 --- a/Mage.Sets/src/mage/cards/c/CleansingMeditation.java +++ b/Mage.Sets/src/mage/cards/c/CleansingMeditation.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; @@ -39,11 +38,13 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author spjspj @@ -97,7 +98,7 @@ class CleansingMeditationEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getSourceId(), game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) { if (permanent != null && permanent.destroy(source.getSourceId(), game, false)) { if (threshold && controller != null && permanent.getOwnerId().equals(controller.getId())) { cardsToBattlefield.add(permanent); diff --git a/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java b/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java index 91e28e4931..e59471db2f 100644 --- a/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java +++ b/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -39,19 +38,19 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +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 escplan9 (Derek Monturo - dmontur1 at gmail dot com) */ public class DrakeFamiliar extends CardImpl { - - private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent(); public DrakeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); @@ -78,7 +77,6 @@ public class DrakeFamiliar extends CardImpl { class DrakeFamiliarEffect extends OneShotEffect { - private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent(); private static final String effectText = "sacrifice it unless you return an enchantment to its owner's hand."; DrakeFamiliarEffect () { @@ -95,7 +93,7 @@ class DrakeFamiliarEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { boolean targetChosen = false; - TargetPermanent target = new TargetPermanent(1, 1, filter, true); + TargetPermanent target = new TargetPermanent(1, 1, StaticFilters.FILTER_ENCHANTMENT_PERMANENT, true); if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return an enchantment to its owner's hand?", source, game)) { controller.chooseTarget(Outcome.Sacrifice, target, source, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java b/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java index 8ce9e8ae83..7960891b5f 100644 --- a/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java +++ b/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.ZoneChangeAllTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,7 +34,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -53,7 +54,7 @@ public class FemerefEnchantress extends CardImpl { // Whenever an enchantment is put into a graveyard from the battlefield, draw a card. this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD, - new DrawCardSourceControllerEffect(1), new FilterEnchantmentPermanent(), + new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_ENCHANTMENT_PERMANENT, "Whenever an enchantment is put into a graveyard from the battlefield, ", false)); } diff --git a/Mage.Sets/src/mage/cards/h/HarmonicConvergence.java b/Mage.Sets/src/mage/cards/h/HarmonicConvergence.java index a9f25def98..d62687d836 100644 --- a/Mage.Sets/src/mage/cards/h/HarmonicConvergence.java +++ b/Mage.Sets/src/mage/cards/h/HarmonicConvergence.java @@ -27,10 +27,6 @@ */ package mage.cards.h; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -40,12 +36,17 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetCard; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; + /** * * @author North @@ -88,7 +89,7 @@ class HarmonicConvergenceEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - List enchantments = game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), + List enchantments = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game); diff --git a/Mage.Sets/src/mage/cards/h/HiddenAncients.java b/Mage.Sets/src/mage/cards/h/HiddenAncients.java index 3b5f26966c..c06782ef74 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenAncients.java +++ b/Mage.Sets/src/mage/cards/h/HiddenAncients.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.filter.FilterSpell; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -62,7 +63,7 @@ public class HiddenAncients extends CardImpl { // When an opponent casts an enchantment spell, if Hidden Ancients is an enchantment, Hidden Ancients becomes a 5/5 Treefolk creature. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolk(), "", Duration.WhileOnBattlefield, true, false), filter, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenGibbons.java b/Mage.Sets/src/mage/cards/h/HiddenGibbons.java index aebeda35af..3f22244325 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenGibbons.java +++ b/Mage.Sets/src/mage/cards/h/HiddenGibbons.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.filter.FilterSpell; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -62,7 +63,7 @@ public class HiddenGibbons extends CardImpl { // When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), "", Duration.WhileOnBattlefield, true, false), filter, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts an instant spell, if {this} is an enchantment, {this} becomes a 4/4 Ape creature.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java b/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java index 1a94b6a9e0..dcf74336f2 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java +++ b/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterArtifactSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -56,7 +57,7 @@ public class HiddenGuerrillas extends CardImpl { // When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), "", Duration.WhileOnBattlefield, true, false), new FilterArtifactSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenSpider.java b/Mage.Sets/src/mage/cards/h/HiddenSpider.java index e0145007c5..e63dce9233 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenSpider.java +++ b/Mage.Sets/src/mage/cards/h/HiddenSpider.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -40,11 +39,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -64,7 +65,7 @@ public class HiddenSpider extends CardImpl { // When an opponent casts a creature spell with flying, if Hidden Spider is an enchantment, Hidden Spider becomes a 3/5 Spider creature with reach. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), "", Duration.WhileOnBattlefield, true, false), filter, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell with flying, if {this} is an enchantment, {this} becomes a 3/5 Spider creature with reach.")); } diff --git a/Mage.Sets/src/mage/cards/k/KiorasDismissal.java b/Mage.Sets/src/mage/cards/k/KiorasDismissal.java index 1fb3a82a0d..1a6b0ee38d 100644 --- a/Mage.Sets/src/mage/cards/k/KiorasDismissal.java +++ b/Mage.Sets/src/mage/cards/k/KiorasDismissal.java @@ -27,16 +27,17 @@ */ package mage.cards.k; -import java.util.UUID; import mage.abilities.abilityword.StriveAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +51,7 @@ public class KiorasDismissal extends CardImpl { // Strive - Kiora's Dismissal costs U more to cast for each target beyond the first. this.addAbility(new StriveAbility("{U}")); // Return any number of target enchantments to their owners' hands. - this.getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, new FilterEnchantmentPermanent(), false)); + this.getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, StaticFilters.FILTER_ENCHANTMENT_PERMANENT, false)); Effect effect = new ReturnToHandTargetEffect(); effect.setText("Return any number of target enchantments to their owners' hands"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java index 62764079b8..38bda29155 100644 --- a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java +++ b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -38,7 +37,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @author LevelX2 @@ -56,7 +57,7 @@ public class LagonnaBandElder extends CardImpl { // When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life. Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), false), - new PermanentsOnTheBattlefieldCondition(new FilterEnchantmentPermanent(), ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, ComparisonType.MORE_THAN, 0), "When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life"); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MultanisDecree.java b/Mage.Sets/src/mage/cards/m/MultanisDecree.java index a9dcab5fb6..aee4e041e5 100644 --- a/Mage.Sets/src/mage/cards/m/MultanisDecree.java +++ b/Mage.Sets/src/mage/cards/m/MultanisDecree.java @@ -27,18 +27,19 @@ */ package mage.cards.m; -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.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author Backfir3 @@ -82,7 +83,7 @@ class MultanisDecreeDestroyEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); int enchantmentsDestoyed = 0; - for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getSourceId(), game)) { + for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) { if (permanent.destroy(source.getSourceId(), game, false)) { enchantmentsDestoyed++; } diff --git a/Mage.Sets/src/mage/cards/o/OpalArchangel.java b/Mage.Sets/src/mage/cards/o/OpalArchangel.java index b70c7d2b69..5502b6d3b0 100644 --- a/Mage.Sets/src/mage/cards/o/OpalArchangel.java +++ b/Mage.Sets/src/mage/cards/o/OpalArchangel.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -40,10 +39,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -57,7 +58,7 @@ public class OpalArchangel extends CardImpl { // When an opponent casts a creature spell, if Opal Archangel is an enchantment, Opal Archangel becomes a 5/5 Angel creature with flying and vigilance. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 5/5 Angel creature with flying and vigilance.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java index 05f5f9aae4..f8737bb273 100644 --- a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java +++ b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -38,10 +37,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -55,7 +56,7 @@ public class OpalCaryatid extends CardImpl { // When an opponent casts a creature spell, if Opal Caryatid is an enchantment, Opal Caryatid becomes a 2/2 Soldier creature. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldier(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalChampion.java b/Mage.Sets/src/mage/cards/o/OpalChampion.java index bb4cf98509..53b02a2212 100644 --- a/Mage.Sets/src/mage/cards/o/OpalChampion.java +++ b/Mage.Sets/src/mage/cards/o/OpalChampion.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -56,7 +57,7 @@ public class OpalChampion extends CardImpl { // When an opponent casts a creature spell, if Opal Champion is an enchantment, Opal Champion becomes a 3/3 Knight creature with first strike. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/3 Knight creature with first strike.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalGargoyle.java b/Mage.Sets/src/mage/cards/o/OpalGargoyle.java index 5f17535d90..fa0d7167f6 100644 --- a/Mage.Sets/src/mage/cards/o/OpalGargoyle.java +++ b/Mage.Sets/src/mage/cards/o/OpalGargoyle.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -56,7 +57,7 @@ public class OpalGargoyle extends CardImpl { // When an opponent casts a creature spell, if Opal Gargoyle is an enchantment, Opal Gargoyle becomes a 2/2 Gargoyle creature with flying. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Gargoyle creature with flying.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalGuardian.java b/Mage.Sets/src/mage/cards/o/OpalGuardian.java index c8da3a9283..7378045708 100644 --- a/Mage.Sets/src/mage/cards/o/OpalGuardian.java +++ b/Mage.Sets/src/mage/cards/o/OpalGuardian.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.TriggeredAbility; @@ -41,10 +40,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @author LoneFox @@ -58,7 +59,7 @@ public class OpalGuardian extends CardImpl { // When an opponent casts a creature spell, if Opal Guardian is an enchantment, Opal Guardian becomes a 3/4 Gargoyle creature with flying and protection from red. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), + this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/4 Gargoyle creature with flying and protection from red.")); } diff --git a/Mage.Sets/src/mage/cards/p/Paraselene.java b/Mage.Sets/src/mage/cards/p/Paraselene.java index d78a756c44..e06f47bc91 100644 --- a/Mage.Sets/src/mage/cards/p/Paraselene.java +++ b/Mage.Sets/src/mage/cards/p/Paraselene.java @@ -27,18 +27,19 @@ */ package mage.cards.p; -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.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * @author nantuko */ @@ -76,7 +77,7 @@ class ParaseleneEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int count = 0; - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getSourceId(), game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) { if (permanent.destroy(source.getSourceId(), game, false)) { count++; } diff --git a/Mage.Sets/src/mage/cards/p/PatriciansScorn.java b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java index f5220339ed..7cd76978f5 100644 --- a/Mage.Sets/src/mage/cards/p/PatriciansScorn.java +++ b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.condition.Condition; @@ -38,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.WatcherScope; import mage.filter.FilterSpell; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.Game; import mage.game.events.GameEvent; @@ -46,6 +45,8 @@ import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.watchers.Watcher; +import java.util.UUID; + /** * * @author LevelX2 @@ -59,7 +60,7 @@ public class PatriciansScorn extends CardImpl { // If you've cast another white spell this turn, you may cast Patrician's Scorn without paying its mana cost. this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()), new PatriciansScornWatcher()); // Destroy all enchantments. - this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent())); + this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT)); } public PatriciansScorn(final PatriciansScorn card) { diff --git a/Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java b/Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java index a5b1dc565d..36a1f25e24 100644 --- a/Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java +++ b/Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java @@ -27,14 +27,15 @@ */ package mage.cards.p; -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.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -47,7 +48,7 @@ public class PeaceAndQuiet extends CardImpl { // Destroy two target enchantments. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(2, new FilterEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(2, StaticFilters.FILTER_ENCHANTMENT_PERMANENT)); } public PeaceAndQuiet(final PeaceAndQuiet card) { diff --git a/Mage.Sets/src/mage/cards/s/SphereOfSafety.java b/Mage.Sets/src/mage/cards/s/SphereOfSafety.java index af2255a56f..c31778e3a1 100644 --- a/Mage.Sets/src/mage/cards/s/SphereOfSafety.java +++ b/Mage.Sets/src/mage/cards/s/SphereOfSafety.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCosts; @@ -37,10 +36,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; +import java.util.UUID; + /** * * @author LevelX2 @@ -79,7 +80,7 @@ class SphereOfSafetyPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaA @Override public ManaCosts getManaCostToPay(GameEvent event, Ability source, Game game) { - int enchantments = game.getBattlefield().countAll(new FilterEnchantmentPermanent(), source.getControllerId(), game); + int enchantments = game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), game); if (enchantments > 0) { return new ManaCostsImpl<>("{" + enchantments + '}'); } diff --git a/Mage.Sets/src/mage/cards/t/TetheredGriffin.java b/Mage.Sets/src/mage/cards/t/TetheredGriffin.java index 7d9f26c697..2c0fd8555e 100644 --- a/Mage.Sets/src/mage/cards/t/TetheredGriffin.java +++ b/Mage.Sets/src/mage/cards/t/TetheredGriffin.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -36,7 +35,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -55,7 +56,7 @@ public class TetheredGriffin extends CardImpl { // When you control no enchantments, sacrifice Tethered Griffin. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterEnchantmentPermanent(), ComparisonType.EQUAL_TO, 0, + StaticFilters.FILTER_ENCHANTMENT_PERMANENT, ComparisonType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/v/VigilantMartyr.java b/Mage.Sets/src/mage/cards/v/VigilantMartyr.java index edaab0462f..e6d6f3d5b0 100644 --- a/Mage.Sets/src/mage/cards/v/VigilantMartyr.java +++ b/Mage.Sets/src/mage/cards/v/VigilantMartyr.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; @@ -41,11 +40,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.FilterSpell; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.other.TargetsPermanentPredicate; import mage.target.TargetSpell; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -55,7 +56,7 @@ public class VigilantMartyr extends CardImpl { private final static FilterSpell filter = new FilterSpell("spell that targets an enchantment"); static { - filter.add(new TargetsPermanentPredicate(new FilterEnchantmentPermanent())); + filter.add(new TargetsPermanentPredicate(StaticFilters.FILTER_ENCHANTMENT_PERMANENT)); } public VigilantMartyr(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/w/WardOfBones.java b/Mage.Sets/src/mage/cards/w/WardOfBones.java index 9433547b08..85058af51f 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfBones.java +++ b/Mage.Sets/src/mage/cards/w/WardOfBones.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -41,12 +40,13 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterArtifactPermanent; -import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -127,8 +127,8 @@ class WardOfBonesEffect extends ContinuousRuleModifyingEffectImpl { return true; } if (card.isEnchantment() - && game.getBattlefield().countAll(new FilterEnchantmentPermanent(), opponent.getId(), game) - > game.getBattlefield().countAll(new FilterEnchantmentPermanent(), source.getControllerId(), game)) { + && game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, opponent.getId(), game) + > game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), game)) { return true; } final int yourLands = game.getBattlefield().countAll(new FilterLandPermanent(), source.getControllerId(), game); diff --git a/Mage.Sets/src/mage/cards/w/Wirecat.java b/Mage.Sets/src/mage/cards/w/Wirecat.java index 8aa5840315..04280c5c5d 100644 --- a/Mage.Sets/src/mage/cards/w/Wirecat.java +++ b/Mage.Sets/src/mage/cards/w/Wirecat.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -37,10 +36,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author Derpthemeus @@ -95,8 +96,7 @@ public class Wirecat extends CardImpl { @Override public boolean applies(Permanent permanent, Ability source, Game game) { if (permanent.getId().equals(source.getSourceId())) { - FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent(); - return game.getBattlefield().contains(filter, 1, game); + return game.getBattlefield().contains(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, 1, game); } return false; } diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 61d2143052..f74bb4f29b 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -23,6 +23,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 FilterEnchantmentPermanent FILTER_ENCHANTMENT_PERMANENT = new FilterEnchantmentPermanent(); public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard(); public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard(); From 83928463a465a43e25bc0e032dd705547b8afaea Mon Sep 17 00:00:00 2001 From: igoudt Date: Mon, 24 Jul 2017 14:41:51 +0200 Subject: [PATCH 3/3] remove default override parameters --- Mage.Sets/src/mage/cards/a/ApothecaryGeist.java | 6 +++--- Mage.Sets/src/mage/cards/a/AshenmoorCohort.java | 10 +++++++--- Mage.Sets/src/mage/cards/b/BallynockCohort.java | 10 +++++++--- Mage.Sets/src/mage/cards/b/BriarberryCohort.java | 10 +++++++--- Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java | 6 +++--- Mage.Sets/src/mage/cards/c/ClifftopRetreat.java | 6 +++--- Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java | 6 +++--- Mage.Sets/src/mage/cards/c/CrabappleCohort.java | 6 +++--- Mage.Sets/src/mage/cards/d/DesiccatedNaga.java | 6 +++--- Mage.Sets/src/mage/cards/d/DominatorDrone.java | 6 +++--- Mage.Sets/src/mage/cards/d/DragonskullSummit.java | 6 +++--- Mage.Sets/src/mage/cards/d/DrillSkimmer.java | 6 +++--- Mage.Sets/src/mage/cards/d/DrownedCatacomb.java | 6 +++--- Mage.Sets/src/mage/cards/d/DwynensElite.java | 6 +++--- Mage.Sets/src/mage/cards/e/EndangeredArmodon.java | 5 +++-- Mage.Sets/src/mage/cards/f/FaerieMiscreant.java | 6 +++--- Mage.Sets/src/mage/cards/g/GangrenousZombies.java | 10 +++++++--- Mage.Sets/src/mage/cards/g/GlacialFortress.java | 6 +++--- Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java | 6 +++--- Mage.Sets/src/mage/cards/h/HinterlandHarbor.java | 6 +++--- Mage.Sets/src/mage/cards/i/IsolatedChapel.java | 6 +++--- Mage.Sets/src/mage/cards/l/LagonnaBandElder.java | 3 +-- Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java | 6 +++--- Mage.Sets/src/mage/cards/m/MinotaurTactician.java | 8 ++++---- Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java | 6 +++--- Mage.Sets/src/mage/cards/p/Peppersmoke.java | 6 +++--- Mage.Sets/src/mage/cards/r/Ramroller.java | 6 +++--- Mage.Sets/src/mage/cards/r/ResourcefulReturn.java | 6 +++--- Mage.Sets/src/mage/cards/r/RoarOfJukai.java | 10 +++++++--- Mage.Sets/src/mage/cards/r/RootboundCrag.java | 6 +++--- Mage.Sets/src/mage/cards/r/Rootgrapple.java | 6 +++--- Mage.Sets/src/mage/cards/s/SnuffOut.java | 6 +++--- Mage.Sets/src/mage/cards/s/StrengthOfArms.java | 6 +++--- Mage.Sets/src/mage/cards/s/SulfurFalls.java | 6 +++--- Mage.Sets/src/mage/cards/s/SunpetalGrove.java | 6 +++--- Mage.Sets/src/mage/cards/s/SupplyCaravan.java | 6 +++--- Mage.Sets/src/mage/cards/t/TaintedField.java | 8 ++++---- Mage.Sets/src/mage/cards/t/TaintedIsle.java | 8 ++++---- Mage.Sets/src/mage/cards/t/TaintedPeak.java | 8 ++++---- Mage.Sets/src/mage/cards/t/TaintedWood.java | 8 ++++---- Mage.Sets/src/mage/cards/w/WoodlandCemetery.java | 6 +++--- .../ControlsPermanentsControllerTriggeredAbility.java | 4 ++++ 42 files changed, 150 insertions(+), 126 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java b/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java index e62862115a..9ae9220b36 100644 --- a/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java +++ b/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -38,12 +37,13 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) @@ -70,7 +70,7 @@ public class ApothecaryGeist extends CardImpl { TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)); this.addAbility(new ConditionalTriggeredAbility( triggeredAbility, - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another Spirit, you gain 3 life.")); } diff --git a/Mage.Sets/src/mage/cards/a/AshenmoorCohort.java b/Mage.Sets/src/mage/cards/a/AshenmoorCohort.java index 70eb1e8786..f6cdce1207 100644 --- a/Mage.Sets/src/mage/cards/a/AshenmoorCohort.java +++ b/Mage.Sets/src/mage/cards/a/AshenmoorCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -37,11 +36,16 @@ import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * @author jeffwadsworth */ @@ -65,7 +69,7 @@ public class AshenmoorCohort extends CardImpl { this.toughness = new MageInt(3); // Ashenmoor Cohort gets +1/+1 as long as you control another black creature. - Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); + Condition condition = new PermanentsOnTheBattlefieldCondition(filter); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/b/BallynockCohort.java b/Mage.Sets/src/mage/cards/b/BallynockCohort.java index 30fd5d75b5..f8472cd363 100644 --- a/Mage.Sets/src/mage/cards/b/BallynockCohort.java +++ b/Mage.Sets/src/mage/cards/b/BallynockCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -39,11 +38,16 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -71,7 +75,7 @@ public class BallynockCohort extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // Ballynock Cohort gets +1/+1 as long as you control another white creature. - Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); + Condition condition = new PermanentsOnTheBattlefieldCondition(filter); Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/b/BriarberryCohort.java b/Mage.Sets/src/mage/cards/b/BriarberryCohort.java index ee39f2e28a..f487fc4dff 100644 --- a/Mage.Sets/src/mage/cards/b/BriarberryCohort.java +++ b/Mage.Sets/src/mage/cards/b/BriarberryCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -39,11 +38,16 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -71,7 +75,7 @@ public class BriarberryCohort extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Briarberry Cohort gets +1/+1 as long as you control another blue creature. - Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); + Condition condition = new PermanentsOnTheBattlefieldCondition(filter); Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java b/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java index 92cffdbd09..96461cb0fb 100644 --- a/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java +++ b/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.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; @@ -36,7 +35,6 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; @@ -46,6 +44,8 @@ import mage.filter.predicate.permanent.CounterPredicate; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 @@ -100,7 +100,7 @@ class ChroniclerOfHeroesEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - if (new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0).apply(game, source)) { + if (new PermanentsOnTheBattlefieldCondition(filter).apply(game, source)) { controller.drawCards(1, game); } return true; diff --git a/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java b/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java index 25a90ff19d..40e3a4be5e 100644 --- a/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java +++ b/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java @@ -28,7 +28,6 @@ package mage.cards.c; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class ClifftopRetreat extends CardImpl { public ClifftopRetreat(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tap it unless you control a Mountain or a Plains"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java b/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java index d4f6b1c2e2..9c5060911a 100644 --- a/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java +++ b/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; @@ -38,13 +37,14 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterPlaneswalkerPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -71,7 +71,7 @@ public class CompanionOfTheTrials extends CardImpl { Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{1}{W}"), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + new PermanentsOnTheBattlefieldCondition(filter)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CrabappleCohort.java b/Mage.Sets/src/mage/cards/c/CrabappleCohort.java index 676d4d6f7a..80bbcbdd87 100644 --- a/Mage.Sets/src/mage/cards/c/CrabappleCohort.java +++ b/Mage.Sets/src/mage/cards/c/CrabappleCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -39,13 +38,14 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author North @@ -71,7 +71,7 @@ public class CrabappleCohort extends CardImpl { this.toughness = new MageInt(4); // Crabapple Cohort gets +1/+1 as long as you control another green creature. - Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); + Condition condition = new PermanentsOnTheBattlefieldCondition(filter); Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java b/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java index 34a5f5ec7d..6fa7b811da 100644 --- a/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java +++ b/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; @@ -39,13 +38,14 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterPlaneswalkerPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * * @author fireshoes @@ -70,7 +70,7 @@ public class DesiccatedNaga extends CardImpl { Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new ManaCostsImpl("{3}{B}"), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + new PermanentsOnTheBattlefieldCondition(filter)); ability.addTarget(new TargetOpponent()); Effect effect = new GainLifeEffect(2); effect.setText("and you gain 2 life"); diff --git a/Mage.Sets/src/mage/cards/d/DominatorDrone.java b/Mage.Sets/src/mage/cards/d/DominatorDrone.java index 3828c8adbd..732ca25bf7 100644 --- a/Mage.Sets/src/mage/cards/d/DominatorDrone.java +++ b/Mage.Sets/src/mage/cards/d/DominatorDrone.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -39,11 +38,12 @@ import mage.abilities.keyword.IngestAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -74,7 +74,7 @@ public class DominatorDrone extends CardImpl { TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new LoseLifeOpponentsEffect(2)); this.addAbility(new ConditionalTriggeredAbility( triggeredAbility, - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another colorless creature, each opponent loses 2 life.")); } diff --git a/Mage.Sets/src/mage/cards/d/DragonskullSummit.java b/Mage.Sets/src/mage/cards/d/DragonskullSummit.java index 64bbdae8ef..0f15208f99 100644 --- a/Mage.Sets/src/mage/cards/d/DragonskullSummit.java +++ b/Mage.Sets/src/mage/cards/d/DragonskullSummit.java @@ -28,7 +28,6 @@ package mage.cards.d; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class DragonskullSummit extends CardImpl { public DragonskullSummit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tapped unless you control a Swamp or a Mountain"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DrillSkimmer.java b/Mage.Sets/src/mage/cards/d/DrillSkimmer.java index d2506488f8..812130150f 100644 --- a/Mage.Sets/src/mage/cards/d/DrillSkimmer.java +++ b/Mage.Sets/src/mage/cards/d/DrillSkimmer.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; @@ -39,13 +38,14 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author wetterlicht @@ -68,7 +68,7 @@ public class DrillSkimmer extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // Drill-Skimmer has shroud as long as you control another artifact creature. - Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); + Condition condition = new PermanentsOnTheBattlefieldCondition(filter); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield), condition, "{this} has shroud as long as you control another artifact creature."))); diff --git a/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java b/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java index 5201dad779..353f91b5b3 100644 --- a/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java +++ b/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java @@ -28,7 +28,6 @@ package mage.cards.d; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class DrownedCatacomb extends CardImpl { public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tap it unless you control a Island or a Swamp"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DwynensElite.java b/Mage.Sets/src/mage/cards/d/DwynensElite.java index 859a62b07f..8af06b2a0c 100644 --- a/Mage.Sets/src/mage/cards/d/DwynensElite.java +++ b/Mage.Sets/src/mage/cards/d/DwynensElite.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -37,13 +36,14 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.permanent.token.ElfToken; +import java.util.UUID; + /** * * @author fireshoes @@ -68,7 +68,7 @@ public class DwynensElite extends CardImpl { TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfToken())); this.addAbility(new ConditionalTriggeredAbility( triggeredAbility, - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another Elf, create a 1/1 green Elf Warrior creature token.")); } diff --git a/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java b/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java index 3ce72616a6..0153f93578 100644 --- a/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java +++ b/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -38,6 +37,8 @@ import mage.constants.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; +import java.util.UUID; + /** * * @author emerald000 @@ -58,7 +59,7 @@ public class EndangeredArmodon extends CardImpl { // When you control a creature with toughness 2 or less, sacrifice Endangered Armodon. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - filter, ComparisonType.MORE_THAN, 0, + filter, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java index aa3afde27e..9a33c53459 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java +++ b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -38,13 +37,14 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.ControllerPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -72,7 +72,7 @@ public class FaerieMiscreant extends CardImpl { // When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card. Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card"); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GangrenousZombies.java b/Mage.Sets/src/mage/cards/g/GangrenousZombies.java index 603322b2cb..d6c3c6a9d2 100644 --- a/Mage.Sets/src/mage/cards/g/GangrenousZombies.java +++ b/Mage.Sets/src/mage/cards/g/GangrenousZombies.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,11 +37,16 @@ import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DamageEverythingEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -67,7 +71,7 @@ public class GangrenousZombies extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect( new DamageEverythingEffect(2), new DamageEverythingEffect(1), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "{this} deals 1 damage to each creature and each player. If you control a snow Swamp, {this} deals 2 damage to each creature and each player instead"), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/g/GlacialFortress.java b/Mage.Sets/src/mage/cards/g/GlacialFortress.java index 6e79a7e697..10cd5ec9de 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialFortress.java +++ b/Mage.Sets/src/mage/cards/g/GlacialFortress.java @@ -28,7 +28,6 @@ package mage.cards.g; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class GlacialFortress extends CardImpl { public GlacialFortress(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tap it unless you control a Plains or an Island"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java b/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java index afe5f0c883..38033ea0e9 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java +++ b/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -35,11 +34,12 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author fireshoes */ @@ -63,7 +63,7 @@ public class GoblinsOfTheFlarg extends CardImpl { // When you control a Dwarf, sacrifice Goblins of the Flarg. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - filter, ComparisonType.MORE_THAN, 0, + filter, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java b/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java index d91a653ea9..ab412ebbad 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class HinterlandHarbor extends CardImpl { public HinterlandHarbor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tapped unless you control a Forest or an Island"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/i/IsolatedChapel.java b/Mage.Sets/src/mage/cards/i/IsolatedChapel.java index 325ecb4c9e..761a102a52 100644 --- a/Mage.Sets/src/mage/cards/i/IsolatedChapel.java +++ b/Mage.Sets/src/mage/cards/i/IsolatedChapel.java @@ -28,7 +28,6 @@ package mage.cards.i; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class IsolatedChapel extends CardImpl { public IsolatedChapel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tap it unless you control a Plains or a Swamp"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java index 38bda29155..cdb9b425e3 100644 --- a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java +++ b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java @@ -36,7 +36,6 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.filter.StaticFilters; import java.util.UUID; @@ -57,7 +56,7 @@ public class LagonnaBandElder extends CardImpl { // When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life. Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), false), - new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life"); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java b/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java index 597cad942e..5a572855b2 100644 --- a/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java +++ b/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -37,12 +36,13 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -67,7 +67,7 @@ public class LamplighterOfSelhoff extends CardImpl { TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1,1,true)); this.addAbility(new ConditionalTriggeredAbility( triggeredAbility, - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another Zombie, you may a draw card. If you do, discard a card.")); } diff --git a/Mage.Sets/src/mage/cards/m/MinotaurTactician.java b/Mage.Sets/src/mage/cards/m/MinotaurTactician.java index 105b62761a..6be422b211 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurTactician.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurTactician.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -40,12 +39,13 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -74,12 +74,12 @@ public class MinotaurTactician extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Minotaur Tactician gets +1/+1 as long as you control a white creature. - Condition conditionWhite = new PermanentsOnTheBattlefieldCondition(filterWhite, ComparisonType.MORE_THAN, 0); + Condition conditionWhite = new PermanentsOnTheBattlefieldCondition(filterWhite); Effect effectWhite = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionWhite, ruleWhite); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectWhite)); // Minotaur Tactician gets +1/+1 as long as you control a blue creature. - Condition conditionBlue = new PermanentsOnTheBattlefieldCondition(filterBlue, ComparisonType.MORE_THAN, 0); + Condition conditionBlue = new PermanentsOnTheBattlefieldCondition(filterBlue); Effect effectBlue = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionBlue, ruleBlue); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectBlue)); } diff --git a/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java b/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java index 9f2f8c3153..c04d95d41f 100644 --- a/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java +++ b/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -40,13 +39,14 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author North @@ -74,7 +74,7 @@ public class MudbrawlerCohort extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // Mudbrawler Cohort gets +1/+1 as long as you control another red creature. - Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); + Condition condition = new PermanentsOnTheBattlefieldCondition(filter); Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/p/Peppersmoke.java b/Mage.Sets/src/mage/cards/p/Peppersmoke.java index 1069fd53d8..6af9510448 100644 --- a/Mage.Sets/src/mage/cards/p/Peppersmoke.java +++ b/Mage.Sets/src/mage/cards/p/Peppersmoke.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,13 +34,14 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -62,7 +62,7 @@ public class Peppersmoke extends CardImpl { this.getSpellAbility().addEffect(new BoostTargetEffect(-1,-1,Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "If you control a Faerie, draw a card")); } diff --git a/Mage.Sets/src/mage/cards/r/Ramroller.java b/Mage.Sets/src/mage/cards/r/Ramroller.java index b232d5445d..fbd556af00 100644 --- a/Mage.Sets/src/mage/cards/r/Ramroller.java +++ b/Mage.Sets/src/mage/cards/r/Ramroller.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksEachTurnStaticAbility; import mage.abilities.common.SimpleStaticAbility; @@ -38,12 +37,13 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * @author LoneFox */ @@ -64,7 +64,7 @@ public class Ramroller extends CardImpl { // Ramroller attacks each turn if able. this.addAbility(new AttacksEachTurnStaticAbility()); // Ramroller gets +2/+0 as long as you control another artifact. - Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); + Condition condition = new PermanentsOnTheBattlefieldCondition(filter); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield), condition, "{this} gets +2/+0 as long as you control another artifact."); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/r/ResourcefulReturn.java b/Mage.Sets/src/mage/cards/r/ResourcefulReturn.java index cb82a891c0..cc0434d1d9 100644 --- a/Mage.Sets/src/mage/cards/r/ResourcefulReturn.java +++ b/Mage.Sets/src/mage/cards/r/ResourcefulReturn.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,11 +34,12 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -53,7 +53,7 @@ public class ResourcefulReturn extends CardImpl { this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), - new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent(), ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()), "If you control an artifact, draw a card")); } diff --git a/Mage.Sets/src/mage/cards/r/RoarOfJukai.java b/Mage.Sets/src/mage/cards/r/RoarOfJukai.java index acf9b5a691..8777a018ce 100644 --- a/Mage.Sets/src/mage/cards/r/RoarOfJukai.java +++ b/Mage.Sets/src/mage/cards/r/RoarOfJukai.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.GainLifeOpponentCost; @@ -37,7 +36,10 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,6 +49,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * @author LevelX2 */ @@ -107,7 +111,7 @@ class RoarOfJukaiEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - if (new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0).apply(game, source)) { + if (new PermanentsOnTheBattlefieldCondition(filter).apply(game, source)) { for (Permanent permanent : game.getBattlefield().getActivePermanents(filterBlocked, source.getControllerId(), source.getSourceId(), game)) { ContinuousEffect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(permanent.getId())); diff --git a/Mage.Sets/src/mage/cards/r/RootboundCrag.java b/Mage.Sets/src/mage/cards/r/RootboundCrag.java index 8a913c5ca6..11ce87713e 100644 --- a/Mage.Sets/src/mage/cards/r/RootboundCrag.java +++ b/Mage.Sets/src/mage/cards/r/RootboundCrag.java @@ -28,7 +28,6 @@ package mage.cards.r; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class RootboundCrag extends CardImpl { public RootboundCrag(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tap it unless you control a Mountain or a Forest"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/r/Rootgrapple.java b/Mage.Sets/src/mage/cards/r/Rootgrapple.java index 079bba8379..74e058e74b 100644 --- a/Mage.Sets/src/mage/cards/r/Rootgrapple.java +++ b/Mage.Sets/src/mage/cards/r/Rootgrapple.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,7 +34,6 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -43,6 +41,8 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Wehk @@ -67,7 +67,7 @@ public class Rootgrapple extends CardImpl { // If you control a Treefolk, draw a card. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), - new PermanentsOnTheBattlefieldCondition(filterTreefolk, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filterTreefolk), "If you control a Treefolk, draw a card")); } diff --git a/Mage.Sets/src/mage/cards/s/SnuffOut.java b/Mage.Sets/src/mage/cards/s/SnuffOut.java index 1057d04f2d..59b494ee37 100644 --- a/Mage.Sets/src/mage/cards/s/SnuffOut.java +++ b/Mage.Sets/src/mage/cards/s/SnuffOut.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -36,7 +35,6 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterLandPermanent; @@ -45,6 +43,8 @@ import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -66,7 +66,7 @@ public class SnuffOut extends CardImpl { // If you control a Swamp, you may pay 4 life rather than pay Snuff Out's mana cost. this.addAbility(new AlternativeCostSourceAbility( new PayLifeCost(4), - new PermanentsOnTheBattlefieldCondition(filterSwamp, ComparisonType.MORE_THAN, 0), null)); + new PermanentsOnTheBattlefieldCondition(filterSwamp), null)); // // Destroy target nonblack creature. It can't be regenerated. this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); diff --git a/Mage.Sets/src/mage/cards/s/StrengthOfArms.java b/Mage.Sets/src/mage/cards/s/StrengthOfArms.java index 495c2c4465..e172780f6a 100644 --- a/Mage.Sets/src/mage/cards/s/StrengthOfArms.java +++ b/Mage.Sets/src/mage/cards/s/StrengthOfArms.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; @@ -35,7 +34,6 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; @@ -43,6 +41,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.HumanSoldierToken; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) @@ -62,7 +62,7 @@ public class StrengthOfArms extends CardImpl { this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateTokenEffect(new HumanSoldierToken()), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "If you control an Equipment, create a 1/1 white Human Soldier creature token.")); } diff --git a/Mage.Sets/src/mage/cards/s/SulfurFalls.java b/Mage.Sets/src/mage/cards/s/SulfurFalls.java index d718a7506d..fbe5ff94f7 100644 --- a/Mage.Sets/src/mage/cards/s/SulfurFalls.java +++ b/Mage.Sets/src/mage/cards/s/SulfurFalls.java @@ -28,7 +28,6 @@ package mage.cards.s; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class SulfurFalls extends CardImpl { public SulfurFalls(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tap it unless you control a Island or a Mountain"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SunpetalGrove.java b/Mage.Sets/src/mage/cards/s/SunpetalGrove.java index cb21f3137a..6a7e81aed7 100644 --- a/Mage.Sets/src/mage/cards/s/SunpetalGrove.java +++ b/Mage.Sets/src/mage/cards/s/SunpetalGrove.java @@ -28,7 +28,6 @@ package mage.cards.s; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class SunpetalGrove extends CardImpl { public SunpetalGrove(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tap it unless you control a Forest or a Plains"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SupplyCaravan.java b/Mage.Sets/src/mage/cards/s/SupplyCaravan.java index 3488161ced..878cd37383 100644 --- a/Mage.Sets/src/mage/cards/s/SupplyCaravan.java +++ b/Mage.Sets/src/mage/cards/s/SupplyCaravan.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; @@ -36,11 +35,12 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; import mage.game.permanent.token.WarriorVigilantToken; +import java.util.UUID; + /** * * @author fireshoes @@ -62,7 +62,7 @@ public class SupplyCaravan extends CardImpl { // When Supply Caravan enters the battlefield, if you control a tapped creature, create a 1/1 white Warrior creature token with vigilance. this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WarriorVigilantToken())), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control a tapped creature, create a 1/1 white Warrior creature token with vigilance.")); } diff --git a/Mage.Sets/src/mage/cards/t/TaintedField.java b/Mage.Sets/src/mage/cards/t/TaintedField.java index e0871830cf..59aa5012c8 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedField.java +++ b/Mage.Sets/src/mage/cards/t/TaintedField.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.Mana; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,12 +36,13 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,12 +65,12 @@ public class TaintedField extends CardImpl { Zone.BATTLEFIELD, new BasicManaEffect(Mana.WhiteMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); } public TaintedField(final TaintedField card) { diff --git a/Mage.Sets/src/mage/cards/t/TaintedIsle.java b/Mage.Sets/src/mage/cards/t/TaintedIsle.java index 528ec18402..cbbe003e2e 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedIsle.java +++ b/Mage.Sets/src/mage/cards/t/TaintedIsle.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.Mana; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,12 +36,13 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,12 +65,12 @@ public class TaintedIsle extends CardImpl { Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlueMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); } diff --git a/Mage.Sets/src/mage/cards/t/TaintedPeak.java b/Mage.Sets/src/mage/cards/t/TaintedPeak.java index 0f0e22dd2d..db791d29fc 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedPeak.java +++ b/Mage.Sets/src/mage/cards/t/TaintedPeak.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.Mana; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,12 +36,13 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,12 +65,12 @@ public class TaintedPeak extends CardImpl { Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); } diff --git a/Mage.Sets/src/mage/cards/t/TaintedWood.java b/Mage.Sets/src/mage/cards/t/TaintedWood.java index 6452063cfb..cc3aeb2568 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedWood.java +++ b/Mage.Sets/src/mage/cards/t/TaintedWood.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.Mana; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,12 +36,13 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,12 +65,12 @@ public class TaintedWood extends CardImpl { Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); } public TaintedWood(final TaintedWood card) { diff --git a/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java b/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java index d6d6a40b57..7df123b93b 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java @@ -28,7 +28,6 @@ package mage.cards.w; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class WoodlandCemetery extends CardImpl { public WoodlandCemetery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); String abilityText = "tap it unless you control a Swamp or a Forest"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java index 750f6a6a86..93e774aa74 100644 --- a/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java @@ -47,6 +47,10 @@ public class ControlsPermanentsControllerTriggeredAbility extends StateTriggered protected final ComparisonType type; protected final int value; + public ControlsPermanentsControllerTriggeredAbility(FilterPermanent filter, Effect effect){ + this(filter, ComparisonType.MORE_THAN, 0, effect); + } + public ControlsPermanentsControllerTriggeredAbility(FilterPermanent filter, ComparisonType type, int value, Effect effect) { super(Zone.BATTLEFIELD, effect); this.filter = filter;