diff --git a/Mage.Sets/src/mage/cards/a/AbruptDecay.java b/Mage.Sets/src/mage/cards/a/AbruptDecay.java index 91086b8de5..cd7739a7b6 100644 --- a/Mage.Sets/src/mage/cards/a/AbruptDecay.java +++ b/Mage.Sets/src/mage/cards/a/AbruptDecay.java @@ -28,6 +28,7 @@ package mage.cards.a; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CantBeCounteredSourceEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetNonlandPermanent; @@ -52,7 +52,7 @@ public class AbruptDecay extends CardImpl { private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public AbruptDecay(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/AbzanCharm.java b/Mage.Sets/src/mage/cards/a/AbzanCharm.java index 919a30730f..e7be1abc5e 100644 --- a/Mage.Sets/src/mage/cards/a/AbzanCharm.java +++ b/Mage.Sets/src/mage/cards/a/AbzanCharm.java @@ -27,6 +27,7 @@ */ package mage.cards.a; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.ExileTargetEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -53,7 +53,7 @@ public class AbzanCharm extends CardImpl { private static final FilterCreaturePermanent FILTER = new FilterCreaturePermanent("creature with power 3 or greater"); static { - FILTER.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + FILTER.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public AbzanCharm(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/AegisOfTheMeek.java b/Mage.Sets/src/mage/cards/a/AegisOfTheMeek.java index d3334f2b29..b04027d8bb 100644 --- a/Mage.Sets/src/mage/cards/a/AegisOfTheMeek.java +++ b/Mage.Sets/src/mage/cards/a/AegisOfTheMeek.java @@ -28,6 +28,7 @@ package mage.cards.a; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -37,7 +38,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate; @@ -54,8 +54,8 @@ public class AegisOfTheMeek extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("1/1 creature"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.Equal, 1)); - filter.add(new ToughnessPredicate(Filter.ComparisonType.Equal, 1)); + filter.add(new PowerPredicate(CountType.EQUAL_TO, 1)); + filter.add(new ToughnessPredicate(CountType.EQUAL_TO, 1)); } public AegisOfTheMeek(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/AetherVial.java b/Mage.Sets/src/mage/cards/a/AetherVial.java index b4541eac3c..7c49e5a1fb 100644 --- a/Mage.Sets/src/mage/cards/a/AetherVial.java +++ b/Mage.Sets/src/mage/cards/a/AetherVial.java @@ -28,6 +28,7 @@ package mage.cards.a; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -41,7 +42,6 @@ import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -104,7 +104,7 @@ class AetherVialEffect extends OneShotEffect { int count = permanent.getCounters(game).getCount(CounterType.CHARGE); FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost equal to " + count); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, count)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, count)); String choiceText = "Put a " + filter.getMessage() + " from your hand onto the battlefield?"; Player controller = game.getPlayer(source.getControllerId()); diff --git a/Mage.Sets/src/mage/cards/a/AleshaWhoSmilesAtDeath.java b/Mage.Sets/src/mage/cards/a/AleshaWhoSmilesAtDeath.java index ddf512b2e4..e4a0ad3126 100644 --- a/Mage.Sets/src/mage/cards/a/AleshaWhoSmilesAtDeath.java +++ b/Mage.Sets/src/mage/cards/a/AleshaWhoSmilesAtDeath.java @@ -29,6 +29,7 @@ package mage.cards.a; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; @@ -41,7 +42,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -59,7 +59,7 @@ public class AleshaWhoSmilesAtDeath extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public AleshaWhoSmilesAtDeath(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/AlignedHedronNetwork.java b/Mage.Sets/src/mage/cards/a/AlignedHedronNetwork.java index 8a577a568e..22747da112 100644 --- a/Mage.Sets/src/mage/cards/a/AlignedHedronNetwork.java +++ b/Mage.Sets/src/mage/cards/a/AlignedHedronNetwork.java @@ -28,6 +28,7 @@ package mage.cards.a; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; import mage.abilities.effects.OneShotEffect; @@ -37,7 +38,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -77,7 +77,7 @@ class AlignedHedronNetworkExileEffect extends OneShotEffect { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 5 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public AlignedHedronNetworkExileEffect() { diff --git a/Mage.Sets/src/mage/cards/a/Aluren.java b/Mage.Sets/src/mage/cards/a/Aluren.java index ac887d25e1..cfd6dce66f 100644 --- a/Mage.Sets/src/mage/cards/a/Aluren.java +++ b/Mage.Sets/src/mage/cards/a/Aluren.java @@ -28,6 +28,7 @@ package mage.cards.a; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceIsSpellCondition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,7 +38,6 @@ import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -63,7 +63,7 @@ public class Aluren extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public Aluren(UUID ownerId, CardSetInfo setInfo) { @@ -95,10 +95,10 @@ class AlurenRuleEffect extends ContinuousEffectImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } - static AlternativeCostSourceAbility alternativeCastingCostAbility = new AlternativeCostSourceAbility(null, SourceIsSpellCondition.instance, null, filter, true); + private static AlternativeCostSourceAbility alternativeCastingCostAbility = new AlternativeCostSourceAbility(null, SourceIsSpellCondition.instance, null, filter, true); public AlurenRuleEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); diff --git a/Mage.Sets/src/mage/cards/a/AmrouKithkin.java b/Mage.Sets/src/mage/cards/a/AmrouKithkin.java index 809c7fa63b..2bc4d079b3 100644 --- a/Mage.Sets/src/mage/cards/a/AmrouKithkin.java +++ b/Mage.Sets/src/mage/cards/a/AmrouKithkin.java @@ -28,13 +28,13 @@ package mage.cards.a; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -49,7 +49,7 @@ public class AmrouKithkin extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 3 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public AmrouKithkin(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/AmrouScout.java b/Mage.Sets/src/mage/cards/a/AmrouScout.java index 91721f0117..171c0ce1d5 100644 --- a/Mage.Sets/src/mage/cards/a/AmrouScout.java +++ b/Mage.Sets/src/mage/cards/a/AmrouScout.java @@ -28,6 +28,7 @@ package mage.cards.a; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -53,7 +53,7 @@ public class AmrouScout extends CardImpl { private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with converted mana cost 3 or less"); static { filter.add(new SubtypePredicate("Rebel")); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public AmrouScout(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/AppetiteForBrains.java b/Mage.Sets/src/mage/cards/a/AppetiteForBrains.java index 4b152fd09d..439e9a9b67 100644 --- a/Mage.Sets/src/mage/cards/a/AppetiteForBrains.java +++ b/Mage.Sets/src/mage/cards/a/AppetiteForBrains.java @@ -27,11 +27,11 @@ */ package mage.cards.a; +import mage.abilities.CountType; import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetOpponent; @@ -47,7 +47,7 @@ public class AppetiteForBrains extends CardImpl { private static final FilterCard filter = new FilterCard("a card from it with converted mana cost 4 or greater"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 3)); } public AppetiteForBrains(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/ArachnusWeb.java b/Mage.Sets/src/mage/cards/a/ArachnusWeb.java index ef60ba9e6a..e0c88f8fba 100644 --- a/Mage.Sets/src/mage/cards/a/ArachnusWeb.java +++ b/Mage.Sets/src/mage/cards/a/ArachnusWeb.java @@ -28,6 +28,7 @@ package mage.cards.a; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.AttachedToMatchesFilterCondition; @@ -41,7 +42,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.TargetPermanent; @@ -70,7 +70,7 @@ public class ArachnusWeb extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect())); // At the beginning of the end step, if enchanted creature's power is 4 or greater, destroy Arachnus Web. FilterPermanent filter = new FilterPermanent("if enchanted creature's power is 4 or greater"); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new DestroySourceEffect(), TargetController.ANY, new AttachedToMatchesFilterCondition(filter), false)); diff --git a/Mage.Sets/src/mage/cards/a/ArtificersIntuition.java b/Mage.Sets/src/mage/cards/a/ArtificersIntuition.java index 0aeb30087d..51d16f01cb 100644 --- a/Mage.Sets/src/mage/cards/a/ArtificersIntuition.java +++ b/Mage.Sets/src/mage/cards/a/ArtificersIntuition.java @@ -28,6 +28,7 @@ package mage.cards.a; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; @@ -51,7 +51,7 @@ public class ArtificersIntuition extends CardImpl { private static final FilterArtifactCard filter = new FilterArtifactCard("artifact card with converted mana cost 1 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public ArtificersIntuition(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); diff --git a/Mage.Sets/src/mage/cards/a/AshiokNightmareWeaver.java b/Mage.Sets/src/mage/cards/a/AshiokNightmareWeaver.java index 5a893b3de2..dec05e4939 100644 --- a/Mage.Sets/src/mage/cards/a/AshiokNightmareWeaver.java +++ b/Mage.Sets/src/mage/cards/a/AshiokNightmareWeaver.java @@ -29,6 +29,7 @@ package mage.cards.a; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.LoyaltyAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; import mage.abilities.costs.Cost; @@ -37,7 +38,6 @@ import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.*; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -151,7 +151,7 @@ class AshiokNightmareWeaverPutIntoPlayEffect extends OneShotEffect { } FilterCard filter = new FilterCreatureCard("creature card with converted mana cost {" + cmc + "} exiled with " + sourceObject.getIdName()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, cmc)); Target target = new TargetCardInExile(filter, CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter())); diff --git a/Mage.Sets/src/mage/cards/a/AuriokSalvagers.java b/Mage.Sets/src/mage/cards/a/AuriokSalvagers.java index e80bf7bfba..f387aad4e5 100644 --- a/Mage.Sets/src/mage/cards/a/AuriokSalvagers.java +++ b/Mage.Sets/src/mage/cards/a/AuriokSalvagers.java @@ -29,6 +29,7 @@ package mage.cards.a; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.ReturnToHandTargetEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInYourGraveyard; @@ -51,7 +51,7 @@ public class AuriokSalvagers extends CardImpl { private static final FilterArtifactCard filter = new FilterArtifactCard("artifact card with converted mana cost 1 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public AuriokSalvagers(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/AustereCommand.java b/Mage.Sets/src/mage/cards/a/AustereCommand.java index e904ce3c03..2c19890449 100644 --- a/Mage.Sets/src/mage/cards/a/AustereCommand.java +++ b/Mage.Sets/src/mage/cards/a/AustereCommand.java @@ -27,12 +27,12 @@ */ package mage.cards.a; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterArtifactPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterEnchantmentPermanent; @@ -49,8 +49,8 @@ public class AustereCommand extends CardImpl { private static final FilterCreaturePermanent filter3orLess = new FilterCreaturePermanent("creatures with converted mana cost 3 or less"); private static final FilterCreaturePermanent filter4orMore = new FilterCreaturePermanent("creatures with converted mana cost 4 or greater"); static { - filter3orLess.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); - filter4orMore.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter3orLess.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); + filter4orMore.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 3)); } public AustereCommand(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/a/AysenBureaucrats.java b/Mage.Sets/src/mage/cards/a/AysenBureaucrats.java index 6bf5bc939a..0b2c926010 100644 --- a/Mage.Sets/src/mage/cards/a/AysenBureaucrats.java +++ b/Mage.Sets/src/mage/cards/a/AysenBureaucrats.java @@ -29,6 +29,7 @@ package mage.cards.a; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.TapTargetEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.Target; @@ -52,7 +52,7 @@ public class AysenBureaucrats extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public AysenBureaucrats(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BalaGedScorpion.java b/Mage.Sets/src/mage/cards/b/BalaGedScorpion.java index 23db3304a9..ef6d2b0987 100644 --- a/Mage.Sets/src/mage/cards/b/BalaGedScorpion.java +++ b/Mage.Sets/src/mage/cards/b/BalaGedScorpion.java @@ -28,12 +28,12 @@ package mage.cards.b; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +49,7 @@ public class BalaGedScorpion extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 1 or less"); static { - filter.add(new PowerPredicate(ComparisonType.LessThan, 2)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 2)); } public BalaGedScorpion(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BarbarianOutcast.java b/Mage.Sets/src/mage/cards/b/BarbarianOutcast.java index e377496dbb..90363e3a51 100644 --- a/Mage.Sets/src/mage/cards/b/BarbarianOutcast.java +++ b/Mage.Sets/src/mage/cards/b/BarbarianOutcast.java @@ -28,12 +28,12 @@ package mage.cards.b; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -62,7 +62,7 @@ public class BarbarianOutcast extends CardImpl { // When you control no Swamps, sacrifice Barbarian Outcast. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Swamp", "no Swamps"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Swamp", "no Swamps"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/b/BeaconBehemoth.java b/Mage.Sets/src/mage/cards/b/BeaconBehemoth.java index 450f417ba1..ad15a03218 100644 --- a/Mage.Sets/src/mage/cards/b/BeaconBehemoth.java +++ b/Mage.Sets/src/mage/cards/b/BeaconBehemoth.java @@ -30,6 +30,7 @@ package mage.cards.b; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -39,7 +40,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -55,7 +55,7 @@ public class BeaconBehemoth extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public BeaconBehemoth (UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BigGameHunter.java b/Mage.Sets/src/mage/cards/b/BigGameHunter.java index 0cdbece3c9..1c11258b23 100644 --- a/Mage.Sets/src/mage/cards/b/BigGameHunter.java +++ b/Mage.Sets/src/mage/cards/b/BigGameHunter.java @@ -29,6 +29,7 @@ package mage.cards.b; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,7 +37,6 @@ import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +52,7 @@ public class BigGameHunter extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public BigGameHunter(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BirthingPod.java b/Mage.Sets/src/mage/cards/b/BirthingPod.java index 40cfc3b1d3..91965ca051 100644 --- a/Mage.Sets/src/mage/cards/b/BirthingPod.java +++ b/Mage.Sets/src/mage/cards/b/BirthingPod.java @@ -28,6 +28,7 @@ package mage.cards.b; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.common.SacrificeTargetCost; @@ -40,7 +41,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -106,7 +106,7 @@ class BirthingPodEffect extends OneShotEffect { if (sacrificedPermanent != null && controller != null) { int newConvertedCost = sacrificedPermanent.getConvertedManaCost() + 1; FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, newConvertedCost)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, newConvertedCost)); filter.add(new CardTypePredicate(CardType.CREATURE)); TargetCardInLibrary target = new TargetCardInLibrary(filter); if (controller.searchLibrary(target, game)) { diff --git a/Mage.Sets/src/mage/cards/b/Blightspeaker.java b/Mage.Sets/src/mage/cards/b/Blightspeaker.java index 125d593437..07b66ab56c 100644 --- a/Mage.Sets/src/mage/cards/b/Blightspeaker.java +++ b/Mage.Sets/src/mage/cards/b/Blightspeaker.java @@ -29,6 +29,7 @@ package mage.cards.b; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -38,7 +39,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -57,7 +57,7 @@ public class Blightspeaker extends CardImpl { static { filter.add(new SubtypePredicate("Rebel")); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public Blightspeaker(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BloodLust.java b/Mage.Sets/src/mage/cards/b/BloodLust.java index 9bc2dc0ac9..1003021ce2 100644 --- a/Mage.Sets/src/mage/cards/b/BloodLust.java +++ b/Mage.Sets/src/mage/cards/b/BloodLust.java @@ -28,6 +28,7 @@ package mage.cards.b; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.condition.Condition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.dynamicvalue.DynamicValue; @@ -39,7 +40,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; @@ -58,7 +58,7 @@ public class BloodLust extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 4)); } public BloodLust(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BloodthornTaunter.java b/Mage.Sets/src/mage/cards/b/BloodthornTaunter.java index 7ee15786ae..92ea0de659 100644 --- a/Mage.Sets/src/mage/cards/b/BloodthornTaunter.java +++ b/Mage.Sets/src/mage/cards/b/BloodthornTaunter.java @@ -28,6 +28,7 @@ package mage.cards.b; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -37,7 +38,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -53,7 +53,7 @@ public class BloodthornTaunter extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public BloodthornTaunter(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BogGlider.java b/Mage.Sets/src/mage/cards/b/BogGlider.java index 676edde422..6e7d080fa8 100644 --- a/Mage.Sets/src/mage/cards/b/BogGlider.java +++ b/Mage.Sets/src/mage/cards/b/BogGlider.java @@ -29,6 +29,7 @@ package mage.cards.b; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.TapSourceCost; @@ -38,7 +39,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterPermanentCard; @@ -60,7 +60,7 @@ public class BogGlider extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public BogGlider(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BogSerpent.java b/Mage.Sets/src/mage/cards/b/BogSerpent.java index 70bc72274b..9dbf2f808a 100644 --- a/Mage.Sets/src/mage/cards/b/BogSerpent.java +++ b/Mage.Sets/src/mage/cards/b/BogSerpent.java @@ -28,6 +28,7 @@ package mage.cards.b; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; import java.util.UUID; @@ -58,7 +58,7 @@ public class BogSerpent extends CardImpl { // When you control no Swamps, sacrifice Bog Serpent. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Swamp", "no Swamps"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Swamp", "no Swamps"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/b/BrainInAJar.java b/Mage.Sets/src/mage/cards/b/BrainInAJar.java index 1f5ea7af5e..edef408424 100644 --- a/Mage.Sets/src/mage/cards/b/BrainInAJar.java +++ b/Mage.Sets/src/mage/cards/b/BrainInAJar.java @@ -28,6 +28,7 @@ package mage.cards.b; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveVariableCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; @@ -42,7 +43,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -108,7 +108,7 @@ class BrainInAJarCastEffect extends OneShotEffect { if (controller != null && sourceObject != null) { int counters = sourceObject.getCounters(game).getCount(CounterType.CHARGE); FilterCard filter = new FilterInstantOrSorceryCard(); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, counters)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, counters)); int cardsToCast = controller.getHand().count(filter, source.getControllerId(), source.getSourceId(), game); if (cardsToCast > 0 && controller.chooseUse(outcome, "Cast an instant or sorcery card with converted mana costs of " + counters + " from your hand without paying its mana cost?", source, game)) { TargetCardInHand target = new TargetCardInHand(filter); diff --git a/Mage.Sets/src/mage/cards/b/BrassclawOrcs.java b/Mage.Sets/src/mage/cards/b/BrassclawOrcs.java index 3be73debe8..82d6300980 100644 --- a/Mage.Sets/src/mage/cards/b/BrassclawOrcs.java +++ b/Mage.Sets/src/mage/cards/b/BrassclawOrcs.java @@ -28,13 +28,13 @@ package mage.cards.b; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -48,7 +48,7 @@ public class BrassclawOrcs extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 1)); } public BrassclawOrcs(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BreakThroughTheLine.java b/Mage.Sets/src/mage/cards/b/BreakThroughTheLine.java index 91bcb4cca4..8489e523e3 100644 --- a/Mage.Sets/src/mage/cards/b/BreakThroughTheLine.java +++ b/Mage.Sets/src/mage/cards/b/BreakThroughTheLine.java @@ -28,6 +28,7 @@ package mage.cards.b; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; @@ -39,7 +40,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -55,7 +55,7 @@ public class BreakThroughTheLine extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public BreakThroughTheLine(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BringToLight.java b/Mage.Sets/src/mage/cards/b/BringToLight.java index f5b981b4f2..2385da95b4 100644 --- a/Mage.Sets/src/mage/cards/b/BringToLight.java +++ b/Mage.Sets/src/mage/cards/b/BringToLight.java @@ -28,6 +28,7 @@ package mage.cards.b; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -36,7 +37,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -98,7 +98,7 @@ class BringToLightEffect extends OneShotEffect { int numberColors = ColorsOfManaSpentToCastCount.getInstance().calculate(game, source, this); FilterCard filter = new FilterCard(); filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY))); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, numberColors + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, numberColors + 1)); TargetCardInLibrary target = new TargetCardInLibrary(filter); controller.searchLibrary(target, game); Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); diff --git a/Mage.Sets/src/mage/cards/b/BygoneBishop.java b/Mage.Sets/src/mage/cards/b/BygoneBishop.java index 7c3490b6c5..9ed5d5b822 100644 --- a/Mage.Sets/src/mage/cards/b/BygoneBishop.java +++ b/Mage.Sets/src/mage/cards/b/BygoneBishop.java @@ -28,13 +28,13 @@ package mage.cards.b; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.keyword.InvestigateEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -51,7 +51,7 @@ public class BygoneBishop extends CardImpl { static { filterSpell.add(new CardTypePredicate(CardType.CREATURE)); - filterSpell.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filterSpell.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public BygoneBishop(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CateranBrute.java b/Mage.Sets/src/mage/cards/c/CateranBrute.java index 020031ebda..5fdb062f6f 100644 --- a/Mage.Sets/src/mage/cards/c/CateranBrute.java +++ b/Mage.Sets/src/mage/cards/c/CateranBrute.java @@ -30,6 +30,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -38,7 +39,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -56,7 +56,7 @@ public class CateranBrute extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public CateranBrute(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CateranEnforcer.java b/Mage.Sets/src/mage/cards/c/CateranEnforcer.java index 0b0976da99..e2ad4bc24c 100644 --- a/Mage.Sets/src/mage/cards/c/CateranEnforcer.java +++ b/Mage.Sets/src/mage/cards/c/CateranEnforcer.java @@ -30,6 +30,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -39,7 +40,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -57,7 +57,7 @@ public class CateranEnforcer extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public CateranEnforcer(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CateranKidnappers.java b/Mage.Sets/src/mage/cards/c/CateranKidnappers.java index 3b3ee88713..10179cfc58 100644 --- a/Mage.Sets/src/mage/cards/c/CateranKidnappers.java +++ b/Mage.Sets/src/mage/cards/c/CateranKidnappers.java @@ -30,6 +30,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -38,7 +39,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,7 +47,6 @@ import mage.target.common.TargetCardInLibrary; import java.util.UUID; /** - * * @author Backfir3 */ public class CateranKidnappers extends CardImpl { @@ -56,11 +55,11 @@ public class CateranKidnappers extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public CateranKidnappers(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.subtype.add("Human"); this.subtype.add("Mercenary"); diff --git a/Mage.Sets/src/mage/cards/c/CateranOverlord.java b/Mage.Sets/src/mage/cards/c/CateranOverlord.java index fb460a01be..c3a382e629 100644 --- a/Mage.Sets/src/mage/cards/c/CateranOverlord.java +++ b/Mage.Sets/src/mage/cards/c/CateranOverlord.java @@ -30,6 +30,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.TapSourceCost; @@ -40,7 +41,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -59,7 +59,7 @@ public class CateranOverlord extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 7)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 7)); } public CateranOverlord(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CateranPersuader.java b/Mage.Sets/src/mage/cards/c/CateranPersuader.java index 0203e10f8b..5ea39c484c 100644 --- a/Mage.Sets/src/mage/cards/c/CateranPersuader.java +++ b/Mage.Sets/src/mage/cards/c/CateranPersuader.java @@ -30,6 +30,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -38,7 +39,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -56,7 +56,7 @@ public class CateranPersuader extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public CateranPersuader(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CateranSlaver.java b/Mage.Sets/src/mage/cards/c/CateranSlaver.java index bd8e41ace3..e66a95194f 100644 --- a/Mage.Sets/src/mage/cards/c/CateranSlaver.java +++ b/Mage.Sets/src/mage/cards/c/CateranSlaver.java @@ -30,6 +30,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -39,7 +40,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -57,7 +57,7 @@ public class CateranSlaver extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 6)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 6)); } public CateranSlaver(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CelestialKirin.java b/Mage.Sets/src/mage/cards/c/CelestialKirin.java index fcbf638cce..6da8b2446e 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialKirin.java +++ b/Mage.Sets/src/mage/cards/c/CelestialKirin.java @@ -29,6 +29,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyAllEffect; @@ -39,7 +40,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterSpiritOrArcaneCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -101,7 +101,7 @@ class CelestialKirinEffect extends OneShotEffect { if (spell != null) { int cmc = spell.getConvertedManaCost(); FilterPermanent filter = new FilterPermanent(); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, cmc)); return new DestroyAllEffect(filter).apply(game, source); } return false; diff --git a/Mage.Sets/src/mage/cards/c/CitanulFlute.java b/Mage.Sets/src/mage/cards/c/CitanulFlute.java index 13a97caa9f..9a59b7e2c4 100644 --- a/Mage.Sets/src/mage/cards/c/CitanulFlute.java +++ b/Mage.Sets/src/mage/cards/c/CitanulFlute.java @@ -28,6 +28,7 @@ package mage.cards.c; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -36,7 +37,6 @@ import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -98,7 +98,7 @@ class CitanulFluteSearchEffect extends OneShotEffect { FilterCard filter = new FilterCard("creature card with converted mana cost X or less"); filter.add(new CardTypePredicate(CardType.CREATURE)); //Set the mana cost one higher to 'emulate' a less than or equal to comparison. - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, source.getManaCostsToPay().getX() + 1)); TargetCardInLibrary target = new TargetCardInLibrary(filter); if (player.searchLibrary(target, game)) { diff --git a/Mage.Sets/src/mage/cards/c/ColfenorsUrn.java b/Mage.Sets/src/mage/cards/c/ColfenorsUrn.java index fe024db100..be227c5269 100644 --- a/Mage.Sets/src/mage/cards/c/ColfenorsUrn.java +++ b/Mage.Sets/src/mage/cards/c/ColfenorsUrn.java @@ -29,6 +29,7 @@ package mage.cards.c; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.condition.Condition; @@ -40,7 +41,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.game.ExileZone; @@ -60,7 +60,7 @@ public class ColfenorsUrn extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with toughness 4 or greater"); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 3)); } public ColfenorsUrn(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CollectedCompany.java b/Mage.Sets/src/mage/cards/c/CollectedCompany.java index ef2b4f9e73..a57e526fa6 100644 --- a/Mage.Sets/src/mage/cards/c/CollectedCompany.java +++ b/Mage.Sets/src/mage/cards/c/CollectedCompany.java @@ -27,12 +27,12 @@ */ package mage.cards.c; +import mage.abilities.CountType; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -49,7 +49,7 @@ public class CollectedCompany extends CardImpl { static { filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public CollectedCompany(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CollectiveEffort.java b/Mage.Sets/src/mage/cards/c/CollectiveEffort.java index 45acdd4abb..b096ebb38f 100644 --- a/Mage.Sets/src/mage/cards/c/CollectiveEffort.java +++ b/Mage.Sets/src/mage/cards/c/CollectiveEffort.java @@ -28,6 +28,7 @@ package mage.cards.c; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.costs.Cost; import mage.abilities.costs.common.TapTargetCost; @@ -40,7 +41,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.FilterPlayer; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; @@ -71,7 +71,7 @@ public class CollectiveEffort extends CardImpl { static { filterUntapped.add(Predicates.not(new TappedPredicate())); - filterDestroyCreature.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filterDestroyCreature.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public CollectiveEffort(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CompleteDisregard.java b/Mage.Sets/src/mage/cards/c/CompleteDisregard.java index 83b5a62f86..ed90b7f7bd 100644 --- a/Mage.Sets/src/mage/cards/c/CompleteDisregard.java +++ b/Mage.Sets/src/mage/cards/c/CompleteDisregard.java @@ -28,12 +28,12 @@ package mage.cards.c; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -49,7 +49,7 @@ public class CompleteDisregard extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 4)); } public CompleteDisregard(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java index a485dfe2eb..a7f375cd50 100644 --- a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java +++ b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java @@ -28,6 +28,7 @@ package mage.cards.c; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CastSourceTriggeredAbility; @@ -38,7 +39,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.WatcherScope; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.ObjectPlayer; import mage.filter.predicate.ObjectPlayerPredicate; @@ -66,7 +66,7 @@ public class ConduitOfRuin extends CardImpl { static { filter.add(new ColorlessPredicate()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 6)); + filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 6)); filterCost.add(new FirstCastCreatureSpellPredicate()); } diff --git a/Mage.Sets/src/mage/cards/c/ConsumeTheMeek.java b/Mage.Sets/src/mage/cards/c/ConsumeTheMeek.java index bde7cb602f..b852ff26fb 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumeTheMeek.java +++ b/Mage.Sets/src/mage/cards/c/ConsumeTheMeek.java @@ -27,11 +27,11 @@ */ package mage.cards.c; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -46,7 +46,7 @@ public class ConsumeTheMeek extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public ConsumeTheMeek(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CovetousDragon.java b/Mage.Sets/src/mage/cards/c/CovetousDragon.java index 13a040ef18..e6bbd14415 100644 --- a/Mage.Sets/src/mage/cards/c/CovetousDragon.java +++ b/Mage.Sets/src/mage/cards/c/CovetousDragon.java @@ -28,13 +28,13 @@ package mage.cards.c; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterArtifactPermanent; import java.util.UUID; @@ -56,7 +56,7 @@ public class CovetousDragon extends CardImpl { // When you control no artifacts, sacrifice Covetous Dragon. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterArtifactPermanent("no artifacts"), Filter.ComparisonType.Equal, 0, + new FilterArtifactPermanent("no artifacts"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/c/Crackdown.java b/Mage.Sets/src/mage/cards/c/Crackdown.java index e88287d503..eda4fd77f7 100644 --- a/Mage.Sets/src/mage/cards/c/Crackdown.java +++ b/Mage.Sets/src/mage/cards/c/Crackdown.java @@ -28,6 +28,7 @@ package mage.cards.c; import mage.ObjectColor; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; import mage.cards.CardImpl; @@ -36,7 +37,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -54,7 +54,7 @@ public class Crackdown extends CardImpl { static { filter.add(Predicates.not(new ColorPredicate(ObjectColor.WHITE))); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public Crackdown(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CracklingDoom.java b/Mage.Sets/src/mage/cards/c/CracklingDoom.java index c84c29edca..2866842064 100644 --- a/Mage.Sets/src/mage/cards/c/CracklingDoom.java +++ b/Mage.Sets/src/mage/cards/c/CracklingDoom.java @@ -28,6 +28,7 @@ package mage.cards.c; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamagePlayersEffect; import mage.cards.CardImpl; @@ -35,7 +36,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -117,7 +117,7 @@ class CracklingDoomEffect extends OneShotEffect { } } else if (greatestPower != Integer.MIN_VALUE) { FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature to sacrifice with power equal to " + greatestPower); - filter.add(new PowerPredicate(Filter.ComparisonType.Equal, greatestPower)); + filter.add(new PowerPredicate(CountType.EQUAL_TO, greatestPower)); Target target = new TargetControlledCreaturePermanent(filter); if (opponent.choose(outcome, target, playerId, game)) { Permanent permanent = game.getPermanent(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/cards/c/CraftyPathmage.java b/Mage.Sets/src/mage/cards/c/CraftyPathmage.java index a0ba0229c7..9c1019b177 100644 --- a/Mage.Sets/src/mage/cards/c/CraftyPathmage.java +++ b/Mage.Sets/src/mage/cards/c/CraftyPathmage.java @@ -29,6 +29,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -52,7 +52,7 @@ public class CraftyPathmage extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public CraftyPathmage(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CryptChampion.java b/Mage.Sets/src/mage/cards/c/CryptChampion.java index 884756836a..19520144c4 100644 --- a/Mage.Sets/src/mage/cards/c/CryptChampion.java +++ b/Mage.Sets/src/mage/cards/c/CryptChampion.java @@ -29,6 +29,7 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ManaWasSpentCondition; import mage.abilities.effects.OneShotEffect; @@ -41,7 +42,6 @@ import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -112,7 +112,7 @@ class CryptChampionEffect extends OneShotEffect { if (player != null) { FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard"); filter.add(new OwnerIdPredicate(playerId)); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); Target target = new TargetCardInGraveyard(filter); if (target.canChoose(playerId, game) && player.chooseTarget(outcome, target, source, game)) { Card card = game.getCard(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/cards/c/CullingScales.java b/Mage.Sets/src/mage/cards/c/CullingScales.java index a5bc9e7386..6d562f3d70 100644 --- a/Mage.Sets/src/mage/cards/c/CullingScales.java +++ b/Mage.Sets/src/mage/cards/c/CullingScales.java @@ -28,13 +28,13 @@ package mage.cards.c; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.Predicate; @@ -83,7 +83,7 @@ class HasLowestCMCAmongstNonlandPermanentsPredicate implements Predicate cardsToHand = new HashSet<>(); for (Permanent permanent : game.getBattlefield().getActivePermanents(creatureFilter, source.getControllerId(), source.getSourceId(), game)) { cardsToHand.add(permanent); diff --git a/Mage.Sets/src/mage/cards/e/EnthrallingVictor.java b/Mage.Sets/src/mage/cards/e/EnthrallingVictor.java index 47246346e9..ddb664b045 100644 --- a/Mage.Sets/src/mage/cards/e/EnthrallingVictor.java +++ b/Mage.Sets/src/mage/cards/e/EnthrallingVictor.java @@ -29,6 +29,7 @@ package mage.cards.e; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.UntapTargetEffect; @@ -40,7 +41,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.ControllerPredicate; @@ -58,7 +58,7 @@ public class EnthrallingVictor extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); filter.add(new ControllerPredicate(TargetController.OPPONENT)); } diff --git a/Mage.Sets/src/mage/cards/e/EpharasWarden.java b/Mage.Sets/src/mage/cards/e/EpharasWarden.java index 95a528299a..49d5f7afda 100644 --- a/Mage.Sets/src/mage/cards/e/EpharasWarden.java +++ b/Mage.Sets/src/mage/cards/e/EpharasWarden.java @@ -29,6 +29,7 @@ package mage.cards.e; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.TapTargetEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.Target; @@ -52,7 +52,7 @@ public class EpharasWarden extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 4)); } public EpharasWarden(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/e/EpicExperiment.java b/Mage.Sets/src/mage/cards/e/EpicExperiment.java index 302aaf5e8a..158ab220df 100644 --- a/Mage.Sets/src/mage/cards/e/EpicExperiment.java +++ b/Mage.Sets/src/mage/cards/e/EpicExperiment.java @@ -29,12 +29,12 @@ package mage.cards.e; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -91,7 +91,7 @@ class EpicExperimentEffect extends OneShotEffect { // cast the possible cards without paying the mana ExileZone epicExperimentExileZone = game.getExile().getExileZone(source.getSourceId()); FilterCard filter = new FilterInstantOrSorceryCard(); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, source.getManaCostsToPay().getX() + 1)); filter.setMessage("instant and sorcery cards with converted mana cost " + source.getManaCostsToPay().getX() + " or less"); Cards cardsToCast = new CardsImpl(); if (epicExperimentExileZone == null) { diff --git a/Mage.Sets/src/mage/cards/e/ErrantDoomsayers.java b/Mage.Sets/src/mage/cards/e/ErrantDoomsayers.java index 3fceb224a8..6bc571328c 100644 --- a/Mage.Sets/src/mage/cards/e/ErrantDoomsayers.java +++ b/Mage.Sets/src/mage/cards/e/ErrantDoomsayers.java @@ -29,6 +29,7 @@ package mage.cards.e; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.TapTargetEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.target.Target; @@ -52,7 +52,7 @@ public class ErrantDoomsayers extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 2 or less"); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3)); } public ErrantDoomsayers(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/e/Evershrike.java b/Mage.Sets/src/mage/cards/e/Evershrike.java index f98efc757a..9e36d56a12 100644 --- a/Mage.Sets/src/mage/cards/e/Evershrike.java +++ b/Mage.Sets/src/mage/cards/e/Evershrike.java @@ -29,6 +29,7 @@ package mage.cards.e; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -43,7 +44,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -57,14 +57,12 @@ import mage.target.TargetCard; import java.util.UUID; /** - * * @author jeffwadsworth - * */ public class Evershrike extends CardImpl { public Evershrike(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W/B}{W/B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W/B}{W/B}"); this.subtype.add("Elemental"); this.subtype.add("Spirit"); @@ -120,7 +118,7 @@ class EvershrikeEffect extends OneShotEffect { filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT)); filterAuraCard.add(new SubtypePredicate("Aura")); filterAuraCard.add(new AuraCardCanAttachToPermanentId(evershrikePermanent.getId())); - filterAuraCard.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, xAmount)); + filterAuraCard.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, xAmount)); int count = controller.getHand().count(filterAuraCard, game); while (controller.canRespond() && count > 0 && controller.chooseUse(Outcome.Benefit, "Do you wish to put an Aura card from your hand onto Evershrike", source, game)) { TargetCard targetAura = new TargetCard(Zone.HAND, filterAuraCard); diff --git a/Mage.Sets/src/mage/cards/e/ExileIntoDarkness.java b/Mage.Sets/src/mage/cards/e/ExileIntoDarkness.java index d488c0cd72..7de5df7d2e 100644 --- a/Mage.Sets/src/mage/cards/e/ExileIntoDarkness.java +++ b/Mage.Sets/src/mage/cards/e/ExileIntoDarkness.java @@ -28,6 +28,7 @@ package mage.cards.e; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; @@ -38,7 +39,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetPlayer; @@ -54,7 +54,7 @@ public class ExileIntoDarkness extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public ExileIntoDarkness(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java b/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java index 2418097e9e..516a6ba3e0 100644 --- a/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java +++ b/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java @@ -28,6 +28,7 @@ package mage.cards.e; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.mana.ColorlessManaAbility; @@ -35,7 +36,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -46,13 +46,12 @@ import mage.target.TargetPlayer; import java.util.UUID; /** - * * @author North */ public class ExuberantFirestoker extends CardImpl { public ExuberantFirestoker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add("Human"); this.subtype.add("Druid"); this.subtype.add("Shaman"); @@ -81,7 +80,7 @@ class ExuberantFirestokerTriggeredAbility extends TriggeredAbilityImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public ExuberantFirestokerTriggeredAbility() { diff --git a/Mage.Sets/src/mage/cards/e/EzuriClawOfProgress.java b/Mage.Sets/src/mage/cards/e/EzuriClawOfProgress.java index 19810ba9a6..9be0ad354d 100644 --- a/Mage.Sets/src/mage/cards/e/EzuriClawOfProgress.java +++ b/Mage.Sets/src/mage/cards/e/EzuriClawOfProgress.java @@ -29,6 +29,7 @@ package mage.cards.e; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -37,7 +38,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.AnotherPredicate; @@ -58,7 +58,7 @@ public class EzuriClawOfProgress extends CardImpl { final private static FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent(); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); filter2.add(new AnotherPredicate()); } diff --git a/Mage.Sets/src/mage/cards/f/FavorOfTheMighty.java b/Mage.Sets/src/mage/cards/f/FavorOfTheMighty.java index b3e46b83b9..49238b2e23 100644 --- a/Mage.Sets/src/mage/cards/f/FavorOfTheMighty.java +++ b/Mage.Sets/src/mage/cards/f/FavorOfTheMighty.java @@ -29,13 +29,13 @@ package mage.cards.f; import mage.ObjectColor; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; @@ -108,7 +108,7 @@ class FavorOfTheMightyEffect extends ContinuousEffectImpl { } } FilterPermanent filterMaxCMC = new FilterCreaturePermanent(); - filterMaxCMC.add(new ConvertedManaCostPredicate(ComparisonType.Equal, maxCMC)); + filterMaxCMC.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, maxCMC)); for (Permanent permanent : game.getBattlefield().getActivePermanents(filterMaxCMC, source.getControllerId(), game)) { if (permanent != null) { permanent.addAbility(new ProtectionAbility(filter), source.getSourceId(), game); diff --git a/Mage.Sets/src/mage/cards/f/FerocityOfTheUnderworld.java b/Mage.Sets/src/mage/cards/f/FerocityOfTheUnderworld.java index e890d3dc3e..f5d93ccb0d 100644 --- a/Mage.Sets/src/mage/cards/f/FerocityOfTheUnderworld.java +++ b/Mage.Sets/src/mage/cards/f/FerocityOfTheUnderworld.java @@ -27,6 +27,7 @@ */ package mage.cards.f; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.common.CopyTargetSpellEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -34,7 +35,6 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.Predicates; @@ -56,7 +56,7 @@ public class FerocityOfTheUnderworld extends CardImpl { private static final FilterSpell filterMode2 = new FilterSpell("instant or sorcery spell"); static { - filterMode1.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filterMode1.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); filterMode2.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY))); } diff --git a/Mage.Sets/src/mage/cards/f/FierceEmpath.java b/Mage.Sets/src/mage/cards/f/FierceEmpath.java index ff93255b9c..7b63074ae2 100644 --- a/Mage.Sets/src/mage/cards/f/FierceEmpath.java +++ b/Mage.Sets/src/mage/cards/f/FierceEmpath.java @@ -28,12 +28,12 @@ package mage.cards.f; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; @@ -48,7 +48,7 @@ public class FierceEmpath extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with converted mana cost 6 or greater"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5)); } public FierceEmpath(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); diff --git a/Mage.Sets/src/mage/cards/f/FiremindsForesight.java b/Mage.Sets/src/mage/cards/f/FiremindsForesight.java index 45ac63f433..7b7cc5a08a 100644 --- a/Mage.Sets/src/mage/cards/f/FiremindsForesight.java +++ b/Mage.Sets/src/mage/cards/f/FiremindsForesight.java @@ -28,12 +28,12 @@ package mage.cards.f; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -100,7 +100,7 @@ class FiremindsForesightSearchEffect extends OneShotEffect { for (int cmc=3; cmc > 0; cmc--) { FilterCard filter = new FilterCard("instant card with converted mana cost " + cmc); filter.add(new CardTypePredicate(CardType.INSTANT)); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, cmc)); cardsCount = cardsInLibrary.count(filter, game); diff --git a/Mage.Sets/src/mage/cards/f/FleetFootedMonk.java b/Mage.Sets/src/mage/cards/f/FleetFootedMonk.java index bb90e38365..c323262c0a 100644 --- a/Mage.Sets/src/mage/cards/f/FleetFootedMonk.java +++ b/Mage.Sets/src/mage/cards/f/FleetFootedMonk.java @@ -28,13 +28,13 @@ package mage.cards.f; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -49,7 +49,7 @@ public class FleetFootedMonk extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 1)); } public FleetFootedMonk(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/f/FleshpulperGiant.java b/Mage.Sets/src/mage/cards/f/FleshpulperGiant.java index 14db63f518..8acdc40faf 100644 --- a/Mage.Sets/src/mage/cards/f/FleshpulperGiant.java +++ b/Mage.Sets/src/mage/cards/f/FleshpulperGiant.java @@ -29,12 +29,12 @@ package mage.cards.f; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.target.common.TargetCreaturePermanent; @@ -50,7 +50,7 @@ public class FleshpulperGiant extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughess 2 or less"); static { - filter.add(new ToughnessPredicate(ComparisonType.LessThan, 3)); + filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3)); } public FleshpulperGiant(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/f/Fleshwrither.java b/Mage.Sets/src/mage/cards/f/Fleshwrither.java index ac75906940..06a5ac1b03 100644 --- a/Mage.Sets/src/mage/cards/f/Fleshwrither.java +++ b/Mage.Sets/src/mage/cards/f/Fleshwrither.java @@ -30,6 +30,7 @@ package mage.cards.f; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -42,7 +43,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TimingRule; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -98,7 +98,7 @@ class FleshwritherEffect extends OneShotEffect { MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null && controller != null) { FilterCreatureCard filter = new FilterCreatureCard("creature with converted mana cost " + sourceObject.getConvertedManaCost()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, sourceObject.getConvertedManaCost())); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, sourceObject.getConvertedManaCost())); TargetCardInLibrary target = new TargetCardInLibrary(1, filter); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { diff --git a/Mage.Sets/src/mage/cards/f/Fragmentize.java b/Mage.Sets/src/mage/cards/f/Fragmentize.java index 001510c7e9..9f6c147e53 100644 --- a/Mage.Sets/src/mage/cards/f/Fragmentize.java +++ b/Mage.Sets/src/mage/cards/f/Fragmentize.java @@ -27,11 +27,11 @@ */ package mage.cards.f; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetPermanent; @@ -47,7 +47,7 @@ public class Fragmentize extends CardImpl { private static final FilterArtifactOrEnchantmentPermanent filter = new FilterArtifactOrEnchantmentPermanent("artifact or enchantment with converted mana cost 4 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public Fragmentize(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GarruksPackleader.java b/Mage.Sets/src/mage/cards/g/GarruksPackleader.java index 9585d3336d..297c2f61cd 100644 --- a/Mage.Sets/src/mage/cards/g/GarruksPackleader.java +++ b/Mage.Sets/src/mage/cards/g/GarruksPackleader.java @@ -29,13 +29,13 @@ package mage.cards.g; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -52,7 +52,7 @@ public class GarruksPackleader extends CardImpl { private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature with power 3 or greater"); static { filter.add(new AnotherPredicate()); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public GarruksPackleader(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GateSmasher.java b/Mage.Sets/src/mage/cards/g/GateSmasher.java index 95254070e1..68f587c722 100644 --- a/Mage.Sets/src/mage/cards/g/GateSmasher.java +++ b/Mage.Sets/src/mage/cards/g/GateSmasher.java @@ -28,6 +28,7 @@ package mage.cards.g; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.AttachableToRestrictedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -42,7 +43,6 @@ import mage.constants.AttachmentType; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.target.Target; @@ -59,7 +59,7 @@ public class GateSmasher extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with 3 or more power"); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 3)); } public GateSmasher(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GazeOfGranite.java b/Mage.Sets/src/mage/cards/g/GazeOfGranite.java index 3d5981ba96..2c1cc62d97 100644 --- a/Mage.Sets/src/mage/cards/g/GazeOfGranite.java +++ b/Mage.Sets/src/mage/cards/g/GazeOfGranite.java @@ -28,12 +28,12 @@ package mage.cards.g; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -49,7 +49,7 @@ public class GazeOfGranite extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each nonland permanent with converted mana cost X or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public GazeOfGranite(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GenesisHydra.java b/Mage.Sets/src/mage/cards/g/GenesisHydra.java index 32b8256e69..d2bd7396ee 100644 --- a/Mage.Sets/src/mage/cards/g/GenesisHydra.java +++ b/Mage.Sets/src/mage/cards/g/GenesisHydra.java @@ -29,6 +29,7 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.effects.OneShotEffect; @@ -39,7 +40,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.Predicates; @@ -119,7 +119,7 @@ class GenesisHydraPutOntoBattlefieldEffect extends OneShotEffect { FilterCard filter = new FilterPermanentCard("a nonland permanent card with converted mana cost " + count + " or less to put onto the battlefield"); filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, count + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, count + 1)); TargetCard target1 = new TargetCard(Zone.LIBRARY, filter); target1.setRequired(false); if (cards.count(filter, controller.getId(), source.getSourceId(), game) > 0) { diff --git a/Mage.Sets/src/mage/cards/g/GenesisWave.java b/Mage.Sets/src/mage/cards/g/GenesisWave.java index cfacef27b4..7912b1f5f6 100644 --- a/Mage.Sets/src/mage/cards/g/GenesisWave.java +++ b/Mage.Sets/src/mage/cards/g/GenesisWave.java @@ -29,12 +29,12 @@ package mage.cards.g; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -101,7 +101,7 @@ class GenesisWaveEffect extends OneShotEffect { if (!cards.isEmpty()) { controller.revealCards(sourceObject.getIdName(), cards, game); FilterCard filter = new FilterCard("cards with converted mana cost " + xValue + " or less to put onto the battlefield"); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, xValue + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, xValue + 1)); filter.add( Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE), diff --git a/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java b/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java index 32d3fdd2e4..af7b93c1f0 100644 --- a/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java +++ b/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java @@ -29,6 +29,7 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; @@ -40,7 +41,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -53,7 +53,6 @@ import mage.target.common.TargetCardInOpponentsGraveyard; import java.util.UUID; /** - * * @author nantuko */ public class GethLordOfTheVault extends CardImpl { @@ -61,7 +60,7 @@ public class GethLordOfTheVault extends CardImpl { private final UUID originalId; public GethLordOfTheVault(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); addSuperType(SuperType.LEGENDARY); this.subtype.add("Zombie"); @@ -87,7 +86,7 @@ public class GethLordOfTheVault extends CardImpl { filter.add(Predicates.or( new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE))); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); Target target = new TargetCardInOpponentsGraveyard(filter); ability.addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/g/GhirapurGuide.java b/Mage.Sets/src/mage/cards/g/GhirapurGuide.java index 0f8a2ef774..420a7a37f6 100644 --- a/Mage.Sets/src/mage/cards/g/GhirapurGuide.java +++ b/Mage.Sets/src/mage/cards/g/GhirapurGuide.java @@ -29,6 +29,7 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect; @@ -37,7 +38,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -53,7 +53,7 @@ public class GhirapurGuide extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public GhirapurGuide(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java b/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java index 3309019010..5c27f0af7d 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDarkDwellers.java @@ -29,6 +29,7 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; @@ -41,7 +42,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -62,7 +62,7 @@ public class GoblinDarkDwellers extends CardImpl { private static final FilterInstantOrSorceryCard filter = new FilterInstantOrSorceryCard("instant or sorcery card with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public GoblinDarkDwellers(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinKites.java b/Mage.Sets/src/mage/cards/g/GoblinKites.java index 3e3d6415bb..f20a827a88 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinKites.java +++ b/Mage.Sets/src/mage/cards/g/GoblinKites.java @@ -28,6 +28,7 @@ package mage.cards.g; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -38,7 +39,6 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.ControllerPredicate; @@ -58,7 +58,7 @@ public class GoblinKites extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("controlled creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); filter.add(new ControllerPredicate(TargetController.YOU)); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinMutant.java b/Mage.Sets/src/mage/cards/g/GoblinMutant.java index 8e0f8ea5ba..5890cd64c9 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMutant.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMutant.java @@ -28,6 +28,7 @@ package mage.cards.g; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.CantAttackIfDefenderControlsPermanent; @@ -37,7 +38,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.PowerPredicate; @@ -56,8 +56,8 @@ public class GoblinMutant extends CardImpl { static final private FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures with power 3 or greater"); static { - filter.add(Predicates.and(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2), Predicates.not(new TappedPredicate()))); - filter2.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(Predicates.and(new PowerPredicate(CountType.MORE_THAN, 2), Predicates.not(new TappedPredicate()))); + filter2.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public GoblinMutant(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinTunneler.java b/Mage.Sets/src/mage/cards/g/GoblinTunneler.java index cad47acefa..6c7cc64198 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinTunneler.java +++ b/Mage.Sets/src/mage/cards/g/GoblinTunneler.java @@ -30,6 +30,7 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; @@ -37,7 +38,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; @@ -53,7 +53,7 @@ public class GoblinTunneler extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public GoblinTunneler(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java b/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java index 207995e4bb..355a66e54f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java +++ b/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java @@ -28,24 +28,23 @@ package mage.cards.g; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import java.util.UUID; /** - * * @author fireshoes */ public class GoblinsOfTheFlarg extends CardImpl { - + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Dwarf"); static { @@ -53,7 +52,7 @@ public class GoblinsOfTheFlarg extends CardImpl { } public GoblinsOfTheFlarg(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); this.subtype.add("Goblin"); this.subtype.add("Warrior"); this.power = new MageInt(1); @@ -61,10 +60,10 @@ public class GoblinsOfTheFlarg extends CardImpl { // Mountainwalk this.addAbility(new MountainwalkAbility()); - + // When you control a Dwarf, sacrifice Goblins of the Flarg. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - filter, Filter.ComparisonType.GreaterThan, 0, + filter, CountType.MORE_THAN, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/g/Godtoucher.java b/Mage.Sets/src/mage/cards/g/Godtoucher.java index fd6aca7d98..a7fa90281b 100644 --- a/Mage.Sets/src/mage/cards/g/Godtoucher.java +++ b/Mage.Sets/src/mage/cards/g/Godtoucher.java @@ -29,6 +29,7 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -38,7 +39,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -56,7 +56,7 @@ public class Godtoucher extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public Godtoucher(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GodtrackerOfJund.java b/Mage.Sets/src/mage/cards/g/GodtrackerOfJund.java index 6baeb99c54..bdd0821302 100644 --- a/Mage.Sets/src/mage/cards/g/GodtrackerOfJund.java +++ b/Mage.Sets/src/mage/cards/g/GodtrackerOfJund.java @@ -28,6 +28,7 @@ package mage.cards.g; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; @@ -35,7 +36,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -50,7 +50,7 @@ public class GodtrackerOfJund extends CardImpl { final private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } String rule = "Whenever a creature with power 5 or greater enters the battlefield under your control, you may put a +1/+1 counter on {this}."; diff --git a/Mage.Sets/src/mage/cards/g/GoldmeadowDodger.java b/Mage.Sets/src/mage/cards/g/GoldmeadowDodger.java index 4c6627854d..0b6f99942c 100644 --- a/Mage.Sets/src/mage/cards/g/GoldmeadowDodger.java +++ b/Mage.Sets/src/mage/cards/g/GoldmeadowDodger.java @@ -28,13 +28,13 @@ package mage.cards.g; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -49,7 +49,7 @@ public class GoldmeadowDodger extends CardImpl { private static final FilterCreaturePermanent FILTER = new FilterCreaturePermanent("creatures with power 4 or greater"); static { - FILTER.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + FILTER.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public GoldmeadowDodger(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GorillaPack.java b/Mage.Sets/src/mage/cards/g/GorillaPack.java index dbe163a208..0ee340e08d 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaPack.java +++ b/Mage.Sets/src/mage/cards/g/GorillaPack.java @@ -28,6 +28,7 @@ package mage.cards.g; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; import java.util.UUID; @@ -58,7 +58,7 @@ public class GorillaPack extends CardImpl { // When you control no Forests, sacrifice Gorilla Pack. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Forest", "no Forests"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Forest", "no Forests"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/g/GorillaShaman.java b/Mage.Sets/src/mage/cards/g/GorillaShaman.java index cd5f9e73a5..f17ab085c1 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaShaman.java +++ b/Mage.Sets/src/mage/cards/g/GorillaShaman.java @@ -29,6 +29,7 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -75,7 +75,7 @@ public class GorillaShaman extends CardImpl { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterArtifactPermanent filter = new FilterArtifactPermanent(new StringBuilder("noncreature artifact with converted mana cost ").append(xValue).toString()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); Target target = new TargetPermanent(filter); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/cards/g/Granulate.java b/Mage.Sets/src/mage/cards/g/Granulate.java index a5dd68d8ac..b6dee8d7d2 100644 --- a/Mage.Sets/src/mage/cards/g/Granulate.java +++ b/Mage.Sets/src/mage/cards/g/Granulate.java @@ -27,11 +27,11 @@ */ package mage.cards.g; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -47,7 +47,7 @@ public class Granulate extends CardImpl { private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland artifact with converted mana cost 4 or less"); static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public Granulate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}{R}"); diff --git a/Mage.Sets/src/mage/cards/g/Grozoth.java b/Mage.Sets/src/mage/cards/g/Grozoth.java index 5ffb8b50fe..fe92efc964 100644 --- a/Mage.Sets/src/mage/cards/g/Grozoth.java +++ b/Mage.Sets/src/mage/cards/g/Grozoth.java @@ -29,6 +29,7 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -41,7 +42,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -93,7 +93,7 @@ class GrozothEffect extends SearchEffect { private static final FilterCard filter = new FilterCard(); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, 9)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, 9)); } public GrozothEffect() { diff --git a/Mage.Sets/src/mage/cards/g/GustriderExuberant.java b/Mage.Sets/src/mage/cards/g/GustriderExuberant.java index a682911ea9..12af7c269c 100644 --- a/Mage.Sets/src/mage/cards/g/GustriderExuberant.java +++ b/Mage.Sets/src/mage/cards/g/GustriderExuberant.java @@ -28,6 +28,7 @@ package mage.cards.g; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -37,7 +38,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -52,7 +52,7 @@ public class GustriderExuberant extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public GustriderExuberant(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/h/HammerMage.java b/Mage.Sets/src/mage/cards/h/HammerMage.java index cf57a37f91..880f5f40d8 100644 --- a/Mage.Sets/src/mage/cards/h/HammerMage.java +++ b/Mage.Sets/src/mage/cards/h/HammerMage.java @@ -27,9 +27,9 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.common.TapSourceCost; @@ -40,12 +40,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author LoneFox @@ -95,7 +96,7 @@ class HammerMageEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { FilterArtifactPermanent filter = new FilterArtifactPermanent(); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, source.getManaCostsToPay().getX() + 1)); for(Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { permanent.destroy(source.getSourceId(), game, false); } diff --git a/Mage.Sets/src/mage/cards/h/HearthCharm.java b/Mage.Sets/src/mage/cards/h/HearthCharm.java index c86cbfb983..5e120809dd 100644 --- a/Mage.Sets/src/mage/cards/h/HearthCharm.java +++ b/Mage.Sets/src/mage/cards/h/HearthCharm.java @@ -27,7 +27,7 @@ */ package mage.cards.h; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; @@ -36,13 +36,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.AttackingPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -55,7 +56,7 @@ public class HearthCharm extends CardImpl { static { filter1.add(new CardTypePredicate(CardType.ARTIFACT)); filter2.add(new AttackingPredicate()); - filter3.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter3.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public HearthCharm(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/h/HearthKami.java b/Mage.Sets/src/mage/cards/h/HearthKami.java index bb74420544..271136a316 100644 --- a/Mage.Sets/src/mage/cards/h/HearthKami.java +++ b/Mage.Sets/src/mage/cards/h/HearthKami.java @@ -27,9 +27,9 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -38,13 +38,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -53,7 +54,7 @@ public class HearthKami extends CardImpl { private final UUID originalId; public HearthKami(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add("Spirit"); this.power = new MageInt(2); @@ -73,7 +74,7 @@ public class HearthKami extends CardImpl { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterArtifactPermanent filter = new FilterArtifactPermanent(new StringBuilder("artifact with converted mana cost ").append(xValue).toString()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); Target target = new TargetPermanent(filter); ability.addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/h/HibernationsEnd.java b/Mage.Sets/src/mage/cards/h/HibernationsEnd.java index 9fb0836488..55b30b05a2 100644 --- a/Mage.Sets/src/mage/cards/h/HibernationsEnd.java +++ b/Mage.Sets/src/mage/cards/h/HibernationsEnd.java @@ -27,8 +27,8 @@ */ package mage.cards.h; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; @@ -39,7 +39,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -50,6 +49,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LoneFox @@ -129,7 +130,7 @@ class HibernationsEndEffect extends OneShotEffect { if (sourcePermanent != null && player != null) { int newConvertedCost = sourcePermanent.getCounters(game).getCount("age"); FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, newConvertedCost)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, newConvertedCost)); filter.add(new CardTypePredicate(CardType.CREATURE)); TargetCardInLibrary target = new TargetCardInLibrary(filter); return new SearchLibraryPutInPlayEffect(target).apply(game, source); diff --git a/Mage.Sets/src/mage/cards/h/HiddenDragonslayer.java b/Mage.Sets/src/mage/cards/h/HiddenDragonslayer.java index 0e0f16c099..bcbbf89914 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenDragonslayer.java +++ b/Mage.Sets/src/mage/cards/h/HiddenDragonslayer.java @@ -27,9 +27,9 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; @@ -39,12 +39,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -54,7 +55,7 @@ public class HiddenDragonslayer extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater an opponent controls"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); filter.add(new ControllerPredicate(TargetController.OPPONENT)); } diff --git a/Mage.Sets/src/mage/cards/h/HorriblyAwry.java b/Mage.Sets/src/mage/cards/h/HorriblyAwry.java index 5eacb57555..a87660857c 100644 --- a/Mage.Sets/src/mage/cards/h/HorriblyAwry.java +++ b/Mage.Sets/src/mage/cards/h/HorriblyAwry.java @@ -27,19 +27,20 @@ */ package mage.cards.h; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.common.CounterTargetWithReplacementEffect; import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreatureSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,7 @@ public class HorriblyAwry extends CardImpl { private static final FilterCreatureSpell filter = new FilterCreatureSpell("creature spell with converted mana cost 4 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public HorriblyAwry(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/h/HumbleTheBrute.java b/Mage.Sets/src/mage/cards/h/HumbleTheBrute.java index 1c3f75e909..afaf64e711 100644 --- a/Mage.Sets/src/mage/cards/h/HumbleTheBrute.java +++ b/Mage.Sets/src/mage/cards/h/HumbleTheBrute.java @@ -27,17 +27,18 @@ */ package mage.cards.h; -import java.util.UUID; +import mage.abilities.CountType; 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.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -47,7 +48,7 @@ public class HumbleTheBrute extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public HumbleTheBrute(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/i/ImperialRecruiter.java b/Mage.Sets/src/mage/cards/i/ImperialRecruiter.java index 9bb344cc5f..564016059c 100644 --- a/Mage.Sets/src/mage/cards/i/ImperialRecruiter.java +++ b/Mage.Sets/src/mage/cards/i/ImperialRecruiter.java @@ -27,18 +27,19 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +49,7 @@ public class ImperialRecruiter extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with power 2 or less"); static{ - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public ImperialRecruiter(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/i/InquisitionOfKozilek.java b/Mage.Sets/src/mage/cards/i/InquisitionOfKozilek.java index 31045a1e2f..bf75f77b45 100644 --- a/Mage.Sets/src/mage/cards/i/InquisitionOfKozilek.java +++ b/Mage.Sets/src/mage/cards/i/InquisitionOfKozilek.java @@ -28,19 +28,20 @@ package mage.cards.i; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -51,7 +52,7 @@ public class InquisitionOfKozilek extends CardImpl { static { filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public InquisitionOfKozilek(UUID ownerId, CardSetInfo setInfo){ diff --git a/Mage.Sets/src/mage/cards/i/IntrepidHero.java b/Mage.Sets/src/mage/cards/i/IntrepidHero.java index c34b3c63a9..fac2bcc859 100644 --- a/Mage.Sets/src/mage/cards/i/IntrepidHero.java +++ b/Mage.Sets/src/mage/cards/i/IntrepidHero.java @@ -27,21 +27,22 @@ */ package mage.cards.i; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author North @@ -51,7 +52,7 @@ public class IntrepidHero extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN,3)); } public IntrepidHero(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/i/IronclawBuzzardiers.java b/Mage.Sets/src/mage/cards/i/IronclawBuzzardiers.java index 72ee4a5a4c..dbf5b08e47 100644 --- a/Mage.Sets/src/mage/cards/i/IronclawBuzzardiers.java +++ b/Mage.Sets/src/mage/cards/i/IronclawBuzzardiers.java @@ -27,8 +27,8 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -40,10 +40,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author dustinconrad @@ -52,7 +53,7 @@ public class IronclawBuzzardiers extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 1)); } public IronclawBuzzardiers(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/i/IronclawOrcs.java b/Mage.Sets/src/mage/cards/i/IronclawOrcs.java index d81084d76c..87932a1882 100644 --- a/Mage.Sets/src/mage/cards/i/IronclawOrcs.java +++ b/Mage.Sets/src/mage/cards/i/IronclawOrcs.java @@ -27,18 +27,19 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author dustinconrad @@ -47,7 +48,7 @@ public class IronclawOrcs extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 1)); } public IronclawOrcs(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/i/IslandFishJasconius.java b/Mage.Sets/src/mage/cards/i/IslandFishJasconius.java index 980280e331..5d4705b24e 100644 --- a/Mage.Sets/src/mage/cards/i/IslandFishJasconius.java +++ b/Mage.Sets/src/mage/cards/i/IslandFishJasconius.java @@ -27,8 +27,8 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -43,9 +43,10 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -73,7 +74,7 @@ public class IslandFishJasconius extends CardImpl { // When you control no Islands, sacrifice Island Fish Jasconius. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/i/IslebackSpawn.java b/Mage.Sets/src/mage/cards/i/IslebackSpawn.java index 1aca6db08b..b4f8aad272 100644 --- a/Mage.Sets/src/mage/cards/i/IslebackSpawn.java +++ b/Mage.Sets/src/mage/cards/i/IslebackSpawn.java @@ -27,10 +27,9 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.Condition; import mage.abilities.condition.common.CardsInAnyLibraryCondition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; @@ -41,6 +40,8 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; +import java.util.UUID; + /** * * @author LevelX2 @@ -59,7 +60,7 @@ public class IslebackSpawn extends CardImpl { // Isleback Spawn gets +4/+8 as long as a library has twenty or fewer cards in it. this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConditionalContinuousEffect( new BoostSourceEffect(4,8, Duration.EndOfGame), - new CardsInAnyLibraryCondition(Condition.ComparisonType.LessThan, 21), + new CardsInAnyLibraryCondition(CountType.FEWER_THAN, 21), "{this} gets +4/+8 as long as a library has twenty or fewer cards in it"))); } diff --git a/Mage.Sets/src/mage/cards/i/IsochronScepter.java b/Mage.Sets/src/mage/cards/i/IsochronScepter.java index 9933530932..391bb7ce85 100644 --- a/Mage.Sets/src/mage/cards/i/IsochronScepter.java +++ b/Mage.Sets/src/mage/cards/i/IsochronScepter.java @@ -27,8 +27,8 @@ */ package mage.cards.i; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -40,7 +40,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -51,6 +50,8 @@ import mage.target.TargetCard; import mage.util.CardUtil; import org.apache.log4j.Logger; +import java.util.UUID; + /** * * @author LevelX2 @@ -86,7 +87,7 @@ class IsochronScepterImprintEffect extends OneShotEffect { static { filter.add(new CardTypePredicate(CardType.INSTANT)); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public IsochronScepterImprintEffect() { diff --git a/Mage.Sets/src/mage/cards/i/IzzetGuildmage.java b/Mage.Sets/src/mage/cards/i/IzzetGuildmage.java index 558b15f8c7..a8e9ebc65e 100644 --- a/Mage.Sets/src/mage/cards/i/IzzetGuildmage.java +++ b/Mage.Sets/src/mage/cards/i/IzzetGuildmage.java @@ -27,9 +27,9 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CopyTargetSpellEffect; @@ -38,13 +38,14 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,10 +57,10 @@ public class IzzetGuildmage extends CardImpl { static { filterInstant.add(new CardTypePredicate(CardType.INSTANT)); - filterInstant.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filterInstant.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); filterInstant.add(new ControllerPredicate(TargetController.YOU)); filterSorcery.add(new CardTypePredicate(CardType.SORCERY)); - filterSorcery.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filterSorcery.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); filterSorcery.add(new ControllerPredicate(TargetController.YOU)); } diff --git a/Mage.Sets/src/mage/cards/j/JarJarBinks.java b/Mage.Sets/src/mage/cards/j/JarJarBinks.java index 83036a3a12..0f0e2825c7 100644 --- a/Mage.Sets/src/mage/cards/j/JarJarBinks.java +++ b/Mage.Sets/src/mage/cards/j/JarJarBinks.java @@ -29,6 +29,7 @@ package mage.cards.j; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.CantBlockAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -38,7 +39,6 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -181,7 +181,7 @@ class JarJarBinksTapEffect extends OneShotEffect { } if (multipleExist) { FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("one of the creatures with the highest power"); - filter.add(new PowerPredicate(Filter.ComparisonType.Equal, highestPower)); + filter.add(new PowerPredicate(CountType.EQUAL_TO, highestPower)); Target target = new TargetPermanent(filter); target.setNotTarget(true); if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { diff --git a/Mage.Sets/src/mage/cards/j/JuntuStakes.java b/Mage.Sets/src/mage/cards/j/JuntuStakes.java index 0467b1df0a..99324b56b8 100644 --- a/Mage.Sets/src/mage/cards/j/JuntuStakes.java +++ b/Mage.Sets/src/mage/cards/j/JuntuStakes.java @@ -27,7 +27,7 @@ */ package mage.cards.j; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; import mage.cards.CardImpl; @@ -36,10 +36,11 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author LoneFox @@ -49,7 +50,7 @@ public class JuntuStakes extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures with power 1 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 2)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 2)); } public JuntuStakes(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java b/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java index d3ec8b6ffe..55fbb04b72 100644 --- a/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java +++ b/Mage.Sets/src/mage/cards/k/KahoMinamoHistorian.java @@ -27,26 +27,21 @@ */ package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.SearchEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -56,6 +51,8 @@ import mage.target.common.TargetCardInExile; import mage.target.common.TargetCardInLibrary; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author LevelX2 @@ -151,7 +148,7 @@ class KahoMinamoHistorianCastEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { FilterCard filter = new FilterCard(); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, source.getManaCostsToPay().getX())); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, source.getManaCostsToPay().getX())); TargetCardInExile target = new TargetCardInExile(filter, CardUtil.getCardExileZoneId(game, source)); Cards cards = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); if (!cards.isEmpty() && controller.choose(Outcome.PlayForFree, cards, target, game)) { diff --git a/Mage.Sets/src/mage/cards/k/KalemneDiscipleOfIroas.java b/Mage.Sets/src/mage/cards/k/KalemneDiscipleOfIroas.java index 6b58126d3f..dee8a0f13d 100644 --- a/Mage.Sets/src/mage/cards/k/KalemneDiscipleOfIroas.java +++ b/Mage.Sets/src/mage/cards/k/KalemneDiscipleOfIroas.java @@ -29,6 +29,7 @@ package mage.cards.k; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; @@ -44,7 +45,6 @@ import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -63,7 +63,7 @@ public class KalemneDiscipleOfIroas extends CardImpl { static { filterSpell.add(new CardTypePredicate(CardType.CREATURE)); - filterSpell.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 4)); + filterSpell.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 4)); } public KalemneDiscipleOfIroas(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/k/KavuLair.java b/Mage.Sets/src/mage/cards/k/KavuLair.java index 703edba086..37da5324d9 100644 --- a/Mage.Sets/src/mage/cards/k/KavuLair.java +++ b/Mage.Sets/src/mage/cards/k/KavuLair.java @@ -27,7 +27,7 @@ */ package mage.cards.k; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.effects.common.DrawCardTargetEffect; import mage.cards.CardImpl; @@ -35,10 +35,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SetTargetPointer; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +49,7 @@ public class KavuLair extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public KavuLair(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/k/KheruBloodsucker.java b/Mage.Sets/src/mage/cards/k/KheruBloodsucker.java index b4c610bfce..79e3a4248a 100644 --- a/Mage.Sets/src/mage/cards/k/KheruBloodsucker.java +++ b/Mage.Sets/src/mage/cards/k/KheruBloodsucker.java @@ -27,9 +27,9 @@ */ package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; @@ -44,7 +44,6 @@ import mage.constants.CardType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterCreaturePermanent; @@ -53,6 +52,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author emerald000 @@ -65,7 +66,7 @@ public class KheruBloodsucker extends CardImpl { static { anotherFilter.add(new AnotherPredicate()); toughnessFilter.add(new ControllerPredicate(TargetController.YOU)); - toughnessFilter.add(new ToughnessPredicate(ComparisonType.GreaterThan, 3)); + toughnessFilter.add(new ToughnessPredicate(CountType.MORE_THAN, 3)); } public KheruBloodsucker(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/k/KillingGlare.java b/Mage.Sets/src/mage/cards/k/KillingGlare.java index dfe6a990d8..3c3c48b42e 100644 --- a/Mage.Sets/src/mage/cards/k/KillingGlare.java +++ b/Mage.Sets/src/mage/cards/k/KillingGlare.java @@ -27,19 +27,20 @@ */ package mage.cards.k; -import java.util.UUID; -import mage.constants.CardType; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -66,7 +67,7 @@ public class KillingGlare extends CardImpl { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature with power ").append(xValue).append(" or less").toString()); - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, xValue + 1)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, xValue + 1)); ability.addTarget(new TargetCreaturePermanent(filter)); } } diff --git a/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java b/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java index 18655c2cca..0651ee68a2 100644 --- a/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java +++ b/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java @@ -27,8 +27,8 @@ */ package mage.cards.k; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.common.DiscardTargetCost; @@ -39,13 +39,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author anonymous @@ -73,7 +74,7 @@ public class KnollspineInvocation extends CardImpl { DiscardTargetCost discardCost = (DiscardTargetCost) cost; discardCost.getTargets().clear(); FilterCard adjustedFilter = filter.copy(); // don't use it directly, it's static!!!! - adjustedFilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); + adjustedFilter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); discardCost.addTarget(new TargetCardInHand(adjustedFilter)); return; } diff --git a/Mage.Sets/src/mage/cards/k/KorLineSlinger.java b/Mage.Sets/src/mage/cards/k/KorLineSlinger.java index da43060293..ddc1036208 100644 --- a/Mage.Sets/src/mage/cards/k/KorLineSlinger.java +++ b/Mage.Sets/src/mage/cards/k/KorLineSlinger.java @@ -27,23 +27,23 @@ */ package mage.cards.k; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author North */ public class KorLineSlinger extends CardImpl { @@ -51,11 +51,11 @@ public class KorLineSlinger extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); static { - filter.add(new PowerPredicate(ComparisonType.LessThan, 4)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 4)); } public KorLineSlinger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); this.subtype.add("Kor"); this.subtype.add("Scout"); diff --git a/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java b/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java index 470978d576..2f7f92b36f 100644 --- a/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java +++ b/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java @@ -46,7 +46,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -146,7 +145,7 @@ class KozilekDiscardCost extends CostImpl { return false; } FilterCard filter = new FilterCard("card with converted mana cost of " + targetSpell.getConvertedManaCost()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, targetSpell.getConvertedManaCost())); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, targetSpell.getConvertedManaCost())); TargetCardInHand target = new TargetCardInHand(filter); this.getTargets().clear(); this.getTargets().add(target); diff --git a/Mage.Sets/src/mage/cards/k/KozileksReturn.java b/Mage.Sets/src/mage/cards/k/KozileksReturn.java index 69011238a9..03009acf1f 100644 --- a/Mage.Sets/src/mage/cards/k/KozileksReturn.java +++ b/Mage.Sets/src/mage/cards/k/KozileksReturn.java @@ -27,7 +27,7 @@ */ package mage.cards.k; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.costs.common.ExileSourceFromGraveCost; import mage.abilities.effects.common.DamageAllEffect; @@ -37,13 +37,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -55,7 +56,7 @@ public class KozileksReturn extends CardImpl { static { filter.add(new SubtypePredicate("Eldrazi")); filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 6)); + filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 6)); } public KozileksReturn(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/k/KrosanDrover.java b/Mage.Sets/src/mage/cards/k/KrosanDrover.java index f24c02589d..09cbd22b20 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanDrover.java +++ b/Mage.Sets/src/mage/cards/k/KrosanDrover.java @@ -27,19 +27,20 @@ */ package mage.cards.k; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import java.util.UUID; + /** * * @author Eirkei @@ -50,7 +51,7 @@ public class KrosanDrover extends CardImpl { static { filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5)); } public KrosanDrover(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/k/KrovikanRot.java b/Mage.Sets/src/mage/cards/k/KrovikanRot.java index 69d10e209d..f8c10d51e6 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanRot.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanRot.java @@ -27,18 +27,19 @@ */ package mage.cards.k; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.RecoverAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -48,7 +49,7 @@ public class KrovikanRot extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public KrovikanRot(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/k/KukemssaSerpent.java b/Mage.Sets/src/mage/cards/k/KukemssaSerpent.java index 476a7b6ace..677c057ecb 100644 --- a/Mage.Sets/src/mage/cards/k/KukemssaSerpent.java +++ b/Mage.Sets/src/mage/cards/k/KukemssaSerpent.java @@ -27,9 +27,9 @@ */ package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -44,7 +44,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -52,6 +51,8 @@ import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetLandPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -83,7 +84,7 @@ public class KukemssaSerpent extends CardImpl { // When you control no Islands, sacrifice Kukemssa Serpent. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/k/Kurgadon.java b/Mage.Sets/src/mage/cards/k/Kurgadon.java index 2b95c95b9a..d0a9a2c3de 100644 --- a/Mage.Sets/src/mage/cards/k/Kurgadon.java +++ b/Mage.Sets/src/mage/cards/k/Kurgadon.java @@ -27,19 +27,20 @@ */ package mage.cards.k; -import java.util.UUID; -import mage.constants.CardType; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.counters.CounterType; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import java.util.UUID; + /** * * @author Backfir3 @@ -50,7 +51,7 @@ public class Kurgadon extends CardImpl { static { filterSpell.add(new CardTypePredicate(CardType.CREATURE)); - filterSpell.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 5)); + filterSpell.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5)); } public Kurgadon(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/l/LambholtPacifist.java b/Mage.Sets/src/mage/cards/l/LambholtPacifist.java index 5abf4cba10..10653c9ec1 100644 --- a/Mage.Sets/src/mage/cards/l/LambholtPacifist.java +++ b/Mage.Sets/src/mage/cards/l/LambholtPacifist.java @@ -27,9 +27,9 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -44,12 +44,13 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author fireshoes @@ -91,7 +92,7 @@ class LambholtPacifistEffect extends RestrictionEffect { private static final FilterControlledPermanent filter = new FilterControlledPermanent("a creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public LambholtPacifistEffect() { diff --git a/Mage.Sets/src/mage/cards/l/LastBreath.java b/Mage.Sets/src/mage/cards/l/LastBreath.java index 39980f545c..92bb5e2ea6 100644 --- a/Mage.Sets/src/mage/cards/l/LastBreath.java +++ b/Mage.Sets/src/mage/cards/l/LastBreath.java @@ -27,8 +27,8 @@ */ package mage.cards.l; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; @@ -36,7 +36,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -44,6 +43,8 @@ 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 LastBreath extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public LastBreath(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/l/LaviniaOfTheTenth.java b/Mage.Sets/src/mage/cards/l/LaviniaOfTheTenth.java index 331ac20b7f..f61f5a16e2 100644 --- a/Mage.Sets/src/mage/cards/l/LaviniaOfTheTenth.java +++ b/Mage.Sets/src/mage/cards/l/LaviniaOfTheTenth.java @@ -28,25 +28,25 @@ package mage.cards.l; -import java.util.UUID; - -import mage.constants.CardType; import mage.MageInt; import mage.ObjectColor; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.DetainAllEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.SuperType; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.permanent.ControllerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -57,7 +57,7 @@ public class LaviniaOfTheTenth extends CardImpl { static { filterDetain.add(new ControllerPredicate(TargetController.OPPONENT)); filterDetain.add(Predicates.not(new CardTypePredicate(CardType.LAND))); - filterDetain.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + filterDetain.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public LaviniaOfTheTenth (UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/l/LegacyOfTheBeloved.java b/Mage.Sets/src/mage/cards/l/LegacyOfTheBeloved.java index fcb4cee973..6c336b2be6 100644 --- a/Mage.Sets/src/mage/cards/l/LegacyOfTheBeloved.java +++ b/Mage.Sets/src/mage/cards/l/LegacyOfTheBeloved.java @@ -27,8 +27,8 @@ */ package mage.cards.l; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -38,7 +38,6 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -47,6 +46,8 @@ import mage.players.Player; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author Styxo @@ -99,7 +100,7 @@ class LegacyOfTheBelovedEffect extends OneShotEffect { if (cost instanceof SacrificeTargetCost) { Permanent p = (Permanent) game.getLastKnownInformation(((SacrificeTargetCost) cost).getPermanents().get(0).getId(), Zone.BATTLEFIELD); if (p != null) { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, p.getConvertedManaCost())); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, p.getConvertedManaCost())); TargetCardInLibrary target = new TargetCardInLibrary(0, 2, filter); Player player = game.getPlayer(source.getControllerId()); if (player != null && player.searchLibrary(target, game)) { diff --git a/Mage.Sets/src/mage/cards/l/LegacysAllure.java b/Mage.Sets/src/mage/cards/l/LegacysAllure.java index bb8778eb8a..e520cbbf03 100644 --- a/Mage.Sets/src/mage/cards/l/LegacysAllure.java +++ b/Mage.Sets/src/mage/cards/l/LegacysAllure.java @@ -27,8 +27,8 @@ */ package mage.cards.l; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -41,15 +41,15 @@ import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.Counter; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public class LegacysAllure extends CardImpl { @@ -57,7 +57,7 @@ public class LegacysAllure extends CardImpl { private final UUID originalId; public LegacysAllure(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); // At the beginning of your upkeep, you may put a treasure counter on Legacy's Allure. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(new Counter("treasure")), TargetController.YOU, true)); @@ -81,7 +81,7 @@ public class LegacysAllure extends CardImpl { if (sourcePermanent != null) { int numbCounters = sourcePermanent.getCounters(game).getCount("treasure"); FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on " + getLogName()); - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, numbCounters + 1)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, numbCounters + 1)); ability.getTargets().clear(); ability.getTargets().add(new TargetCreaturePermanent(filter)); } diff --git a/Mage.Sets/src/mage/cards/l/LeoninSquire.java b/Mage.Sets/src/mage/cards/l/LeoninSquire.java index 4e8586ef7e..16af11a896 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninSquire.java +++ b/Mage.Sets/src/mage/cards/l/LeoninSquire.java @@ -27,19 +27,20 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author Plopman @@ -48,7 +49,7 @@ public class LeoninSquire extends CardImpl { private static final FilterArtifactCard filter = new FilterArtifactCard("target artifact card with converted mana cost 1 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public LeoninSquire(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java b/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java index ad87bb6309..f81614e165 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java +++ b/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java @@ -28,6 +28,7 @@ package mage.cards.l; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.LoyaltyAbility; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; @@ -43,7 +44,6 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreaturePermanent; @@ -103,7 +103,7 @@ public class LilianaDefiantNecromancer extends CardImpl { } } FilterCard newFilter = filter.copy(); - newFilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc)); + newFilter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, cmc)); ability.getTargets().clear(); ability.addTarget(new TargetCardInYourGraveyard(newFilter)); } diff --git a/Mage.Sets/src/mage/cards/l/LinSivviDefiantHero.java b/Mage.Sets/src/mage/cards/l/LinSivviDefiantHero.java index 3962a517c8..bbbfa2c457 100644 --- a/Mage.Sets/src/mage/cards/l/LinSivviDefiantHero.java +++ b/Mage.Sets/src/mage/cards/l/LinSivviDefiantHero.java @@ -27,9 +27,9 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -40,7 +40,6 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -51,6 +50,8 @@ import mage.players.Player; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author fireshoes @@ -123,7 +124,7 @@ class LinSivviDefiantHeroEffect extends OneShotEffect { int xCost = source.getManaCostsToPay().getX(); FilterPermanentCard filter = new FilterPermanentCard(new StringBuilder("Rebel permanent card with converted mana cost ").append(xCost).append(" or less").toString()); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, xCost + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, xCost + 1)); filter.add(new SubtypePredicate("Rebel")); TargetCardInLibrary target = new TargetCardInLibrary(filter); diff --git a/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java b/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java index 05687cad4b..17a4f3a0e0 100644 --- a/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java +++ b/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java @@ -27,9 +27,9 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.abilityword.GrandeurAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -42,7 +42,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -56,6 +55,8 @@ import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author emerald000 @@ -97,7 +98,7 @@ public class LinessaZephyrMage extends CardImpl { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost " + xValue); - filter.add(new ConvertedManaCostPredicate(ComparisonType.Equal, xValue)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); ability.getTargets().add(new TargetCreaturePermanent(filter)); } } diff --git a/Mage.Sets/src/mage/cards/l/Liquify.java b/Mage.Sets/src/mage/cards/l/Liquify.java index 3030960f08..bdbafcc9d9 100644 --- a/Mage.Sets/src/mage/cards/l/Liquify.java +++ b/Mage.Sets/src/mage/cards/l/Liquify.java @@ -27,17 +27,18 @@ */ package mage.cards.l; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.CounterTargetWithReplacementEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author LoneFox @@ -47,7 +48,7 @@ public class Liquify extends CardImpl { private static final FilterSpell filter = new FilterSpell("spell with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public Liquify(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MantaRay.java b/Mage.Sets/src/mage/cards/m/MantaRay.java index b73b432755..28e80a1643 100644 --- a/Mage.Sets/src/mage/cards/m/MantaRay.java +++ b/Mage.Sets/src/mage/cards/m/MantaRay.java @@ -27,9 +27,9 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.common.SimpleStaticAbility; @@ -41,12 +41,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -73,7 +74,7 @@ public class MantaRay extends CardImpl { // When you control no Islands, sacrifice Manta Ray. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/m/MarbleTitan.java b/Mage.Sets/src/mage/cards/m/MarbleTitan.java index f7e7f1710f..c6d7e5c6e3 100644 --- a/Mage.Sets/src/mage/cards/m/MarbleTitan.java +++ b/Mage.Sets/src/mage/cards/m/MarbleTitan.java @@ -27,8 +27,8 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; import mage.cards.CardImpl; @@ -37,10 +37,11 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author LoneFox @@ -50,7 +51,7 @@ public class MarbleTitan extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures with power 3 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public MarbleTitan(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/Marjhan.java b/Mage.Sets/src/mage/cards/m/Marjhan.java index 48b632b683..bf17eb6f31 100644 --- a/Mage.Sets/src/mage/cards/m/Marjhan.java +++ b/Mage.Sets/src/mage/cards/m/Marjhan.java @@ -27,9 +27,9 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -51,7 +51,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.PhaseStep; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterAttackingCreature; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; @@ -59,6 +58,8 @@ import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -98,7 +99,7 @@ public class Marjhan extends CardImpl { // When you control no Islands, sacrifice Marjhan. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/m/MatterReshaper.java b/Mage.Sets/src/mage/cards/m/MatterReshaper.java index 149b042136..5cf18f530e 100644 --- a/Mage.Sets/src/mage/cards/m/MatterReshaper.java +++ b/Mage.Sets/src/mage/cards/m/MatterReshaper.java @@ -27,10 +27,10 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -40,12 +40,13 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author fireshoes @@ -96,7 +97,7 @@ class MatterReshaperEffect extends OneShotEffect { } controller.revealCards(sourceObject.getIdName(), new CardsImpl(card), game); FilterPermanentCard filter = new FilterPermanentCard("permanent card with converted mana cost 3 or less"); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); if (filter.match(card, game)) { if (controller.chooseUse(Outcome.PutCardInPlay, "Put " + card.getName() + " onto the battlefield (otherwise put in hand)?", source, game)) { card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId(), false); diff --git a/Mage.Sets/src/mage/cards/m/MayaelTheAnima.java b/Mage.Sets/src/mage/cards/m/MayaelTheAnima.java index 4ef91d9e14..8e9cdd0d28 100644 --- a/Mage.Sets/src/mage/cards/m/MayaelTheAnima.java +++ b/Mage.Sets/src/mage/cards/m/MayaelTheAnima.java @@ -28,6 +28,7 @@ package mage.cards.m; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -37,7 +38,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.PowerPredicate; @@ -53,7 +53,7 @@ public class MayaelTheAnima extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with power 5 or greater"); static { filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public MayaelTheAnima(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MayaelsAria.java b/Mage.Sets/src/mage/cards/m/MayaelsAria.java index 966ac022bc..b57ceef952 100644 --- a/Mage.Sets/src/mage/cards/m/MayaelsAria.java +++ b/Mage.Sets/src/mage/cards/m/MayaelsAria.java @@ -27,8 +27,8 @@ */ package mage.cards.m; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -38,13 +38,14 @@ import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -94,7 +95,7 @@ class MayaelsAriaEffect extends OneShotEffect { } // put a +1/+1 counter on each creature you control if you control a creature with power 5 or greater. FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) { for (Permanent creature : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) { creature.addCounters(CounterType.P1P1.createInstance(), source, game); @@ -104,14 +105,14 @@ class MayaelsAriaEffect extends OneShotEffect { // Then you gain 10 life if you control a creature with power 10 or greater. filter = new FilterCreaturePermanent(); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 9)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 9)); if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) { controller.gainLife(10, game); } // Then you win the game if you control a creature with power 20 or greater. filter = new FilterCreaturePermanent(); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 19)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 19)); if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) { controller.won(game); } diff --git a/Mage.Sets/src/mage/cards/m/Meekstone.java b/Mage.Sets/src/mage/cards/m/Meekstone.java index 63065cff1a..581a09afe1 100644 --- a/Mage.Sets/src/mage/cards/m/Meekstone.java +++ b/Mage.Sets/src/mage/cards/m/Meekstone.java @@ -27,7 +27,7 @@ */ package mage.cards.m; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; import mage.cards.CardImpl; @@ -36,10 +36,11 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author Quercitron @@ -49,7 +50,7 @@ public class Meekstone extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures with power 3 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 2)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public Meekstone(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MentalMisstep.java b/Mage.Sets/src/mage/cards/m/MentalMisstep.java index ef520c581d..be19f82de4 100644 --- a/Mage.Sets/src/mage/cards/m/MentalMisstep.java +++ b/Mage.Sets/src/mage/cards/m/MentalMisstep.java @@ -27,16 +27,17 @@ */ package mage.cards.m; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class MentalMisstep extends CardImpl { private static final FilterSpell FILTER = new FilterSpell("spell with converted mana cost 1"); static { - FILTER.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, 1)); + FILTER.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, 1)); } public MentalMisstep(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MentorOfTheMeek.java b/Mage.Sets/src/mage/cards/m/MentorOfTheMeek.java index af6541f3a1..e5695ff9ab 100644 --- a/Mage.Sets/src/mage/cards/m/MentorOfTheMeek.java +++ b/Mage.Sets/src/mage/cards/m/MentorOfTheMeek.java @@ -27,9 +27,9 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; @@ -39,12 +39,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * @author Loki */ @@ -54,7 +55,7 @@ public class MentorOfTheMeek extends CardImpl { static { filter.add(new AnotherPredicate()); - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public MentorOfTheMeek(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MerchantShip.java b/Mage.Sets/src/mage/cards/m/MerchantShip.java index 7bfb88bc07..9f883be7db 100644 --- a/Mage.Sets/src/mage/cards/m/MerchantShip.java +++ b/Mage.Sets/src/mage/cards/m/MerchantShip.java @@ -27,8 +27,8 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -39,9 +39,10 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -60,7 +61,7 @@ public class MerchantShip extends CardImpl { this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new GainLifeEffect(2))); // When you control no Islands, sacrifice Merchant Ship. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/m/MidnightScavengers.java b/Mage.Sets/src/mage/cards/m/MidnightScavengers.java index 6d015586de..913565afb6 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightScavengers.java +++ b/Mage.Sets/src/mage/cards/m/MidnightScavengers.java @@ -27,9 +27,9 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.InfoEffect; @@ -38,12 +38,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.Target; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author fireshoes @@ -53,7 +54,7 @@ public class MidnightScavengers extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public MidnightScavengers(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MightOfTheWild.java b/Mage.Sets/src/mage/cards/m/MightOfTheWild.java index 28cd975da6..bd59ae941d 100644 --- a/Mage.Sets/src/mage/cards/m/MightOfTheWild.java +++ b/Mage.Sets/src/mage/cards/m/MightOfTheWild.java @@ -27,7 +27,7 @@ */ package mage.cards.m; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.combat.CantBlockAllEffect; @@ -37,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; @@ -46,6 +45,8 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Styxo @@ -56,7 +57,7 @@ public class MightOfTheWild extends CardImpl { private static final FilterPermanent filterMode2 = new FilterPermanent("artifact or enchantment"); static { - filterMode1.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filterMode1.add(new PowerPredicate(CountType.FEWER_THAN, 4)); filterMode2.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT))); } diff --git a/Mage.Sets/src/mage/cards/m/MightyEmergence.java b/Mage.Sets/src/mage/cards/m/MightyEmergence.java index 118ac07206..e4924b16db 100644 --- a/Mage.Sets/src/mage/cards/m/MightyEmergence.java +++ b/Mage.Sets/src/mage/cards/m/MightyEmergence.java @@ -27,7 +27,7 @@ */ package mage.cards.m; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; @@ -37,10 +37,11 @@ import mage.constants.CardType; import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author Plopman @@ -50,7 +51,7 @@ public class MightyEmergence extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a creature with power 5 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public MightyEmergence(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MinamoSightbender.java b/Mage.Sets/src/mage/cards/m/MinamoSightbender.java index 251f6bfccc..56e2dc4b87 100644 --- a/Mage.Sets/src/mage/cards/m/MinamoSightbender.java +++ b/Mage.Sets/src/mage/cards/m/MinamoSightbender.java @@ -27,9 +27,9 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -39,13 +39,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -81,7 +82,7 @@ public class MinamoSightbender extends CardImpl { int manaX = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterCreaturePermanent newFilter = new FilterCreaturePermanent(new StringBuilder("creature with power ").append(manaX).append(" or less").toString()); - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, manaX + 1)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, manaX + 1)); Target target = new TargetCreaturePermanent(newFilter); ability.addTarget(target); break; diff --git a/Mage.Sets/src/mage/cards/m/MistmeadowSkulk.java b/Mage.Sets/src/mage/cards/m/MistmeadowSkulk.java index d04e728f9c..a87cbc4f13 100644 --- a/Mage.Sets/src/mage/cards/m/MistmeadowSkulk.java +++ b/Mage.Sets/src/mage/cards/m/MistmeadowSkulk.java @@ -27,17 +27,18 @@ */ package mage.cards.m; -import java.util.UUID; -import mage.constants.CardType; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import java.util.UUID; + /** * * @author North @@ -47,7 +48,7 @@ public class MistmeadowSkulk extends CardImpl { private static final FilterCard filter = new FilterCard("converted mana cost 3 or greater"); static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 2)); } public MistmeadowSkulk(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MobRule.java b/Mage.Sets/src/mage/cards/m/MobRule.java index e3262fe1b4..4bc8fbbf07 100644 --- a/Mage.Sets/src/mage/cards/m/MobRule.java +++ b/Mage.Sets/src/mage/cards/m/MobRule.java @@ -27,9 +27,8 @@ */ package mage.cards.m; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffectImpl; @@ -38,18 +37,16 @@ import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.filter.Filter.ComparisonType; +import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; +import java.util.List; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -61,11 +58,11 @@ public class MobRule extends CardImpl { // Choose one // Gain control of all creatures with power 4 or greater until end of turn. Untap those creatures. They gain haste until end of turn. - this.getSpellAbility().addEffect(new MobRuleEffect(ComparisonType.GreaterThan, 3)); + this.getSpellAbility().addEffect(new MobRuleEffect(CountType.MORE_THAN, 3)); // Gain control of all creatures with power 3 or less until end of turn. Untap those creatures. They gain haste until end of turn. Mode mode = new Mode(); - mode.getEffects().add(new MobRuleEffect(ComparisonType.LessThan, 4)); + mode.getEffects().add(new MobRuleEffect(CountType.FEWER_THAN, 4)); this.getSpellAbility().addMode(mode); } @@ -81,14 +78,14 @@ public class MobRule extends CardImpl { class MobRuleEffect extends OneShotEffect { - ComparisonType type = null; + CountType type = null; int power = 0; - public MobRuleEffect(ComparisonType type, int power) { + public MobRuleEffect(CountType type, int power) { super(Outcome.GainControl); this.type = type; this.power = power; - if (type == ComparisonType.GreaterThan) { + if (type == CountType.MORE_THAN) { this.staticText = "Gain control of all creatures with power 4 or greater until end of turn. Untap those creatures. They gain haste until end of turn"; } else { this.staticText = "Gain control of all creatures with power 3 or less until end of turn. Untap those creatures. They gain haste until end of turn"; diff --git a/Mage.Sets/src/mage/cards/m/MoggJailer.java b/Mage.Sets/src/mage/cards/m/MoggJailer.java index f55481cb4a..a22eb6f339 100644 --- a/Mage.Sets/src/mage/cards/m/MoggJailer.java +++ b/Mage.Sets/src/mage/cards/m/MoggJailer.java @@ -27,8 +27,8 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.CantAttackIfDefenderControlsPermanent; @@ -36,27 +36,26 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.TappedPredicate; -/** - * - * @author BursegSardaukar +import java.util.UUID; +/** + * @author BursegSardaukar */ public class MoggJailer extends CardImpl { static final private FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature with power 2 or less"); static { - filter.add(Predicates.and(new PowerPredicate(Filter.ComparisonType.LessThan, 2), Predicates.not(new TappedPredicate()))); + filter.add(Predicates.and(new PowerPredicate(CountType.FEWER_THAN, 2), Predicates.not(new TappedPredicate()))); } - + public MoggJailer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add("Goblin"); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/m/Molder.java b/Mage.Sets/src/mage/cards/m/Molder.java index 4e69726b45..bf64ef75fe 100644 --- a/Mage.Sets/src/mage/cards/m/Molder.java +++ b/Mage.Sets/src/mage/cards/m/Molder.java @@ -27,8 +27,8 @@ */ package mage.cards.m; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,12 +36,13 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -63,7 +64,7 @@ public class Molder extends CardImpl { ability.getTargets().clear(); int xValue = ability.getManaCostsToPay().getX(); FilterArtifactOrEnchantmentPermanent filter = new FilterArtifactOrEnchantmentPermanent("artifact or enchantment with converted mana cost X"); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); ability.addTarget(new TargetPermanent(filter)); } } diff --git a/Mage.Sets/src/mage/cards/m/Mosstodon.java b/Mage.Sets/src/mage/cards/m/Mosstodon.java index 4cb76b90ec..2124aa54b0 100644 --- a/Mage.Sets/src/mage/cards/m/Mosstodon.java +++ b/Mage.Sets/src/mage/cards/m/Mosstodon.java @@ -27,22 +27,23 @@ */ package mage.cards.m; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author North @@ -52,7 +53,7 @@ public class Mosstodon extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public Mosstodon(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MouthFeed.java b/Mage.Sets/src/mage/cards/m/MouthFeed.java index 0e491bed9d..544f3f4f05 100644 --- a/Mage.Sets/src/mage/cards/m/MouthFeed.java +++ b/Mage.Sets/src/mage/cards/m/MouthFeed.java @@ -1,5 +1,6 @@ package mage.cards.m; +import mage.abilities.CountType; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; @@ -9,7 +10,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.SplitCard; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.permanent.token.HippoToken2; @@ -23,7 +23,7 @@ public class MouthFeed extends SplitCard { private static final FilterControlledCreaturePermanent filterCreaturesYouControlPower3orGreater = new FilterControlledCreaturePermanent("creature you control with power 3 or greater."); static { - filterCreaturesYouControlPower3orGreater.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filterCreaturesYouControlPower3orGreater.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public MouthFeed(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/n/NaturalState.java b/Mage.Sets/src/mage/cards/n/NaturalState.java index c4090f3974..c0dc08bcbd 100644 --- a/Mage.Sets/src/mage/cards/n/NaturalState.java +++ b/Mage.Sets/src/mage/cards/n/NaturalState.java @@ -27,16 +27,17 @@ */ package mage.cards.n; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class NaturalState extends CardImpl { private static final FilterArtifactOrEnchantmentPermanent filter = new FilterArtifactOrEnchantmentPermanent("artifact or enchantment with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public NaturalState(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/n/Necroplasm.java b/Mage.Sets/src/mage/cards/n/Necroplasm.java index 9ecbdf7c72..2a3f3db2ca 100644 --- a/Mage.Sets/src/mage/cards/n/Necroplasm.java +++ b/Mage.Sets/src/mage/cards/n/Necroplasm.java @@ -27,9 +27,9 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -41,13 +41,14 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author emerald000 @@ -104,7 +105,7 @@ class NecroplasmEffect extends OneShotEffect { if (player != null && sourcePermanent != null) { int numCounters = sourcePermanent.getCounters(game).getCount(CounterType.P1P1); FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.add(new ConvertedManaCostPredicate(ComparisonType.Equal, numCounters)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, numCounters)); for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { permanent.destroy(source.getSourceId(), game, false); } diff --git a/Mage.Sets/src/mage/cards/n/NightDealings.java b/Mage.Sets/src/mage/cards/n/NightDealings.java index 41dcfba7e6..7d3f88bdcf 100644 --- a/Mage.Sets/src/mage/cards/n/NightDealings.java +++ b/Mage.Sets/src/mage/cards/n/NightDealings.java @@ -28,6 +28,7 @@ package mage.cards.n; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.Cost; @@ -39,7 +40,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterNonlandCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -52,13 +52,12 @@ import java.util.Objects; import java.util.UUID; /** - * * @author Loki */ public class NightDealings extends CardImpl { public NightDealings(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}"); // Whenever a source you control deals damage to another player, put that many theft counters on Night Dealings. this.addAbility((new NightDealingsTriggeredAbility())); @@ -180,7 +179,7 @@ public class NightDealings extends CardImpl { } FilterNonlandCard filter = new FilterNonlandCard("nonland card with converted mana cost X = " + cmc); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, cmc)); TargetCardInLibrary target = new TargetCardInLibrary(filter); if (player.searchLibrary(target, game)) { diff --git a/Mage.Sets/src/mage/cards/n/NoContest.java b/Mage.Sets/src/mage/cards/n/NoContest.java index 1c6ce88e9c..cdc53c9c2c 100644 --- a/Mage.Sets/src/mage/cards/n/NoContest.java +++ b/Mage.Sets/src/mage/cards/n/NoContest.java @@ -27,15 +27,13 @@ */ package mage.cards.n; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.common.FightTargetsEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -44,14 +42,16 @@ import mage.game.stack.Spell; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.Set; +import java.util.UUID; + /** - * * @author Styxo */ public class NoContest extends CardImpl { public NoContest(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // Target creature you control fights target creature with power less than its power. this.getSpellAbility().addEffect(new FightTargetsEffect()); @@ -91,7 +91,7 @@ class TargetCreatureWithLessPowerPermanent extends TargetPermanent { } // now check, if another creature has less power and can be targeted FilterCreaturePermanent checkFilter = new FilterCreaturePermanent(); - checkFilter.add(new PowerPredicate(Filter.ComparisonType.LessThan, maxPower)); + checkFilter.add(new PowerPredicate(CountType.FEWER_THAN, maxPower)); for (Permanent permanent : game.getBattlefield().getActivePermanents(checkFilter, sourceControllerId, sourceId, game)) { if (permanent.canBeTargetedBy(sourceCard, sourceControllerId, game)) { return true; @@ -109,7 +109,7 @@ class TargetCreatureWithLessPowerPermanent extends TargetPermanent { int power = firstTarget.getPower().getValue(); // overwrite the filter with the power predicate filter = new FilterCreaturePermanent("creature with power less than " + power); - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, power)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, power)); } } return super.possibleTargets(sourceId, sourceControllerId, game); diff --git a/Mage.Sets/src/mage/cards/n/NotOfThisWorld.java b/Mage.Sets/src/mage/cards/n/NotOfThisWorld.java index 69d7fe6d38..dd1fd5d64f 100644 --- a/Mage.Sets/src/mage/cards/n/NotOfThisWorld.java +++ b/Mage.Sets/src/mage/cards/n/NotOfThisWorld.java @@ -27,10 +27,8 @@ */ package mage.cards.n; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; import mage.abilities.effects.common.CounterTargetEffect; @@ -53,14 +51,17 @@ import mage.target.Target; import mage.target.TargetObject; import mage.target.Targets; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** - * * @author Rafbill */ public class NotOfThisWorld extends CardImpl { public NotOfThisWorld(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{7}"); + super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{7}"); this.subtype.add("Eldrazi"); // Counter target spell or ability that targets a permanent you control. @@ -132,7 +133,7 @@ class TargetStackObjectTargetingControlledPermanent extends TargetObject { @Override public Set possibleTargets(UUID sourceId, UUID sourceControllerId, - Game game) { + Game game) { return possibleTargets(sourceControllerId, game); } @@ -169,7 +170,7 @@ class NotOfThisWorldCondition implements Condition { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control with power 7 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 6)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 6)); filter.add(new ControllerPredicate(TargetController.YOU)); } diff --git a/Mage.Sets/src/mage/cards/n/NoxiousDragon.java b/Mage.Sets/src/mage/cards/n/NoxiousDragon.java index 288739b6d2..5ffc1a9ba7 100644 --- a/Mage.Sets/src/mage/cards/n/NoxiousDragon.java +++ b/Mage.Sets/src/mage/cards/n/NoxiousDragon.java @@ -27,20 +27,21 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +51,7 @@ public class NoxiousDragon extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public NoxiousDragon(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/ONaginata.java b/Mage.Sets/src/mage/cards/o/ONaginata.java index 34c592ac63..ce1b6d6af1 100644 --- a/Mage.Sets/src/mage/cards/o/ONaginata.java +++ b/Mage.Sets/src/mage/cards/o/ONaginata.java @@ -27,8 +27,8 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.AttachableToRestrictedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -43,12 +43,13 @@ import mage.constants.AttachmentType; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.Target; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,7 +59,7 @@ public class ONaginata extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with 3 or more power"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public ONaginata(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/OjutaisCommand.java b/Mage.Sets/src/mage/cards/o/OjutaisCommand.java index 18edb0a484..5617ffe783 100644 --- a/Mage.Sets/src/mage/cards/o/OjutaisCommand.java +++ b/Mage.Sets/src/mage/cards/o/OjutaisCommand.java @@ -27,7 +27,7 @@ */ package mage.cards.o; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -36,7 +36,6 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.FilterSpell; import mage.filter.common.FilterCreatureCard; @@ -45,6 +44,8 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetSpell; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author fireshoes @@ -53,7 +54,7 @@ public class OjutaisCommand extends CardImpl { private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } private static final FilterSpell filter2 = new FilterSpell("creature spell"); diff --git a/Mage.Sets/src/mage/cards/o/OrcishVeteran.java b/Mage.Sets/src/mage/cards/o/OrcishVeteran.java index 1428430019..b6e5fa271c 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishVeteran.java +++ b/Mage.Sets/src/mage/cards/o/OrcishVeteran.java @@ -27,9 +27,9 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -41,11 +41,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -56,7 +57,7 @@ public class OrcishVeteran extends CardImpl { static { filter.add(new ColorPredicate(ObjectColor.WHITE)); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 1)); } public OrcishVeteran(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/OrderOfWhiteclay.java b/Mage.Sets/src/mage/cards/o/OrderOfWhiteclay.java index 68a43e95dc..e4fef8656e 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfWhiteclay.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfWhiteclay.java @@ -27,9 +27,9 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.UntapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -38,12 +38,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.Target; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -54,7 +55,7 @@ public class OrderOfWhiteclay extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public OrderOfWhiteclay(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/Orgg.java b/Mage.Sets/src/mage/cards/o/Orgg.java index 5d71578a36..abcded634f 100644 --- a/Mage.Sets/src/mage/cards/o/Orgg.java +++ b/Mage.Sets/src/mage/cards/o/Orgg.java @@ -27,8 +27,8 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.CantAttackIfDefenderControlsPermanent; @@ -38,12 +38,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.TappedPredicate; +import java.util.UUID; + /** * * @author MarcoMarin @@ -54,8 +55,8 @@ public class Orgg extends CardImpl { static final private FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures with power 3 or greater"); static { - filter.add(Predicates.and(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2), Predicates.not(new TappedPredicate()))); - filter2.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(Predicates.and(new PowerPredicate(CountType.MORE_THAN, 2), Predicates.not(new TappedPredicate()))); + filter2.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public Orgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); diff --git a/Mage.Sets/src/mage/cards/o/OrzhovCharm.java b/Mage.Sets/src/mage/cards/o/OrzhovCharm.java index 3892699c5b..17c200d1e4 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovCharm.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovCharm.java @@ -27,18 +27,16 @@ */ package mage.cards.o; -import java.util.LinkedList; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -49,6 +47,9 @@ import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.LinkedList; +import java.util.UUID; + /** * * @author LevelX2 @@ -57,7 +58,7 @@ public class OrzhovCharm extends CardImpl { private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 1 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public OrzhovCharm(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/OutlandBoar.java b/Mage.Sets/src/mage/cards/o/OutlandBoar.java index 18b42c630a..0519963e8f 100644 --- a/Mage.Sets/src/mage/cards/o/OutlandBoar.java +++ b/Mage.Sets/src/mage/cards/o/OutlandBoar.java @@ -27,18 +27,19 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -48,7 +49,7 @@ public class OutlandBoar extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public OutlandBoar(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/Overload.java b/Mage.Sets/src/mage/cards/o/Overload.java index d7e90d3957..decac7c540 100644 --- a/Mage.Sets/src/mage/cards/o/Overload.java +++ b/Mage.Sets/src/mage/cards/o/Overload.java @@ -27,8 +27,8 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.condition.common.KickedCondition; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,12 +36,13 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.common.TargetArtifactPermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -52,8 +53,8 @@ public class Overload extends CardImpl { private static final FilterArtifactPermanent filter5 = new FilterArtifactPermanent("artifact if its converted mana cost is 5 or less"); static { - filter2.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); - filter5.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + filter2.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); + filter5.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public Overload(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/p/Paleoloth.java b/Mage.Sets/src/mage/cards/p/Paleoloth.java index 4d0793f4f3..eced58d7bf 100644 --- a/Mage.Sets/src/mage/cards/p/Paleoloth.java +++ b/Mage.Sets/src/mage/cards/p/Paleoloth.java @@ -27,22 +27,23 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -52,7 +53,7 @@ public class Paleoloth extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature with power 5 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); filter.add(new AnotherPredicate()); } diff --git a/Mage.Sets/src/mage/cards/p/PanopticMirror.java b/Mage.Sets/src/mage/cards/p/PanopticMirror.java index 9b200b3410..b0dd19533f 100644 --- a/Mage.Sets/src/mage/cards/p/PanopticMirror.java +++ b/Mage.Sets/src/mage/cards/p/PanopticMirror.java @@ -27,23 +27,18 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.VariableManaCost; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardsImpl; -import mage.cards.CardSetInfo; -import mage.cards.SplitCard; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -54,6 +49,8 @@ import mage.target.TargetCard; import mage.target.common.TargetCardInHand; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author Plopman @@ -103,7 +100,7 @@ class PanopticMirrorExileEffect extends OneShotEffect { int count = source.getManaCostsToPay().getX(); FilterInstantOrSorceryCard filter = new FilterInstantOrSorceryCard("instant or sorcery card with converted mana cost equal to " + count); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, count)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, count)); String choiceText = "Exile a " + filter.getMessage() + " from your hand?"; Player player = game.getPlayer(source.getControllerId()); diff --git a/Mage.Sets/src/mage/cards/p/Pendelhaven.java b/Mage.Sets/src/mage/cards/p/Pendelhaven.java index b93be6d222..24ec78df3b 100644 --- a/Mage.Sets/src/mage/cards/p/Pendelhaven.java +++ b/Mage.Sets/src/mage/cards/p/Pendelhaven.java @@ -28,6 +28,7 @@ package mage.cards.p; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.continuous.BoostTargetEffect; @@ -38,7 +39,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate; @@ -47,19 +47,18 @@ import mage.target.common.TargetCreaturePermanent; import java.util.UUID; /** - * * @author Loki */ public class Pendelhaven extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("1/1 creature"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.Equal, 1)); - filter.add(new ToughnessPredicate(Filter.ComparisonType.Equal, 1)); + filter.add(new PowerPredicate(CountType.EQUAL_TO, 1)); + filter.add(new ToughnessPredicate(CountType.EQUAL_TO, 1)); } public Pendelhaven(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); addSuperType(SuperType.LEGENDARY); // {tap}: Add {G} to your mana pool. diff --git a/Mage.Sets/src/mage/cards/p/PendelhavenElder.java b/Mage.Sets/src/mage/cards/p/PendelhavenElder.java index db5594ab10..1094e60046 100644 --- a/Mage.Sets/src/mage/cards/p/PendelhavenElder.java +++ b/Mage.Sets/src/mage/cards/p/PendelhavenElder.java @@ -27,8 +27,8 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.continuous.BoostAllEffect; @@ -36,13 +36,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.constants.TargetController; + +import java.util.UUID; /** * @@ -52,8 +53,8 @@ public class PendelhavenElder extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each 1/1 creature you control"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.Equal, 1)); - filter.add(new ToughnessPredicate(Filter.ComparisonType.Equal, 1)); + filter.add(new PowerPredicate(CountType.EQUAL_TO, 1)); + filter.add(new ToughnessPredicate(CountType.EQUAL_TO, 1)); filter.add(new ControllerPredicate(TargetController.YOU)); } diff --git a/Mage.Sets/src/mage/cards/p/PerniciousDeed.java b/Mage.Sets/src/mage/cards/p/PerniciousDeed.java index b7c8b60085..bbe3417a58 100644 --- a/Mage.Sets/src/mage/cards/p/PerniciousDeed.java +++ b/Mage.Sets/src/mage/cards/p/PerniciousDeed.java @@ -27,19 +27,17 @@ */ package mage.cards.p; -import java.util.UUID; - -import mage.constants.CardType; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.VariableManaCost; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -47,16 +45,16 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** - * * @author Plopman */ public class PerniciousDeed extends CardImpl { - - + public PerniciousDeed(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{G}"); // {X}, Sacrifice Pernicious Deed: Destroy each artifact, creature, and enchantment with converted mana cost X or less. @@ -96,18 +94,18 @@ class PerniciousDeedEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - - + + FilterPermanent filter = new FilterPermanent("artifacts, creatures, and enchantments"); - - + + filter.add(Predicates.or( new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.ENCHANTMENT))); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, source.getManaCostsToPay().getX() + 1)); + - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { permanent.destroy(source.getSourceId(), game, false); } diff --git a/Mage.Sets/src/mage/cards/p/PillarOfLight.java b/Mage.Sets/src/mage/cards/p/PillarOfLight.java index e63b644fc3..9699c56e3b 100644 --- a/Mage.Sets/src/mage/cards/p/PillarOfLight.java +++ b/Mage.Sets/src/mage/cards/p/PillarOfLight.java @@ -27,16 +27,17 @@ */ package mage.cards.p; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class PillarOfLight extends CardImpl { static private final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 4 or greater"); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 3)); } public PillarOfLight(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/p/PirateShip.java b/Mage.Sets/src/mage/cards/p/PirateShip.java index 9e6bdcef42..2907d21156 100644 --- a/Mage.Sets/src/mage/cards/p/PirateShip.java +++ b/Mage.Sets/src/mage/cards/p/PirateShip.java @@ -27,9 +27,9 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -41,19 +41,18 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** - * * @author KholdFuzion - * */ public class PirateShip extends CardImpl { public PirateShip(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); this.subtype.add("Human"); this.subtype.add("Pirate"); @@ -68,7 +67,7 @@ public class PirateShip extends CardImpl { this.addAbility(ability); // When you control no Islands, sacrifice Pirate Ship. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/p/Plaguebearer.java b/Mage.Sets/src/mage/cards/p/Plaguebearer.java index 0394a64ad2..aed808942d 100644 --- a/Mage.Sets/src/mage/cards/p/Plaguebearer.java +++ b/Mage.Sets/src/mage/cards/p/Plaguebearer.java @@ -27,10 +27,10 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; @@ -38,7 +38,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -47,6 +46,8 @@ import mage.game.Game; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author spjspj @@ -79,7 +80,7 @@ public class Plaguebearer extends CardImpl { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("nonblack creature with converted mana cost ").append(xValue).toString()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); Target target = new TargetPermanent(filter); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/cards/p/PorphyryNodes.java b/Mage.Sets/src/mage/cards/p/PorphyryNodes.java index 812c51c459..11ed59078d 100644 --- a/Mage.Sets/src/mage/cards/p/PorphyryNodes.java +++ b/Mage.Sets/src/mage/cards/p/PorphyryNodes.java @@ -27,8 +27,8 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.StateTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -39,7 +39,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -49,6 +48,8 @@ import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -116,7 +117,7 @@ class PorphyryNodesEffect extends OneShotEffect { } if (multipleExist) { FilterCreaturePermanent filter = new FilterCreaturePermanent("one of the creatures with the least power"); - filter.add(new PowerPredicate(Filter.ComparisonType.Equal, leastPower)); + filter.add(new PowerPredicate(CountType.EQUAL_TO, leastPower)); Target target = new TargetPermanent(filter); target.setNotTarget(true); if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { diff --git a/Mage.Sets/src/mage/cards/p/PostmortemLunge.java b/Mage.Sets/src/mage/cards/p/PostmortemLunge.java index e45c17e578..778637feef 100644 --- a/Mage.Sets/src/mage/cards/p/PostmortemLunge.java +++ b/Mage.Sets/src/mage/cards/p/PostmortemLunge.java @@ -27,8 +27,8 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; @@ -38,12 +38,7 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AbilityType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.Filter; +import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -53,14 +48,15 @@ import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** - * * @author North */ public class PostmortemLunge extends CardImpl { public PostmortemLunge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B/P}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B/P}"); // Return target creature card with converted mana cost X from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step. this.getSpellAbility().addEffect(new PostmortemLungeEffect()); @@ -82,7 +78,7 @@ public class PostmortemLunge extends CardImpl { ability.getTargets().clear(); int xValue = ability.getManaCostsToPay().getX(); FilterCard filter = new FilterCreatureCard("creature card with converted mana cost " + xValue + " or less from your graveyard"); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, xValue + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, xValue + 1)); ability.getTargets().add(new TargetCardInYourGraveyard(filter)); } } diff --git a/Mage.Sets/src/mage/cards/p/ProclamationOfRebirth.java b/Mage.Sets/src/mage/cards/p/ProclamationOfRebirth.java index 06c1fbefc0..cb7d5246d5 100644 --- a/Mage.Sets/src/mage/cards/p/ProclamationOfRebirth.java +++ b/Mage.Sets/src/mage/cards/p/ProclamationOfRebirth.java @@ -27,18 +27,19 @@ */ package mage.cards.p; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.keyword.ForecastAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author Plopman @@ -48,8 +49,8 @@ public class ProclamationOfRebirth extends CardImpl { private static final FilterCreatureCard filter1 = new FilterCreatureCard("creature card with converted mana cost {1} or less from your graveyard"); private static final FilterCreatureCard filter3 = new FilterCreatureCard("creature cards with converted mana cost {1} or less from your graveyard"); static { - filter1.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); - filter3.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); + filter1.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); + filter3.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public ProclamationOfRebirth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}"); diff --git a/Mage.Sets/src/mage/cards/p/ProfaneCommand.java b/Mage.Sets/src/mage/cards/p/ProfaneCommand.java index b8a9a237ce..a0ddf7c210 100644 --- a/Mage.Sets/src/mage/cards/p/ProfaneCommand.java +++ b/Mage.Sets/src/mage/cards/p/ProfaneCommand.java @@ -27,8 +27,8 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; @@ -43,7 +43,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreaturePermanent; @@ -53,14 +52,15 @@ import mage.target.TargetPlayer; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public class ProfaneCommand extends CardImpl { public ProfaneCommand(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{B}"); DynamicValue xValue = new ManacostVariableValue(); @@ -89,20 +89,20 @@ public class ProfaneCommand extends CardImpl { Effect effect = new GainAbilityTargetEffect(FearAbility.getInstance(), Duration.EndOfTurn); effect.setText("Up to X target creatures gain fear until end of turn"); mode.getEffects().add(effect); - mode.getTargets().add(new TargetCreaturePermanent(0,1)); - this.getSpellAbility().addMode(mode); + mode.getTargets().add(new TargetCreaturePermanent(0, 1)); + this.getSpellAbility().addMode(mode); } @Override public void adjustTargets(Ability ability, Game game) { // adjust targets is called for every selected mode Mode mode = ability.getModes().getMode(); - for (Effect effect :mode.getEffects()) { + for (Effect effect : mode.getEffects()) { if (effect instanceof ReturnFromGraveyardToBattlefieldTargetEffect) { mode.getTargets().clear(); int xValue = ability.getManaCostsToPay().getX(); - FilterCard filter = new FilterCreatureCard("creature card with converted mana cost " + xValue + " or less from your graveyard"); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, xValue + 1)); + FilterCard filter = new FilterCreatureCard("creature card with converted mana cost " + xValue + " or less from your graveyard"); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, xValue + 1)); mode.getTargets().add(new TargetCardInYourGraveyard(filter)); } if (effect instanceof GainAbilityTargetEffect) { diff --git a/Mage.Sets/src/mage/cards/p/ProfanerOfTheDead.java b/Mage.Sets/src/mage/cards/p/ProfanerOfTheDead.java index da22140183..8596fda80d 100644 --- a/Mage.Sets/src/mage/cards/p/ProfanerOfTheDead.java +++ b/Mage.Sets/src/mage/cards/p/ProfanerOfTheDead.java @@ -27,9 +27,9 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.ExploitCreatureTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.ExploitAbility; @@ -37,12 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.Cards; import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SetTargetPointer; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.Filter; +import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.permanent.ControllerPredicate; @@ -50,14 +45,15 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** - * * @author LevelX2 */ public class ProfanerOfTheDead extends CardImpl { public ProfanerOfTheDead(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.subtype.add("Naga"); this.subtype.add("Wizard"); this.power = new MageInt(3); @@ -99,7 +95,7 @@ class ProfanerOfTheDeadReturnEffect extends OneShotEffect { if (controller != null && exploitedCreature != null) { FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerPredicate(TargetController.OPPONENT)); - filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, exploitedCreature.getToughness().getValue())); + filter.add(new ToughnessPredicate(CountType.FEWER_THAN, exploitedCreature.getToughness().getValue())); Cards cardsToHand = new CardsImpl(); for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { cardsToHand.add(permanent); diff --git a/Mage.Sets/src/mage/cards/p/Prohibit.java b/Mage.Sets/src/mage/cards/p/Prohibit.java index 7e53ef2425..55c3d9ab48 100644 --- a/Mage.Sets/src/mage/cards/p/Prohibit.java +++ b/Mage.Sets/src/mage/cards/p/Prohibit.java @@ -27,8 +27,8 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.condition.common.KickedCondition; import mage.abilities.effects.common.CounterTargetEffect; @@ -36,12 +36,13 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,8 +53,8 @@ public class Prohibit extends CardImpl { private static final FilterSpell filter4 = new FilterSpell("spell if its converted mana cost is 4 or less"); static { - filter2.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); - filter4.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + filter2.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); + filter4.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public Prohibit(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/p/ProteanHulk.java b/Mage.Sets/src/mage/cards/p/ProteanHulk.java index 7390eb0473..1b0fc98a55 100644 --- a/Mage.Sets/src/mage/cards/p/ProteanHulk.java +++ b/Mage.Sets/src/mage/cards/p/ProteanHulk.java @@ -27,20 +27,15 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -49,6 +44,8 @@ import mage.game.events.GameEvent; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author emerald000 @@ -114,7 +111,7 @@ class ProteanHulkEffect extends OneShotEffect { int librarySearchLimit = event.getAmount(); FilterCard filter = new FilterCreatureCard("number of creature cards with total converted mana cost 6 or less (6 CMC left)"); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, manaCostLeftToFetch + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, manaCostLeftToFetch + 1)); TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter); target.setCardLimit(librarySearchLimit); @@ -133,7 +130,7 @@ class ProteanHulkEffect extends OneShotEffect { } manaCostLeftToFetch -= card.getConvertedManaCost(); filter = new FilterCreatureCard("number of creature cards with total converted mana cost 6 or less (" + manaCostLeftToFetch + " CMC left)"); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, manaCostLeftToFetch + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, manaCostLeftToFetch + 1)); target = new TargetCardInLibrary(0, 1, filter); target.setCardLimit(librarySearchLimit); } diff --git a/Mage.Sets/src/mage/cards/p/PuncturingLight.java b/Mage.Sets/src/mage/cards/p/PuncturingLight.java index 9e9a97cd4a..5853e632a9 100644 --- a/Mage.Sets/src/mage/cards/p/PuncturingLight.java +++ b/Mage.Sets/src/mage/cards/p/PuncturingLight.java @@ -27,17 +27,18 @@ */ package mage.cards.p; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author North @@ -47,7 +48,7 @@ public class PuncturingLight extends CardImpl { private static final FilterCreaturePermanent filter = new FilterAttackingOrBlockingCreature("attacking or blocking creature with power 3 or less"); static { - filter.add(new PowerPredicate(ComparisonType.LessThan, 4)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 4)); } public PuncturingLight(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/p/PuppetsVerdict.java b/Mage.Sets/src/mage/cards/p/PuppetsVerdict.java index 39764dc2c5..a79427423a 100644 --- a/Mage.Sets/src/mage/cards/p/PuppetsVerdict.java +++ b/Mage.Sets/src/mage/cards/p/PuppetsVerdict.java @@ -27,20 +27,21 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author fireshoes @@ -83,14 +84,14 @@ class PuppetsVerdictEffect extends OneShotEffect { if (controller.flipCoin(game)) { FilterCreaturePermanent filterPower2OrLess = new FilterCreaturePermanent("all creatures power 2 or less"); - filterPower2OrLess.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filterPower2OrLess.add(new PowerPredicate(CountType.FEWER_THAN, 3)); for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filterPower2OrLess, game)) { permanent.destroy(source.getSourceId(), game, false); } return true; } else { FilterCreaturePermanent filterPower3OrGreater = new FilterCreaturePermanent("all creatures power 3 or greater"); - filterPower3OrGreater.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filterPower3OrGreater.add(new PowerPredicate(CountType.MORE_THAN, 2)); for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filterPower3OrGreater, game)) { permanent.destroy(source.getSourceId(), game, false); } diff --git a/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java b/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java index 349fe60d53..110dcd673a 100644 --- a/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java +++ b/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java @@ -29,6 +29,7 @@ package mage.cards.q; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.costs.Cost; @@ -43,7 +44,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterSpiritOrArcaneCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -92,7 +92,7 @@ public class QuillmaneBaku extends CardImpl { } ability.getTargets().clear(); FilterCreaturePermanent newFilter = new FilterCreaturePermanent("creature with converted mana cost " + maxConvManaCost + " or less"); - newFilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, maxConvManaCost + 1)); + newFilter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, maxConvManaCost + 1)); TargetCreaturePermanent target = new TargetCreaturePermanent(newFilter); ability.getTargets().add(target); } diff --git a/Mage.Sets/src/mage/cards/r/RadiantsJudgment.java b/Mage.Sets/src/mage/cards/r/RadiantsJudgment.java index 0c2ba9bb83..f34aaea9a2 100644 --- a/Mage.Sets/src/mage/cards/r/RadiantsJudgment.java +++ b/Mage.Sets/src/mage/cards/r/RadiantsJudgment.java @@ -27,18 +27,19 @@ */ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; 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.filter.Filter; +import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Plopman @@ -47,7 +48,7 @@ public class RadiantsJudgment extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public RadiantsJudgment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); diff --git a/Mage.Sets/src/mage/cards/r/RakeclawGargantuan.java b/Mage.Sets/src/mage/cards/r/RakeclawGargantuan.java index 37a2b7a1cc..2742bf195d 100644 --- a/Mage.Sets/src/mage/cards/r/RakeclawGargantuan.java +++ b/Mage.Sets/src/mage/cards/r/RakeclawGargantuan.java @@ -27,22 +27,23 @@ */ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author North @@ -52,7 +53,7 @@ public class RakeclawGargantuan extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public RakeclawGargantuan(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RallyTheAncestors.java b/Mage.Sets/src/mage/cards/r/RallyTheAncestors.java index ef4583608a..b6eda0b193 100644 --- a/Mage.Sets/src/mage/cards/r/RallyTheAncestors.java +++ b/Mage.Sets/src/mage/cards/r/RallyTheAncestors.java @@ -27,10 +27,8 @@ */ package mage.cards.r; -import java.util.ArrayList; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility; import mage.abilities.effects.Effect; @@ -43,7 +41,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -51,6 +48,10 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.targetpointer.FixedTargets; +import java.util.ArrayList; +import java.util.Set; +import java.util.UUID; + /** * * @author emerald000 @@ -98,7 +99,7 @@ class RallyTheAncestorsEffect extends OneShotEffect { if (player != null) { int xValue = source.getManaCostsToPay().getX(); FilterCreatureCard filter = new FilterCreatureCard(); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, xValue + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, xValue + 1)); Set cards = player.getGraveyard().getCards(filter, game); player.moveCards(cards, Zone.BATTLEFIELD, source, game); ArrayList toExile = new ArrayList<>(cards.size()); diff --git a/Mage.Sets/src/mage/cards/r/RamosianCaptain.java b/Mage.Sets/src/mage/cards/r/RamosianCaptain.java index 9ded105a2f..9d1228a217 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianCaptain.java +++ b/Mage.Sets/src/mage/cards/r/RamosianCaptain.java @@ -28,11 +28,9 @@ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -40,12 +38,15 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Backfir3 @@ -56,7 +57,7 @@ public class RamosianCaptain extends CardImpl { static { filter.add(new SubtypePredicate("Rebel")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public RamosianCaptain(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RamosianCommander.java b/Mage.Sets/src/mage/cards/r/RamosianCommander.java index 44a5d2ce80..3dbaaf540e 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianCommander.java +++ b/Mage.Sets/src/mage/cards/r/RamosianCommander.java @@ -28,23 +28,24 @@ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Backfir3 @@ -55,7 +56,7 @@ public class RamosianCommander extends CardImpl { static { filter.add(new SubtypePredicate("Rebel")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 6)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 6)); } public RamosianCommander(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RamosianLieutenant.java b/Mage.Sets/src/mage/cards/r/RamosianLieutenant.java index 41f9026826..5291d71e64 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianLieutenant.java +++ b/Mage.Sets/src/mage/cards/r/RamosianLieutenant.java @@ -28,23 +28,24 @@ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Backfir3 @@ -55,7 +56,7 @@ public class RamosianLieutenant extends CardImpl { static { filter.add(new SubtypePredicate("Rebel")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public RamosianLieutenant(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RamosianRevivalist.java b/Mage.Sets/src/mage/cards/r/RamosianRevivalist.java index 0ce02135da..0e90889ca7 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianRevivalist.java +++ b/Mage.Sets/src/mage/cards/r/RamosianRevivalist.java @@ -27,9 +27,9 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -38,12 +38,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author fireshoes @@ -54,7 +55,7 @@ public class RamosianRevivalist extends CardImpl { static { filter.add(new SubtypePredicate("Rebel")); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 6)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 6)); } public RamosianRevivalist(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RamosianSergeant.java b/Mage.Sets/src/mage/cards/r/RamosianSergeant.java index 0874b3c729..22cf58eb70 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianSergeant.java +++ b/Mage.Sets/src/mage/cards/r/RamosianSergeant.java @@ -28,23 +28,24 @@ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Backfir3 @@ -55,7 +56,7 @@ public class RamosianSergeant extends CardImpl { static { filter.add(new SubtypePredicate("Rebel")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public RamosianSergeant(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RamosianSkyMarshal.java b/Mage.Sets/src/mage/cards/r/RamosianSkyMarshal.java index 600aa5c90c..edd94c0938 100644 --- a/Mage.Sets/src/mage/cards/r/RamosianSkyMarshal.java +++ b/Mage.Sets/src/mage/cards/r/RamosianSkyMarshal.java @@ -27,11 +27,9 @@ */ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -39,12 +37,15 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Backfir3 @@ -55,7 +56,7 @@ public class RamosianSkyMarshal extends CardImpl { static { filter.add(new SubtypePredicate("Rebel")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 7)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 7)); } public RamosianSkyMarshal(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RangerOfEos.java b/Mage.Sets/src/mage/cards/r/RangerOfEos.java index 8a601b226e..0d1905a580 100644 --- a/Mage.Sets/src/mage/cards/r/RangerOfEos.java +++ b/Mage.Sets/src/mage/cards/r/RangerOfEos.java @@ -28,19 +28,20 @@ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -51,7 +52,7 @@ public class RangerOfEos extends CardImpl { static { filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public RangerOfEos(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RathiAssassin.java b/Mage.Sets/src/mage/cards/r/RathiAssassin.java index c6808d6c1c..167c4e1940 100644 --- a/Mage.Sets/src/mage/cards/r/RathiAssassin.java +++ b/Mage.Sets/src/mage/cards/r/RathiAssassin.java @@ -27,12 +27,10 @@ */ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -41,7 +39,8 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.Predicates; @@ -52,6 +51,8 @@ import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Backfir3 @@ -63,7 +64,7 @@ public class RathiAssassin extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); destroyFilter.add(new TappedPredicate()); destroyFilter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); } diff --git a/Mage.Sets/src/mage/cards/r/RathiFiend.java b/Mage.Sets/src/mage/cards/r/RathiFiend.java index 5cb073041d..497a2de2b8 100644 --- a/Mage.Sets/src/mage/cards/r/RathiFiend.java +++ b/Mage.Sets/src/mage/cards/r/RathiFiend.java @@ -27,11 +27,9 @@ */ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -40,12 +38,15 @@ import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Backfir3 @@ -56,7 +57,7 @@ public class RathiFiend extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public RathiFiend(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RathiIntimidator.java b/Mage.Sets/src/mage/cards/r/RathiIntimidator.java index 520b40a28f..fdd4f806ce 100644 --- a/Mage.Sets/src/mage/cards/r/RathiIntimidator.java +++ b/Mage.Sets/src/mage/cards/r/RathiIntimidator.java @@ -27,11 +27,9 @@ */ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -39,12 +37,15 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Backfir3 @@ -55,7 +56,7 @@ public class RathiIntimidator extends CardImpl { static { filter.add(new SubtypePredicate("Mercenary")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public RathiIntimidator(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/ReaveSoul.java b/Mage.Sets/src/mage/cards/r/ReaveSoul.java index bb8733cc8c..7576ac724b 100644 --- a/Mage.Sets/src/mage/cards/r/ReaveSoul.java +++ b/Mage.Sets/src/mage/cards/r/ReaveSoul.java @@ -27,16 +27,17 @@ */ package mage.cards.r; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -46,7 +47,7 @@ public class ReaveSoul extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 4)); } public ReaveSoul(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RecruiterOfTheGuard.java b/Mage.Sets/src/mage/cards/r/RecruiterOfTheGuard.java index 78f88f207d..a3334a9ed7 100644 --- a/Mage.Sets/src/mage/cards/r/RecruiterOfTheGuard.java +++ b/Mage.Sets/src/mage/cards/r/RecruiterOfTheGuard.java @@ -27,18 +27,19 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) @@ -47,7 +48,7 @@ public class RecruiterOfTheGuard extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with toughness 2 or less"); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3)); } public RecruiterOfTheGuard(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RelentlessDead.java b/Mage.Sets/src/mage/cards/r/RelentlessDead.java index c09b936c40..574d8e4ffd 100644 --- a/Mage.Sets/src/mage/cards/r/RelentlessDead.java +++ b/Mage.Sets/src/mage/cards/r/RelentlessDead.java @@ -27,9 +27,9 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.mana.GenericManaCost; @@ -44,7 +44,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.AnotherCardPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -53,6 +52,8 @@ import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -111,7 +112,7 @@ class RelentlessDeadEffect extends OneShotEffect { if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) { FilterCard filter = new FilterCard("Another target Zombie card with converted mana cost " + costX); filter.add(new SubtypePredicate("Zombie")); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, costX)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, costX)); filter.add(new AnotherCardPredicate()); TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter); if (controller.chooseTarget(outcome, target, source, game)) { diff --git a/Mage.Sets/src/mage/cards/r/RenegadeRallier.java b/Mage.Sets/src/mage/cards/r/RenegadeRallier.java index 8ef49ab495..7d3320e860 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeRallier.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeRallier.java @@ -27,9 +27,9 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; @@ -38,12 +38,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInYourGraveyard; import mage.watchers.common.RevoltWatcher; +import java.util.UUID; + /** * * @author fireshoes @@ -53,7 +54,7 @@ public class RenegadeRallier extends CardImpl { private static final FilterPermanentCard filter = new FilterPermanentCard("permanent card with converted mana cost 2 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public RenegadeRallier(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/Repeal.java b/Mage.Sets/src/mage/cards/r/Repeal.java index b005adf9c0..b96ce74eae 100644 --- a/Mage.Sets/src/mage/cards/r/Repeal.java +++ b/Mage.Sets/src/mage/cards/r/Repeal.java @@ -27,21 +27,22 @@ */ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.TargetPermanent; import mage.target.common.TargetNonlandPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -67,7 +68,7 @@ public class Repeal extends CardImpl { ability.getTargets().clear(); int xValue = ability.getManaCostsToPay().getX(); FilterNonlandPermanent filter = new FilterNonlandPermanent(new StringBuilder("nonland permanent with converted mana cost ").append(xValue).toString()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); ability.addTarget(new TargetNonlandPermanent(filter)); } } diff --git a/Mage.Sets/src/mage/cards/r/Reprisal.java b/Mage.Sets/src/mage/cards/r/Reprisal.java index c6495648fb..e19466163c 100644 --- a/Mage.Sets/src/mage/cards/r/Reprisal.java +++ b/Mage.Sets/src/mage/cards/r/Reprisal.java @@ -27,16 +27,17 @@ */ package mage.cards.r; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Quercitron @@ -46,7 +47,7 @@ public class Reprisal extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public Reprisal(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RetributionOfTheMeek.java b/Mage.Sets/src/mage/cards/r/RetributionOfTheMeek.java index d10fcb28b5..53e925eb04 100644 --- a/Mage.Sets/src/mage/cards/r/RetributionOfTheMeek.java +++ b/Mage.Sets/src/mage/cards/r/RetributionOfTheMeek.java @@ -27,16 +27,17 @@ */ package mage.cards.r; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author Jesse Whyte @@ -46,7 +47,7 @@ public class RetributionOfTheMeek extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public RetributionOfTheMeek (UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/ReturnToTheRanks.java b/Mage.Sets/src/mage/cards/r/ReturnToTheRanks.java index cb4b194598..26b0f9d46c 100644 --- a/Mage.Sets/src/mage/cards/r/ReturnToTheRanks.java +++ b/Mage.Sets/src/mage/cards/r/ReturnToTheRanks.java @@ -27,20 +27,21 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.Effect; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +51,7 @@ public class ReturnToTheRanks extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with converted mana cost 2 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public ReturnToTheRanks(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/Reveillark.java b/Mage.Sets/src/mage/cards/r/Reveillark.java index fa0271ca0a..cda1b9d0d5 100644 --- a/Mage.Sets/src/mage/cards/r/Reveillark.java +++ b/Mage.Sets/src/mage/cards/r/Reveillark.java @@ -27,21 +27,22 @@ */ package mage.cards.r; -import java.util.UUID; -import mage.constants.CardType; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; -import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.EvokeAbility; +import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +51,7 @@ public class Reveillark extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with power 2 or less from your graveyard"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public Reveillark(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/Reverence.java b/Mage.Sets/src/mage/cards/r/Reverence.java index 195db1251e..d54263c2e4 100644 --- a/Mage.Sets/src/mage/cards/r/Reverence.java +++ b/Mage.Sets/src/mage/cards/r/Reverence.java @@ -27,7 +27,7 @@ */ package mage.cards.r; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.CantAttackYouAllEffect; import mage.cards.CardImpl; @@ -35,10 +35,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +49,7 @@ public class Reverence extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public Reverence(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/RunnersBane.java b/Mage.Sets/src/mage/cards/r/RunnersBane.java index 12fea6114e..e4081f4c61 100644 --- a/Mage.Sets/src/mage/cards/r/RunnersBane.java +++ b/Mage.Sets/src/mage/cards/r/RunnersBane.java @@ -27,26 +27,26 @@ */ package mage.cards.r; -import java.util.UUID; - -import mage.abilities.effects.common.TapEnchantedEffect; -import mage.constants.CardType; -import mage.constants.Zone; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; +import mage.abilities.effects.common.TapEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.Filter; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -55,7 +55,7 @@ public class RunnersBane extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 4)); } public RunnersBane(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); diff --git a/Mage.Sets/src/mage/cards/s/SacellumGodspeaker.java b/Mage.Sets/src/mage/cards/s/SacellumGodspeaker.java index f3aff32041..8abcf74005 100644 --- a/Mage.Sets/src/mage/cards/s/SacellumGodspeaker.java +++ b/Mage.Sets/src/mage/cards/s/SacellumGodspeaker.java @@ -27,33 +27,32 @@ */ package mage.cards.s; -import java.util.UUID; - -import mage.constants.CardType; import mage.MageInt; import mage.Mana; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.ManaEffect; import mage.abilities.mana.SimpleManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.target.common.TargetCardInHand; +import java.util.UUID; + /** - * * @author Plopman */ public class SacellumGodspeaker extends CardImpl { - + public SacellumGodspeaker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.subtype.add("Elf"); this.subtype.add("Druid"); @@ -77,12 +76,13 @@ public class SacellumGodspeaker extends CardImpl { class SacellumGodspeakerEffect extends ManaEffect { - + private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with power 5 or greater from your hand"); + static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } - + public SacellumGodspeakerEffect() { super(); staticText = "Reveal any number of creature cards with power 5 or greater from your hand. Add {G} to your mana pool for each card revealed this way"; @@ -99,7 +99,7 @@ class SacellumGodspeakerEffect extends ManaEffect { @Override public boolean apply(Game game, Ability source) { - TargetCardInHand target = new TargetCardInHand(0,Integer.MAX_VALUE, filter); + TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter); if (target.choose(Outcome.Benefit, source.getControllerId(), source.getSourceId(), game)) { Mana mana = Mana.GreenMana(target.getTargets().size()); checkToFirePossibleEvents(mana, game, source); diff --git a/Mage.Sets/src/mage/cards/s/SalvagingStation.java b/Mage.Sets/src/mage/cards/s/SalvagingStation.java index c6913edfde..45c80cd4af 100644 --- a/Mage.Sets/src/mage/cards/s/SalvagingStation.java +++ b/Mage.Sets/src/mage/cards/s/SalvagingStation.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -38,13 +38,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,7 +57,7 @@ public class SalvagingStation extends CardImpl { static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public SalvagingStation(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SanctumOfUgin.java b/Mage.Sets/src/mage/cards/s/SanctumOfUgin.java index f7879f7505..9653372f8c 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumOfUgin.java +++ b/Mage.Sets/src/mage/cards/s/SanctumOfUgin.java @@ -27,7 +27,7 @@ */ package mage.cards.s; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.effects.Effect; @@ -37,15 +37,15 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterSpell; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** - * * @author fireshoes */ public class SanctumOfUgin extends CardImpl { @@ -56,11 +56,11 @@ public class SanctumOfUgin extends CardImpl { static { filter.add(new ColorlessPredicate()); filterSpells.add(new ColorlessPredicate()); - filterSpells.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 6)); + filterSpells.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 6)); } public SanctumOfUgin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // {T}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfFleets.java b/Mage.Sets/src/mage/cards/s/ScourgeOfFleets.java index 61109365f4..690da0c428 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfFleets.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfFleets.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -40,7 +40,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterCreaturePermanent; @@ -51,6 +50,8 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 @@ -107,7 +108,7 @@ class ScourgeOfFleetsEffect extends OneShotEffect { int islands = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); FilterPermanent creatureFilter = new FilterCreaturePermanent(); creatureFilter.add(new ControllerPredicate(TargetController.OPPONENT)); - creatureFilter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, islands + 1)); + creatureFilter.add(new ToughnessPredicate(CountType.FEWER_THAN, islands + 1)); Cards cardsToHand = new CardsImpl(); for (Permanent permanent : game.getBattlefield().getActivePermanents(creatureFilter, source.getControllerId(), source.getSourceId(), game)) { cardsToHand.add(permanent); diff --git a/Mage.Sets/src/mage/cards/s/ScrapTrawler.java b/Mage.Sets/src/mage/cards/s/ScrapTrawler.java index d00950e5fe..1021c0cf90 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapTrawler.java +++ b/Mage.Sets/src/mage/cards/s/ScrapTrawler.java @@ -27,16 +27,15 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterArtifactCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -47,6 +46,8 @@ import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -105,7 +106,7 @@ class ScrapTrawlerTriggeredAbility extends TriggeredAbilityImpl { Permanent permanent = ((ZoneChangeEvent) event).getTarget(); if (permanent.getControllerId().equals(this.getControllerId()) && permanent.isArtifact()) { FilterCard filter = new FilterArtifactCard("artifact card in your graveyard with converted mana cost less than " + permanent.getManaCost().convertedManaCost()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, permanent.getManaCost().convertedManaCost())); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, permanent.getManaCost().convertedManaCost())); TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter); getTargets().clear(); addTarget(target); diff --git a/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java b/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java index f83fcefc31..851df8f7fb 100644 --- a/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java +++ b/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.effects.common.DamageTargetEffect; @@ -38,11 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * * @author emerald000 @@ -52,7 +53,7 @@ public class ScuttlingDoomEngine extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public ScuttlingDoomEngine(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SeaSerpent.java b/Mage.Sets/src/mage/cards/s/SeaSerpent.java index 73f758b426..bdebd77dd1 100644 --- a/Mage.Sets/src/mage/cards/s/SeaSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SeaSerpent.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -37,10 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author KholdFuzion @@ -65,7 +66,7 @@ public class SeaSerpent extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(filter))); // When you control no Islands, sacrifice Sea Serpent. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/s/SearingLight.java b/Mage.Sets/src/mage/cards/s/SearingLight.java index 415f3583b0..ff1dc2dd80 100644 --- a/Mage.Sets/src/mage/cards/s/SearingLight.java +++ b/Mage.Sets/src/mage/cards/s/SearingLight.java @@ -27,16 +27,17 @@ */ package mage.cards.s; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import static mage.filter.Filter.ComparisonType.LessThan; import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -46,7 +47,7 @@ public class SearingLight extends CardImpl { private static final FilterAttackingOrBlockingCreature filter = new FilterAttackingOrBlockingCreature("attacking or blocking creature with power 2 or less"); static { - filter.add(new PowerPredicate(LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public SearingLight(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/Seasinger.java b/Mage.Sets/src/mage/cards/s/Seasinger.java index b305bb031f..388f02d112 100644 --- a/Mage.Sets/src/mage/cards/s/Seasinger.java +++ b/Mage.Sets/src/mage/cards/s/Seasinger.java @@ -27,12 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; - -import mage.abilities.CountType; -import mage.constants.*; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SkipUntapOptionalAbility; @@ -44,15 +41,20 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.CardIdPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerControlsIslandPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetCreaturePermanent; -import mage.filter.predicate.permanent.ControllerControlsIslandPredicate; + +import java.util.UUID; /** * @@ -82,7 +84,7 @@ public class Seasinger extends CardImpl { // When you control no Islands, sacrifice Seasinger. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); // You may choose not to untap Seasinger during your untap step. diff --git a/Mage.Sets/src/mage/cards/s/SelesnyaCharm.java b/Mage.Sets/src/mage/cards/s/SelesnyaCharm.java index 1b90c7e462..4ea0a9fb60 100644 --- a/Mage.Sets/src/mage/cards/s/SelesnyaCharm.java +++ b/Mage.Sets/src/mage/cards/s/SelesnyaCharm.java @@ -27,8 +27,7 @@ */ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; @@ -38,13 +37,15 @@ import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.permanent.token.KnightToken; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +55,7 @@ public class SelesnyaCharm extends CardImpl { static private final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public SelesnyaCharm(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SerendibDjinn.java b/Mage.Sets/src/mage/cards/s/SerendibDjinn.java index b421e82f0e..27be31ae95 100644 --- a/Mage.Sets/src/mage/cards/s/SerendibDjinn.java +++ b/Mage.Sets/src/mage/cards/s/SerendibDjinn.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -40,7 +40,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterLandPermanent; import mage.game.Game; @@ -49,6 +48,8 @@ import mage.players.Player; import mage.target.Target; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author MarcoMarin @@ -67,7 +68,7 @@ public class SerendibDjinn extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SerendibDjinnEffect(), TargetController.YOU, false)); // When you control no lands, sacrifice Serendib Djinn. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent(), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent(), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/s/ShamanOfTheGreatHunt.java b/Mage.Sets/src/mage/cards/s/ShamanOfTheGreatHunt.java index 55260f3231..8cbf0c1f2f 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanOfTheGreatHunt.java +++ b/Mage.Sets/src/mage/cards/s/ShamanOfTheGreatHunt.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -46,10 +46,11 @@ import mage.constants.CardType; import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -59,7 +60,7 @@ public class ShamanOfTheGreatHunt extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public ShamanOfTheGreatHunt(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/ShamanicRevelation.java b/Mage.Sets/src/mage/cards/s/ShamanicRevelation.java index 87447741ed..e7e6c88fce 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanicRevelation.java +++ b/Mage.Sets/src/mage/cards/s/ShamanicRevelation.java @@ -27,7 +27,7 @@ */ package mage.cards.s; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.Effect; @@ -36,10 +36,11 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,7 @@ public class ShamanicRevelation extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public ShamanicRevelation(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/ShelldockIsle.java b/Mage.Sets/src/mage/cards/s/ShelldockIsle.java index bf03cae92c..17df901898 100644 --- a/Mage.Sets/src/mage/cards/s/ShelldockIsle.java +++ b/Mage.Sets/src/mage/cards/s/ShelldockIsle.java @@ -27,10 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.ActivateIfConditionActivatedAbility; -import mage.abilities.condition.Condition; import mage.abilities.condition.common.CardsInAnyLibraryCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -42,6 +41,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; +import java.util.UUID; + /** * * @author LevelX2 @@ -57,7 +58,7 @@ public class ShelldockIsle extends CardImpl { this.addAbility(new BlueManaAbility()); // {U}, {tap}: You may play the exiled card without paying its mana cost if a library has twenty or fewer cards in it. Ability ability = new ActivateIfConditionActivatedAbility( - Zone.BATTLEFIELD, new HideawayPlayEffect(), new ManaCostsImpl("{U}"), new CardsInAnyLibraryCondition(Condition.ComparisonType.LessThan, 21)); + Zone.BATTLEFIELD, new HideawayPlayEffect(), new ManaCostsImpl("{U}"), new CardsInAnyLibraryCondition(CountType.FEWER_THAN, 21)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ShowOfDominance.java b/Mage.Sets/src/mage/cards/s/ShowOfDominance.java index bd5725252e..abb24435bf 100644 --- a/Mage.Sets/src/mage/cards/s/ShowOfDominance.java +++ b/Mage.Sets/src/mage/cards/s/ShowOfDominance.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; @@ -41,7 +41,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -52,6 +51,8 @@ import mage.target.Target; import mage.target.TargetPermanent; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author Styxo @@ -109,7 +110,7 @@ class ShowOfDominanceEffect extends OneShotEffect { if (highestPower != Integer.MIN_VALUE) { if (selectedCreature == null) { FilterPermanent filter = new FilterCreaturePermanent("creature with power " + highestPower); - filter.add(new PowerPredicate(Filter.ComparisonType.Equal, highestPower)); + filter.add(new PowerPredicate(CountType.EQUAL_TO, highestPower)); Target target = new TargetPermanent(1, 1, filter, true); if (controller.chooseTarget(outcome, target, source, game)) { selectedCreature = game.getPermanent(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java b/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java index b28a460fb8..365c72e99e 100644 --- a/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java +++ b/Mage.Sets/src/mage/cards/s/SidarKondoOfJamuraa.java @@ -29,6 +29,7 @@ package mage.cards.s; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.RestrictionEffect; @@ -42,7 +43,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -59,7 +59,7 @@ public class SidarKondoOfJamuraa extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public SidarKondoOfJamuraa(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java b/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java index 8d326c863c..5f8df8835a 100644 --- a/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java +++ b/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostControlledEffect; @@ -40,11 +40,12 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.permanent.ControllerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -55,7 +56,7 @@ public class SightOfTheScalelords extends CardImpl { static { filter.add(new ControllerPredicate(TargetController.YOU)); - filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 3)); } public SightOfTheScalelords(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/Silkwrap.java b/Mage.Sets/src/mage/cards/s/Silkwrap.java index 7cb8e9790d..5258c98795 100644 --- a/Mage.Sets/src/mage/cards/s/Silkwrap.java +++ b/Mage.Sets/src/mage/cards/s/Silkwrap.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; import mage.abilities.effects.OneShotEffect; @@ -39,7 +39,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.permanent.ControllerPredicate; @@ -48,6 +47,8 @@ import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -57,7 +58,7 @@ public class Silkwrap extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less an opponent controls"); static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); filter.add(new ControllerPredicate(TargetController.OPPONENT)); } diff --git a/Mage.Sets/src/mage/cards/s/SilumgarAssassin.java b/Mage.Sets/src/mage/cards/s/SilumgarAssassin.java index 305b27ade7..edc7b9782e 100644 --- a/Mage.Sets/src/mage/cards/s/SilumgarAssassin.java +++ b/Mage.Sets/src/mage/cards/s/SilumgarAssassin.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -41,12 +41,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,7 +57,7 @@ public class SilumgarAssassin extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less an opponent controls"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 4)); filter.add(new ControllerPredicate(TargetController.OPPONENT)); } diff --git a/Mage.Sets/src/mage/cards/s/SkeletonShip.java b/Mage.Sets/src/mage/cards/s/SkeletonShip.java index ff98a575ba..ac31ce488d 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletonShip.java +++ b/Mage.Sets/src/mage/cards/s/SkeletonShip.java @@ -29,6 +29,7 @@ package mage.cards.s; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -40,7 +41,6 @@ import mage.constants.CardType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; import mage.target.common.TargetCreaturePermanent; @@ -61,7 +61,7 @@ public class SkeletonShip extends CardImpl { // When you control no Islands, sacrifice Skeleton Ship. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); // {tap}: Put a -1/-1 counter on target creature. diff --git a/Mage.Sets/src/mage/cards/s/SkyfireKirin.java b/Mage.Sets/src/mage/cards/s/SkyfireKirin.java index 85f59eb63f..832669ba61 100644 --- a/Mage.Sets/src/mage/cards/s/SkyfireKirin.java +++ b/Mage.Sets/src/mage/cards/s/SkyfireKirin.java @@ -29,6 +29,7 @@ package mage.cards.s; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; @@ -37,7 +38,6 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterSpiritOrArcaneCard; @@ -53,7 +53,6 @@ import mage.target.targetpointer.FixedTarget; import java.util.UUID; /** - * * @author LevelX2 */ public class SkyfireKirin extends CardImpl { @@ -61,7 +60,7 @@ public class SkyfireKirin extends CardImpl { private final UUID originalId; public SkyfireKirin(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add("Kirin"); this.subtype.add("Spirit"); @@ -86,7 +85,7 @@ public class SkyfireKirin extends CardImpl { int cmc = spell.getConvertedManaCost(); ability.getTargets().clear(); FilterPermanent filter = new FilterCreaturePermanent(new StringBuilder("creature with converted mana costs of ").append(cmc).toString()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, cmc)); Target target = new TargetPermanent(filter); ability.addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/s/SkymarkRoc.java b/Mage.Sets/src/mage/cards/s/SkymarkRoc.java index e6335e2a5c..73bbdba8e4 100644 --- a/Mage.Sets/src/mage/cards/s/SkymarkRoc.java +++ b/Mage.Sets/src/mage/cards/s/SkymarkRoc.java @@ -28,8 +28,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -37,7 +37,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -46,6 +45,8 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -97,7 +98,7 @@ class SkymarkRocAbility extends TriggeredAbilityImpl { FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls with toughness 2 or less"); UUID defenderId = game.getCombat().getDefendingPlayerId(sourceId, game); filter.add(new ControllerIdPredicate(defenderId)); - filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3)); this.getTargets().clear(); TargetCreaturePermanent target = new TargetCreaturePermanent(filter); diff --git a/Mage.Sets/src/mage/cards/s/SkywhalersShot.java b/Mage.Sets/src/mage/cards/s/SkywhalersShot.java index 65ffa75cb0..d65bbb5bd1 100644 --- a/Mage.Sets/src/mage/cards/s/SkywhalersShot.java +++ b/Mage.Sets/src/mage/cards/s/SkywhalersShot.java @@ -27,17 +27,18 @@ */ package mage.cards.s; -import java.util.UUID; +import mage.abilities.CountType; 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.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -47,7 +48,7 @@ public class SkywhalersShot extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public SkywhalersShot(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SlipstreamSerpent.java b/Mage.Sets/src/mage/cards/s/SlipstreamSerpent.java index b744f6280c..7c92e6f498 100644 --- a/Mage.Sets/src/mage/cards/s/SlipstreamSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SlipstreamSerpent.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -39,9 +39,10 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -59,7 +60,7 @@ public class SlipstreamSerpent extends CardImpl { // When you control no Islands, sacrifice Slipstream Serpent. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); // Morph {5}{U} diff --git a/Mage.Sets/src/mage/cards/s/SmiteTheMonstrous.java b/Mage.Sets/src/mage/cards/s/SmiteTheMonstrous.java index 2ab6389ba8..8ff260671a 100644 --- a/Mage.Sets/src/mage/cards/s/SmiteTheMonstrous.java +++ b/Mage.Sets/src/mage/cards/s/SmiteTheMonstrous.java @@ -27,16 +27,17 @@ */ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author nantuko */ @@ -45,7 +46,7 @@ public class SmiteTheMonstrous extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public SmiteTheMonstrous(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/Smother.java b/Mage.Sets/src/mage/cards/s/Smother.java index c1123fcfaa..ba3c2dbd43 100644 --- a/Mage.Sets/src/mage/cards/s/Smother.java +++ b/Mage.Sets/src/mage/cards/s/Smother.java @@ -27,16 +27,17 @@ */ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author North @@ -46,7 +47,7 @@ public class Smother extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less"); static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public Smother(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SneakyHomunculus.java b/Mage.Sets/src/mage/cards/s/SneakyHomunculus.java index 8b2fb1dd1e..28788a34af 100644 --- a/Mage.Sets/src/mage/cards/s/SneakyHomunculus.java +++ b/Mage.Sets/src/mage/cards/s/SneakyHomunculus.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; @@ -38,10 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author dustinconrad @@ -51,7 +52,7 @@ public class SneakyHomunculus extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 1)); } public SneakyHomunculus(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SolarTide.java b/Mage.Sets/src/mage/cards/s/SolarTide.java index 69c9523a2b..6502b929c1 100644 --- a/Mage.Sets/src/mage/cards/s/SolarTide.java +++ b/Mage.Sets/src/mage/cards/s/SolarTide.java @@ -27,7 +27,7 @@ */ package mage.cards.s; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.common.DestroyAllEffect; @@ -35,12 +35,13 @@ import mage.abilities.keyword.EntwineAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -51,8 +52,8 @@ public class SolarTide extends CardImpl { private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures with power 3 or greater"); static { - filter1.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); - filter2.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter1.add(new PowerPredicate(CountType.FEWER_THAN, 3)); + filter2.add(new PowerPredicate(CountType.MORE_THAN, 2)); } public SolarTide(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SoratamiMirrorGuard.java b/Mage.Sets/src/mage/cards/s/SoratamiMirrorGuard.java index 248a34f4ec..0cb56dac98 100644 --- a/Mage.Sets/src/mage/cards/s/SoratamiMirrorGuard.java +++ b/Mage.Sets/src/mage/cards/s/SoratamiMirrorGuard.java @@ -28,11 +28,9 @@ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.costs.mana.GenericManaCost; @@ -40,7 +38,8 @@ import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterCreaturePermanent; @@ -48,6 +47,8 @@ import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * @author Loki */ @@ -57,7 +58,7 @@ public class SoratamiMirrorGuard extends CardImpl { private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature with power 2 or less"); static { - filterCreature.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filterCreature.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public SoratamiMirrorGuard(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SpearbreakerBehemoth.java b/Mage.Sets/src/mage/cards/s/SpearbreakerBehemoth.java index 6abe9f1cf4..4e5d789eef 100644 --- a/Mage.Sets/src/mage/cards/s/SpearbreakerBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/SpearbreakerBehemoth.java @@ -27,22 +27,23 @@ */ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author North @@ -52,7 +53,7 @@ public class SpearbreakerBehemoth extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public SpearbreakerBehemoth(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SpellBlast.java b/Mage.Sets/src/mage/cards/s/SpellBlast.java index 5dd4158496..672322895e 100644 --- a/Mage.Sets/src/mage/cards/s/SpellBlast.java +++ b/Mage.Sets/src/mage/cards/s/SpellBlast.java @@ -27,20 +27,21 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.Target; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author LevelX2 @@ -73,7 +74,7 @@ public class SpellBlast extends CardImpl { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); FilterSpell newfilter = new FilterSpell(new StringBuilder("spell with converted mana cost ").append(xValue).toString()); - newfilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); + newfilter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue)); Target target = new TargetSpell(newfilter); ability.addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/s/SpellBurst.java b/Mage.Sets/src/mage/cards/s/SpellBurst.java index fa9ce2497f..6df1213e3c 100644 --- a/Mage.Sets/src/mage/cards/s/SpellBurst.java +++ b/Mage.Sets/src/mage/cards/s/SpellBurst.java @@ -27,28 +27,28 @@ */ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.keyword.BuybackAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.TargetSpell; +import java.util.UUID; + /** - * * @author LevelX2 */ public class SpellBurst extends CardImpl { public SpellBurst(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}"); // Buyback {3} @@ -64,7 +64,7 @@ public class SpellBurst extends CardImpl { if (ability instanceof SpellAbility) { ability.getTargets().clear(); FilterSpell filter = new FilterSpell("spell with converted mana cost X"); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, ability.getManaCostsToPay().getX())); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, ability.getManaCostsToPay().getX())); ability.addTarget(new TargetSpell(filter)); } } diff --git a/Mage.Sets/src/mage/cards/s/SpellQueller.java b/Mage.Sets/src/mage/cards/s/SpellQueller.java index fc4902a00c..2ed01071f5 100644 --- a/Mage.Sets/src/mage/cards/s/SpellQueller.java +++ b/Mage.Sets/src/mage/cards/s/SpellQueller.java @@ -27,11 +27,10 @@ */ package mage.cards.s; -import java.util.Set; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -43,7 +42,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.ExileZone; @@ -55,6 +53,9 @@ import mage.target.TargetSpell; import mage.util.CardUtil; import org.apache.log4j.Logger; +import java.util.Set; +import java.util.UUID; + /** * * @author LevelX2 @@ -64,7 +65,7 @@ public class SpellQueller extends CardImpl { private final static FilterSpell filter = new FilterSpell("spell with converted mana cost 4 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public SpellQueller(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SpellSnare.java b/Mage.Sets/src/mage/cards/s/SpellSnare.java index 71cd72cd09..a66a4e4ba2 100644 --- a/Mage.Sets/src/mage/cards/s/SpellSnare.java +++ b/Mage.Sets/src/mage/cards/s/SpellSnare.java @@ -27,16 +27,17 @@ */ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class SpellSnare extends CardImpl { private static final FilterSpell filter = new FilterSpell("spell with converted mana cost 2"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, 2)); } public SpellSnare(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SpellbreakerBehemoth.java b/Mage.Sets/src/mage/cards/s/SpellbreakerBehemoth.java index 5af73f0977..6b6be4c98f 100644 --- a/Mage.Sets/src/mage/cards/s/SpellbreakerBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/SpellbreakerBehemoth.java @@ -28,21 +28,22 @@ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Zone; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.CantBeCounteredControlledEffect; import mage.abilities.effects.common.CantBeCounteredSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * @@ -54,7 +55,7 @@ public class SpellbreakerBehemoth extends CardImpl { static { filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public SpellbreakerBehemoth(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SpellstutterSprite.java b/Mage.Sets/src/mage/cards/s/SpellstutterSprite.java index c62fd10c29..83f30c611b 100644 --- a/Mage.Sets/src/mage/cards/s/SpellstutterSprite.java +++ b/Mage.Sets/src/mage/cards/s/SpellstutterSprite.java @@ -27,12 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -40,8 +37,9 @@ import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -51,6 +49,8 @@ import mage.game.Game; import mage.game.stack.StackObject; import mage.target.TargetSpell; +import java.util.UUID; + /** * * @author LevelX2 @@ -88,7 +88,7 @@ public class SpellstutterSprite extends CardImpl { if (ability instanceof EntersBattlefieldTriggeredAbility) { int numberFaeries = game.getState().getBattlefield().countAll(filter, ability.getControllerId(), game); FilterSpell xFilter = new FilterSpell(new StringBuilder("spell with converted mana cost ").append(numberFaeries).append(" or less").toString()); - xFilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, numberFaeries + 1)); + xFilter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, numberFaeries + 1)); ability.getTargets().clear(); ability.addTarget(new TargetSpell(xFilter)); } diff --git a/Mage.Sets/src/mage/cards/s/StirTheGrave.java b/Mage.Sets/src/mage/cards/s/StirTheGrave.java index 2c47dd5834..91b2901a80 100644 --- a/Mage.Sets/src/mage/cards/s/StirTheGrave.java +++ b/Mage.Sets/src/mage/cards/s/StirTheGrave.java @@ -27,19 +27,20 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -60,7 +61,7 @@ public class StirTheGrave extends CardImpl { ability.getTargets().clear(); int xValue = ability.getManaCostsToPay().getX(); FilterCard filter = new FilterCreatureCard("creature card with converted mana cost " + xValue + " or less from your graveyard"); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, xValue + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, xValue + 1)); ability.getTargets().add(new TargetCardInYourGraveyard(filter)); } diff --git a/Mage.Sets/src/mage/cards/s/StranglingSoot.java b/Mage.Sets/src/mage/cards/s/StranglingSoot.java index 77693f0aa7..c9d63ccfa3 100644 --- a/Mage.Sets/src/mage/cards/s/StranglingSoot.java +++ b/Mage.Sets/src/mage/cards/s/StranglingSoot.java @@ -27,7 +27,7 @@ */ package mage.cards.s; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlashbackAbility; @@ -35,25 +35,25 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author ilcartographer */ public class StranglingSoot extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughess 3 or less"); - + static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 4)); } public StranglingSoot(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); // Destroy target creature with toughness 3 or less. this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/s/SubterraneanScout.java b/Mage.Sets/src/mage/cards/s/SubterraneanScout.java index 147c3ca424..80e4bb1ee0 100644 --- a/Mage.Sets/src/mage/cards/s/SubterraneanScout.java +++ b/Mage.Sets/src/mage/cards/s/SubterraneanScout.java @@ -27,19 +27,20 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,7 @@ public class SubterraneanScout extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public SubterraneanScout(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SultaiFlayer.java b/Mage.Sets/src/mage/cards/s/SultaiFlayer.java index cdc4765873..2b709638d4 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiFlayer.java +++ b/Mage.Sets/src/mage/cards/s/SultaiFlayer.java @@ -27,19 +27,20 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.permanent.ControllerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,7 @@ public class SultaiFlayer extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control with toughness 4 or greater"); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 3)); filter.add(new ControllerPredicate(TargetController.YOU)); } diff --git a/Mage.Sets/src/mage/cards/s/SunTitan.java b/Mage.Sets/src/mage/cards/s/SunTitan.java index cf3994d81c..9d054d1a3c 100644 --- a/Mage.Sets/src/mage/cards/s/SunTitan.java +++ b/Mage.Sets/src/mage/cards/s/SunTitan.java @@ -27,20 +27,21 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -50,7 +51,7 @@ public class SunTitan extends CardImpl { private static final FilterPermanentCard filter = new FilterPermanentCard("permanent card with converted mana cost 3 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public SunTitan(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/Sunforger.java b/Mage.Sets/src/mage/cards/s/Sunforger.java index d042a2f96d..8564299147 100644 --- a/Mage.Sets/src/mage/cards/s/Sunforger.java +++ b/Mage.Sets/src/mage/cards/s/Sunforger.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -47,7 +47,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.Predicate; import mage.filter.predicate.Predicates; @@ -59,6 +58,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -126,7 +127,7 @@ class SunforgerEffect extends OneShotEffect { new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.WHITE))); filter.add(new CardTypePredicate(CardType.INSTANT)); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); filter.add(new CardCanBeCastPredicate(source.getControllerId())); if (controller.searchLibrary(target, game, controller.getId())) { UUID targetId = target.getFirstTarget(); diff --git a/Mage.Sets/src/mage/cards/s/SunseedNurturer.java b/Mage.Sets/src/mage/cards/s/SunseedNurturer.java index 1fda80c3c0..b7592197f7 100644 --- a/Mage.Sets/src/mage/cards/s/SunseedNurturer.java +++ b/Mage.Sets/src/mage/cards/s/SunseedNurturer.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.mana.ColorlessManaAbility; @@ -36,13 +36,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import java.util.UUID; + /** * * @author North @@ -79,7 +80,7 @@ class SunseedNurturerTriggeredAbility extends TriggeredAbilityImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public SunseedNurturerTriggeredAbility() { diff --git a/Mage.Sets/src/mage/cards/s/SunstrikeLegionnaire.java b/Mage.Sets/src/mage/cards/s/SunstrikeLegionnaire.java index 5b64ada4f1..9d87562163 100644 --- a/Mage.Sets/src/mage/cards/s/SunstrikeLegionnaire.java +++ b/Mage.Sets/src/mage/cards/s/SunstrikeLegionnaire.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -41,12 +41,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -58,7 +59,7 @@ public class SunstrikeLegionnaire extends CardImpl { static { untapFilter.add(new AnotherPredicate()); - tapFilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + tapFilter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public SunstrikeLegionnaire(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/Sunweb.java b/Mage.Sets/src/mage/cards/s/Sunweb.java index 68a1519236..858108ba87 100644 --- a/Mage.Sets/src/mage/cards/s/Sunweb.java +++ b/Mage.Sets/src/mage/cards/s/Sunweb.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; import mage.abilities.keyword.DefenderAbility; @@ -37,10 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author Quercitron @@ -49,7 +50,7 @@ public class Sunweb extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public Sunweb(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SuspensionField.java b/Mage.Sets/src/mage/cards/s/SuspensionField.java index d008ee0d1a..54d1ac1b55 100644 --- a/Mage.Sets/src/mage/cards/s/SuspensionField.java +++ b/Mage.Sets/src/mage/cards/s/SuspensionField.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; import mage.abilities.effects.OneShotEffect; @@ -38,7 +38,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.game.Game; @@ -46,6 +45,8 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author emerald000 @@ -55,7 +56,7 @@ public class SuspensionField extends CardImpl { private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 3 or greater"); static { - filter.add(new ToughnessPredicate(ComparisonType.GreaterThan, 2)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 2)); } public SuspensionField(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/Swat.java b/Mage.Sets/src/mage/cards/s/Swat.java index 36aceffe1d..9ec825f829 100644 --- a/Mage.Sets/src/mage/cards/s/Swat.java +++ b/Mage.Sets/src/mage/cards/s/Swat.java @@ -27,18 +27,19 @@ */ package mage.cards.s; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; 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.filter.Filter; +import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Plopman @@ -48,7 +49,7 @@ public class Swat extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public Swat(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SwiftWarkite.java b/Mage.Sets/src/mage/cards/s/SwiftWarkite.java index 6b6af8b7d4..144be9dac0 100644 --- a/Mage.Sets/src/mage/cards/s/SwiftWarkite.java +++ b/Mage.Sets/src/mage/cards/s/SwiftWarkite.java @@ -27,9 +27,9 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -47,7 +47,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -59,6 +58,8 @@ import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInYourGraveyard; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -95,7 +96,7 @@ class SwiftWarkiteEffect extends OneShotEffect { static { filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } SwiftWarkiteEffect() { diff --git a/Mage.Sets/src/mage/cards/s/SwordOfTheMeek.java b/Mage.Sets/src/mage/cards/s/SwordOfTheMeek.java index ee9acf6c79..23fd93fd46 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfTheMeek.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfTheMeek.java @@ -27,8 +27,8 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -38,12 +38,7 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SetTargetPointer; -import mage.constants.Zone; -import mage.filter.Filter; +import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate; @@ -51,6 +46,8 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 @@ -60,8 +57,8 @@ public class SwordOfTheMeek extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a 1/1 creature"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.Equal, 1)); - filter.add(new ToughnessPredicate(Filter.ComparisonType.Equal, 1)); + filter.add(new PowerPredicate(CountType.EQUAL_TO, 1)); + filter.add(new ToughnessPredicate(CountType.EQUAL_TO, 1)); } public SwordOfTheMeek(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TajNarSwordsmith.java b/Mage.Sets/src/mage/cards/t/TajNarSwordsmith.java index 3e6e2e01e3..79fba9d1d5 100644 --- a/Mage.Sets/src/mage/cards/t/TajNarSwordsmith.java +++ b/Mage.Sets/src/mage/cards/t/TajNarSwordsmith.java @@ -27,9 +27,9 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.mana.GenericManaCost; @@ -39,7 +39,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,6 +46,8 @@ import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author emerald000 @@ -99,7 +100,7 @@ class TajNarSwordsmithEffect extends OneShotEffect { if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) { FilterCard filter = new FilterCard("Equipment card with converted mana cost " + costX + " or less"); filter.add(new SubtypePredicate("Equipment")); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, costX + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, costX + 1)); new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, filter), false, true).apply(game, source); return true; } diff --git a/Mage.Sets/src/mage/cards/t/TawnossWand.java b/Mage.Sets/src/mage/cards/t/TawnossWand.java index ba7a821057..4814b9d187 100644 --- a/Mage.Sets/src/mage/cards/t/TawnossWand.java +++ b/Mage.Sets/src/mage/cards/t/TawnossWand.java @@ -27,8 +27,8 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -37,11 +37,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author MarcoMarin @@ -51,7 +52,7 @@ public class TawnossWand extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 3)); } public TawnossWand(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TemurAscendancy.java b/Mage.Sets/src/mage/cards/t/TemurAscendancy.java index d0894bf6a2..1710049cdb 100644 --- a/Mage.Sets/src/mage/cards/t/TemurAscendancy.java +++ b/Mage.Sets/src/mage/cards/t/TemurAscendancy.java @@ -27,7 +27,7 @@ */ package mage.cards.t; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -38,11 +38,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -51,7 +52,7 @@ public class TemurAscendancy extends CardImpl { final private static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public TemurAscendancy(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TemurCharm.java b/Mage.Sets/src/mage/cards/t/TemurCharm.java index 641d9a7c54..c28917faac 100644 --- a/Mage.Sets/src/mage/cards/t/TemurCharm.java +++ b/Mage.Sets/src/mage/cards/t/TemurCharm.java @@ -27,7 +27,7 @@ */ package mage.cards.t; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.Effect; @@ -36,17 +36,19 @@ import mage.abilities.effects.common.FightTargetsEffect; import mage.abilities.effects.common.combat.CantBlockAllEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; -import mage.cards.CardSetInfo;import mage.target.Target; -import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreaturePermanent; +import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.Target; import mage.target.TargetSpell; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; /** * @@ -59,7 +61,7 @@ public class TemurCharm extends CardImpl { static { filter.add(new ControllerPredicate(TargetController.NOT_YOU)); - filterCantBlock.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filterCantBlock.add(new PowerPredicate(CountType.FEWER_THAN, 4)); } public TemurCharm(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TerashisVerdict.java b/Mage.Sets/src/mage/cards/t/TerashisVerdict.java index 1a23445cc7..8aa0f55338 100644 --- a/Mage.Sets/src/mage/cards/t/TerashisVerdict.java +++ b/Mage.Sets/src/mage/cards/t/TerashisVerdict.java @@ -27,16 +27,17 @@ */ package mage.cards.t; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetAttackingCreature; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class TerashisVerdict extends CardImpl { private static final FilterAttackingCreature filter = new FilterAttackingCreature("attacking creature with power 3 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 4)); } public TerashisVerdict(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TetheredGriffin.java b/Mage.Sets/src/mage/cards/t/TetheredGriffin.java index 5ef9d0f688..caaff3a79d 100644 --- a/Mage.Sets/src/mage/cards/t/TetheredGriffin.java +++ b/Mage.Sets/src/mage/cards/t/TetheredGriffin.java @@ -27,17 +27,18 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterEnchantmentPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -55,7 +56,7 @@ public class TetheredGriffin extends CardImpl { // When you control no enchantments, sacrifice Tethered Griffin. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterEnchantmentPermanent(), Filter.ComparisonType.Equal, 0, + new FilterEnchantmentPermanent(), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/t/TethmosHighPriest.java b/Mage.Sets/src/mage/cards/t/TethmosHighPriest.java index 4958a8faa8..35f43a6779 100644 --- a/Mage.Sets/src/mage/cards/t/TethmosHighPriest.java +++ b/Mage.Sets/src/mage/cards/t/TethmosHighPriest.java @@ -27,20 +27,21 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.keyword.HeroicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.Target; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +51,7 @@ public class TethmosHighPriest extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public TethmosHighPriest(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java b/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java index 1312c47b67..035612a50b 100644 --- a/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java +++ b/Mage.Sets/src/mage/cards/t/TezzeretTheSeeker.java @@ -27,9 +27,8 @@ */ package mage.cards.t; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.LoyaltyAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; import mage.abilities.costs.Cost; @@ -40,13 +39,7 @@ import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; +import mage.constants.*; import mage.filter.common.FilterArtifactCard; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -56,6 +49,9 @@ import mage.players.Player; import mage.target.common.TargetArtifactPermanent; import mage.target.common.TargetCardInLibrary; +import java.util.List; +import java.util.UUID; + /** * * @author North @@ -119,7 +115,7 @@ class TezzeretTheSeekerEffect2 extends OneShotEffect { } FilterArtifactCard filter = new FilterArtifactCard("artifact card with converted mana cost " + cmc + " or less"); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, cmc + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, cmc + 1)); TargetCardInLibrary target = new TargetCardInLibrary(filter); if (controller.searchLibrary(target, game)) { diff --git a/Mage.Sets/src/mage/cards/t/Thoughtbind.java b/Mage.Sets/src/mage/cards/t/Thoughtbind.java index eb0a7dbd35..a835d0f701 100644 --- a/Mage.Sets/src/mage/cards/t/Thoughtbind.java +++ b/Mage.Sets/src/mage/cards/t/Thoughtbind.java @@ -28,17 +28,17 @@ package mage.cards.t; -import java.util.UUID; - -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetSpell; +import java.util.UUID; + /** * @author Loki */ @@ -47,7 +47,7 @@ public class Thoughtbind extends CardImpl { private static final FilterSpell filter = new FilterSpell("spell with converted mana cost 4 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 5)); } public Thoughtbind(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/ThreadsOfDisloyalty.java b/Mage.Sets/src/mage/cards/t/ThreadsOfDisloyalty.java index cae54e293f..c054f2b2dc 100644 --- a/Mage.Sets/src/mage/cards/t/ThreadsOfDisloyalty.java +++ b/Mage.Sets/src/mage/cards/t/ThreadsOfDisloyalty.java @@ -28,23 +28,24 @@ package mage.cards.t; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.ControlEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +55,7 @@ public class ThreadsOfDisloyalty extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 2 or less"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public ThreadsOfDisloyalty(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/ThundercloudElemental.java b/Mage.Sets/src/mage/cards/t/ThundercloudElemental.java index b7fca72889..ef5d659950 100644 --- a/Mage.Sets/src/mage/cards/t/ThundercloudElemental.java +++ b/Mage.Sets/src/mage/cards/t/ThundercloudElemental.java @@ -27,8 +27,8 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; @@ -40,11 +40,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -55,7 +56,7 @@ public class ThundercloudElemental extends CardImpl { private static final FilterCreaturePermanent flyingFilter = new FilterCreaturePermanent("All other creatures"); static { - toughnessFilter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3)); + toughnessFilter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3)); flyingFilter.add(new AnotherPredicate()); } diff --git a/Mage.Sets/src/mage/cards/t/TimelyHordemate.java b/Mage.Sets/src/mage/cards/t/TimelyHordemate.java index a502e47e4b..d7190a1b2b 100644 --- a/Mage.Sets/src/mage/cards/t/TimelyHordemate.java +++ b/Mage.Sets/src/mage/cards/t/TimelyHordemate.java @@ -27,9 +27,9 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; @@ -37,12 +37,13 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInYourGraveyard; import mage.watchers.common.PlayerAttackedWatcher; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class TimelyHordemate extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3)); } public TimelyHordemate(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TransgressTheMind.java b/Mage.Sets/src/mage/cards/t/TransgressTheMind.java index 7d5a4e4ba8..94a62b08e0 100644 --- a/Mage.Sets/src/mage/cards/t/TransgressTheMind.java +++ b/Mage.Sets/src/mage/cards/t/TransgressTheMind.java @@ -27,19 +27,20 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.Effect; import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect; import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author fireshoes @@ -49,7 +50,7 @@ public class TransgressTheMind extends CardImpl { private static final FilterCard filter = new FilterCard("a card from it with converted mana cost 3 or greater"); static { - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 2)); } public TransgressTheMind(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TreasureMage.java b/Mage.Sets/src/mage/cards/t/TreasureMage.java index 0c794fdf98..e1310a33d6 100644 --- a/Mage.Sets/src/mage/cards/t/TreasureMage.java +++ b/Mage.Sets/src/mage/cards/t/TreasureMage.java @@ -28,20 +28,21 @@ package mage.cards.t; -import java.util.UUID; -import mage.constants.CardType; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.SearchEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki @@ -52,7 +53,7 @@ public class TreasureMage extends CardImpl { static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5)); + filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5)); } public TreasureMage (UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TrinketMage.java b/Mage.Sets/src/mage/cards/t/TrinketMage.java index 565d0d8eff..bb8852f1a8 100644 --- a/Mage.Sets/src/mage/cards/t/TrinketMage.java +++ b/Mage.Sets/src/mage/cards/t/TrinketMage.java @@ -28,14 +28,14 @@ package mage.cards.t; -import mage.constants.CardType; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.SearchEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter; +import mage.constants.CardType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -52,7 +52,7 @@ public class TrinketMage extends CardImpl { static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2)); } public TrinketMage(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/t/TrophyMage.java b/Mage.Sets/src/mage/cards/t/TrophyMage.java index b313fd0894..4c40fcccca 100644 --- a/Mage.Sets/src/mage/cards/t/TrophyMage.java +++ b/Mage.Sets/src/mage/cards/t/TrophyMage.java @@ -27,19 +27,20 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Styxo @@ -50,7 +51,7 @@ public class TrophyMage extends CardImpl { static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, 3)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, 3)); } public TrophyMage(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java b/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java index 5babeb1e71..c5426ca4a8 100644 --- a/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java +++ b/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java @@ -27,10 +27,8 @@ */ package mage.cards.u; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.LoyaltyAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; import mage.abilities.costs.Cost; @@ -44,7 +42,6 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterPermanent; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.Predicates; @@ -55,6 +52,10 @@ import mage.players.Player; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCreatureOrPlayer; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** * * @author LevelX2 @@ -122,7 +123,7 @@ class UginTheSpiritDragonEffect2 extends OneShotEffect { } FilterPermanent filter = new FilterPermanent("permanent with converted mana cost X or less that's one or more colors"); - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, cmc + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, cmc + 1)); filter.add(Predicates.not(new ColorlessPredicate())); Set permanentsToExile = new HashSet<>(); permanentsToExile.addAll(game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)); diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldObserver.java b/Mage.Sets/src/mage/cards/u/UlvenwaldObserver.java index 79ba7ddd54..7e1518597c 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldObserver.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldObserver.java @@ -27,19 +27,20 @@ */ package mage.cards.u; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.permanent.ControllerPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -49,7 +50,7 @@ public class UlvenwaldObserver extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control with toughness 4 or greater"); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 3)); filter.add(new ControllerPredicate(TargetController.YOU)); } diff --git a/Mage.Sets/src/mage/cards/u/Unearth.java b/Mage.Sets/src/mage/cards/u/Unearth.java index 49b423f3ab..ae206bd135 100644 --- a/Mage.Sets/src/mage/cards/u/Unearth.java +++ b/Mage.Sets/src/mage/cards/u/Unearth.java @@ -27,19 +27,20 @@ */ package mage.cards.u; -import java.util.UUID; -import mage.constants.CardType; +import mage.abilities.CountType; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author Plopman @@ -49,7 +50,7 @@ public class Unearth extends CardImpl { private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard"); static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public Unearth(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/v/VagrantPlowbeasts.java b/Mage.Sets/src/mage/cards/v/VagrantPlowbeasts.java index 1c37fe5572..4a78f45d48 100644 --- a/Mage.Sets/src/mage/cards/v/VagrantPlowbeasts.java +++ b/Mage.Sets/src/mage/cards/v/VagrantPlowbeasts.java @@ -27,20 +27,21 @@ */ package mage.cards.v; -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Zone; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.RegenerateTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.Filter.ComparisonType; +import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author North @@ -50,7 +51,7 @@ public class VagrantPlowbeasts extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public VagrantPlowbeasts(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/v/ValorousStance.java b/Mage.Sets/src/mage/cards/v/ValorousStance.java index 87478ab420..6dee7f701b 100644 --- a/Mage.Sets/src/mage/cards/v/ValorousStance.java +++ b/Mage.Sets/src/mage/cards/v/ValorousStance.java @@ -27,7 +27,7 @@ */ package mage.cards.v; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -36,11 +36,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -50,7 +51,7 @@ public class ValorousStance extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 4 or greater"); static { - filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new ToughnessPredicate(CountType.MORE_THAN, 3)); } public ValorousStance(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/v/VanquishTheFoul.java b/Mage.Sets/src/mage/cards/v/VanquishTheFoul.java index 9ab114745d..c08c63c1ca 100644 --- a/Mage.Sets/src/mage/cards/v/VanquishTheFoul.java +++ b/Mage.Sets/src/mage/cards/v/VanquishTheFoul.java @@ -27,18 +27,19 @@ */ package mage.cards.v; -import java.util.UUID; +import mage.abilities.CountType; 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.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -47,7 +48,7 @@ public class VanquishTheFoul extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } public VanquishTheFoul(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java b/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java index bfd5f8d247..69517275d8 100644 --- a/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java +++ b/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java @@ -27,8 +27,8 @@ */ package mage.cards.v; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; @@ -37,7 +37,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterNonlandCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -45,6 +44,8 @@ import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author Styxo @@ -90,7 +91,7 @@ class VenarianGlimmerEffect extends OneShotEffect { Player player = game.getPlayer(targetPointer.getFirst(game, source)); if (player != null) { FilterCard filter = new FilterNonlandCard(); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, source.getManaCostsToPay().getX() + 1)); Effect effect = new DiscardCardYouChooseTargetEffect(filter, TargetController.ANY); effect.setTargetPointer(targetPointer); effect.apply(game, source); diff --git a/Mage.Sets/src/mage/cards/v/VillainousWealth.java b/Mage.Sets/src/mage/cards/v/VillainousWealth.java index 8e3181a2eb..c0c8320c50 100644 --- a/Mage.Sets/src/mage/cards/v/VillainousWealth.java +++ b/Mage.Sets/src/mage/cards/v/VillainousWealth.java @@ -27,19 +27,14 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.common.FilterNonlandCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -49,6 +44,8 @@ import mage.target.common.TargetCardInExile; import mage.target.common.TargetOpponent; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author LevelX2 @@ -97,7 +94,7 @@ class VillainousWealthEffect extends OneShotEffect { if (controller != null) { Player player = game.getPlayer(targetPointer.getFirst(game, source)); FilterCard filter = new FilterNonlandCard(); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, source.getManaCostsToPay().getX() + 1)); UUID exileId = CardUtil.getCardExileZoneId(game, source); if (player != null) { Cards cardsToExile = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/v/VineSnare.java b/Mage.Sets/src/mage/cards/v/VineSnare.java index f8267fc69c..2e228ab1b4 100644 --- a/Mage.Sets/src/mage/cards/v/VineSnare.java +++ b/Mage.Sets/src/mage/cards/v/VineSnare.java @@ -27,16 +27,17 @@ */ package mage.cards.v; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class VineSnare extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 4 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 5)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 5)); } public VineSnare(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/v/VodalianKnights.java b/Mage.Sets/src/mage/cards/v/VodalianKnights.java index 32ed0da663..4c72bad721 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianKnights.java +++ b/Mage.Sets/src/mage/cards/v/VodalianKnights.java @@ -27,8 +27,8 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -43,9 +43,10 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterLandPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -67,7 +68,7 @@ public class VodalianKnights extends CardImpl { // When you control no Islands, sacrifice Vodalian Knights. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0, new SacrificeSourceEffect())); // {U}: Vodalian Knights gains flying until end of turn. diff --git a/Mage.Sets/src/mage/cards/v/Void.java b/Mage.Sets/src/mage/cards/v/Void.java index 8a1045ec6b..725c4b4708 100644 --- a/Mage.Sets/src/mage/cards/v/Void.java +++ b/Mage.Sets/src/mage/cards/v/Void.java @@ -27,10 +27,8 @@ */ package mage.cards.v; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; @@ -39,7 +37,6 @@ import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -49,14 +46,17 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPlayer; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** - * * @author LevelX2 */ public class Void extends CardImpl { public Void(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}{R}"); // Choose a number. Destroy all artifacts and creatures with converted mana cost equal to that number. Then target player reveals his or her hand and discards all nonland cards with converted mana cost equal to the number. this.getSpellAbility().addTarget(new TargetPlayer()); @@ -110,7 +110,7 @@ class VoidEffect extends OneShotEffect { } } FilterCard filterCard = new FilterCard(); - filterCard.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, number)); + filterCard.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, number)); filterCard.add(Predicates.not(new CardTypePredicate(CardType.LAND))); Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); diff --git a/Mage.Sets/src/mage/cards/w/WarNameAspirant.java b/Mage.Sets/src/mage/cards/w/WarNameAspirant.java index 4caee17f46..ab1f874104 100644 --- a/Mage.Sets/src/mage/cards/w/WarNameAspirant.java +++ b/Mage.Sets/src/mage/cards/w/WarNameAspirant.java @@ -27,8 +27,8 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.condition.common.RaidCondition; @@ -39,11 +39,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.watchers.common.PlayerAttackedWatcher; +import java.util.UUID; + /** * * @author emerald000 @@ -53,7 +54,7 @@ public class WarNameAspirant extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 1 or less"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 2)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 2)); } public WarNameAspirant(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/w/WarpingWail.java b/Mage.Sets/src/mage/cards/w/WarpingWail.java index b4f5f30064..9a7bf365ee 100644 --- a/Mage.Sets/src/mage/cards/w/WarpingWail.java +++ b/Mage.Sets/src/mage/cards/w/WarpingWail.java @@ -27,7 +27,7 @@ */ package mage.cards.w; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CounterTargetEffect; @@ -36,8 +36,6 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -48,6 +46,8 @@ import mage.game.permanent.token.EldraziScionToken; import mage.target.TargetSpell; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -59,8 +59,8 @@ public class WarpingWail extends CardImpl { static { filterCreature.add(Predicates.or( - new PowerPredicate(Filter.ComparisonType.LessThan, 2), - new ToughnessPredicate(ComparisonType.LessThan, 2))); + new PowerPredicate(CountType.FEWER_THAN, 2), + new ToughnessPredicate(CountType.FEWER_THAN, 2))); filterSorcery.add(new CardTypePredicate(CardType.SORCERY)); } diff --git a/Mage.Sets/src/mage/cards/w/WhereAncientsTread.java b/Mage.Sets/src/mage/cards/w/WhereAncientsTread.java index 90c9bdb64f..bb825b05aa 100644 --- a/Mage.Sets/src/mage/cards/w/WhereAncientsTread.java +++ b/Mage.Sets/src/mage/cards/w/WhereAncientsTread.java @@ -27,20 +27,20 @@ */ package mage.cards.w; -import java.util.UUID; - -import mage.constants.CardType; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author Plopman @@ -49,7 +49,7 @@ import mage.target.common.TargetCreatureOrPlayer; private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 4)); } public WhereAncientsTread(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/w/WildPair.java b/Mage.Sets/src/mage/cards/w/WildPair.java index 3813014b4d..ef18d21642 100644 --- a/Mage.Sets/src/mage/cards/w/WildPair.java +++ b/Mage.Sets/src/mage/cards/w/WildPair.java @@ -27,9 +27,9 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.condition.Condition; import mage.abilities.decorator.ConditionalTriggeredAbility; @@ -37,12 +37,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SetTargetPointer; -import mage.constants.TargetController; -import mage.constants.Zone; -import mage.filter.Filter; +import mage.constants.*; import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.IntComparePredicate; @@ -54,6 +49,8 @@ import mage.players.Player; import mage.target.common.TargetCardInLibrary; import mage.watchers.common.CastFromHandWatcher; +import java.util.UUID; + /** * * @author fenhl @@ -111,7 +108,7 @@ class WildPairEffect extends OneShotEffect { if (permanent != null) { int totalPT = permanent.getPower().getValue() + permanent.getToughness().getValue(); FilterCreatureCard filter = new FilterCreatureCard("creature card with total power and toughness " + totalPT); - filter.add(new TotalPowerAndToughnessPredicate(Filter.ComparisonType.Equal, totalPT)); + filter.add(new TotalPowerAndToughnessPredicate(CountType.EQUAL_TO, totalPT)); TargetCardInLibrary target = new TargetCardInLibrary(1, filter); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { @@ -132,7 +129,7 @@ class WildPairEffect extends OneShotEffect { */ class TotalPowerAndToughnessPredicate extends IntComparePredicate { - public TotalPowerAndToughnessPredicate(Filter.ComparisonType type, int value) { + public TotalPowerAndToughnessPredicate(CountType type, int value) { super(type, value); } diff --git a/Mage.Sets/src/mage/cards/w/WisdomOfTheJedi.java b/Mage.Sets/src/mage/cards/w/WisdomOfTheJedi.java index 9119596e31..5286c5ee85 100644 --- a/Mage.Sets/src/mage/cards/w/WisdomOfTheJedi.java +++ b/Mage.Sets/src/mage/cards/w/WisdomOfTheJedi.java @@ -27,7 +27,7 @@ */ package mage.cards.w; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.Mode; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CounterTargetEffect; @@ -38,12 +38,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetSpell; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author Styxo @@ -53,7 +54,7 @@ public class WisdomOfTheJedi extends CardImpl { private static final FilterSpell filterSpell = new FilterSpell("spell with converted mana cost of 3 or less"); static { - filterSpell.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filterSpell.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public WisdomOfTheJedi(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/w/WoodlandBellower.java b/Mage.Sets/src/mage/cards/w/WoodlandBellower.java index 5f186fa00a..cc9fe80a60 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandBellower.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandBellower.java @@ -30,6 +30,7 @@ package mage.cards.w; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -39,7 +40,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -99,7 +99,7 @@ class WoodlandBellowerEffect extends OneShotEffect { filter.add(new ColorPredicate(ObjectColor.GREEN)); filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(Predicates.not(new SupertypePredicate(SuperType.LEGENDARY))); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); TargetCardInLibrary target = new TargetCardInLibrary(filter); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { diff --git a/Mage.Sets/src/mage/cards/w/Wrangle.java b/Mage.Sets/src/mage/cards/w/Wrangle.java index 9837a6c515..ef05776b69 100644 --- a/Mage.Sets/src/mage/cards/w/Wrangle.java +++ b/Mage.Sets/src/mage/cards/w/Wrangle.java @@ -27,7 +27,7 @@ */ package mage.cards.w; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.effects.Effect; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -37,11 +37,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.Filter.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -51,7 +52,7 @@ public class Wrangle extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or less"); static { - filter.add(new PowerPredicate(ComparisonType.LessThan, 5)); + filter.add(new PowerPredicate(CountType.FEWER_THAN, 5)); } public Wrangle(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java b/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java index f5d657079f..19da42bce6 100644 --- a/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java +++ b/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java @@ -29,6 +29,7 @@ package mage.cards.y; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.PutCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; @@ -42,7 +43,6 @@ import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.Counter; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; @@ -108,7 +108,7 @@ class YisanTheWandererBardEffect extends OneShotEffect { if (sourcePermanent != null && controller != null) { int newConvertedCost = sourcePermanent.getCounters(game).getCount("verse"); FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, newConvertedCost)); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, newConvertedCost)); filter.add(new CardTypePredicate(CardType.CREATURE)); TargetCardInLibrary target = new TargetCardInLibrary(filter); if (controller.searchLibrary(target, game)) { diff --git a/Mage.Sets/src/mage/cards/z/ZurTheEnchanter.java b/Mage.Sets/src/mage/cards/z/ZurTheEnchanter.java index 517c63b07a..1f938a1917 100644 --- a/Mage.Sets/src/mage/cards/z/ZurTheEnchanter.java +++ b/Mage.Sets/src/mage/cards/z/ZurTheEnchanter.java @@ -27,8 +27,8 @@ */ package mage.cards.z; -import java.util.UUID; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.FlyingAbility; @@ -36,12 +36,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SuperType; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class ZurTheEnchanter extends CardImpl { static { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4)); } public ZurTheEnchanter(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/z/ZurgoBellstriker.java b/Mage.Sets/src/mage/cards/z/ZurgoBellstriker.java index d94c5ca267..ff08e91e06 100644 --- a/Mage.Sets/src/mage/cards/z/ZurgoBellstriker.java +++ b/Mage.Sets/src/mage/cards/z/ZurgoBellstriker.java @@ -28,6 +28,7 @@ package mage.cards.z; import mage.MageInt; +import mage.abilities.CountType; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; import mage.abilities.keyword.DashAbility; @@ -36,7 +37,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -51,7 +51,7 @@ public class ZurgoBellstriker extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater"); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 1)); } public ZurgoBellstriker(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage/src/main/java/mage/abilities/CountType.java b/Mage/src/main/java/mage/abilities/CountType.java index 767a6ce74f..524829fbda 100644 --- a/Mage/src/main/java/mage/abilities/CountType.java +++ b/Mage/src/main/java/mage/abilities/CountType.java @@ -3,12 +3,23 @@ package mage.abilities; /** * Created by IGOUDT on 5-3-2017. */ -public enum CountType { - MORE_THAN, FEWER_THAN, EQUAL_TO; +public enum CountType { + MORE_THAN(">"), FEWER_THAN("<"), EQUAL_TO("=="); + + String operator; + + CountType(String op) { + operator = op; + } + + @Override + public String toString() { + return operator; + } - public static boolean compare(int source, CountType comparison, int target){ - switch (comparison){ + public static boolean compare(int source, CountType comparison, int target) { + switch (comparison) { case MORE_THAN: return source > target; case FEWER_THAN: @@ -16,7 +27,7 @@ public enum CountType { case EQUAL_TO: return source == target; default: - throw new IllegalArgumentException("comparison rules for "+comparison + " missing"); + throw new IllegalArgumentException("comparison rules for " + comparison + " missing"); } } } diff --git a/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java index 850443f357..9019fd9739 100644 --- a/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java @@ -27,10 +27,10 @@ */ package mage.abilities.common; +import mage.abilities.CountType; import mage.abilities.StateTriggeredAbility; import mage.abilities.effects.Effect; import mage.constants.Zone; -import mage.filter.Filter.ComparisonType; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.events.GameEvent; @@ -44,10 +44,10 @@ import mage.game.events.GameEvent; public class ControlsPermanentsControllerTriggeredAbility extends StateTriggeredAbility { protected final FilterPermanent filter; - protected final ComparisonType type; + protected final CountType type; protected final int value; - public ControlsPermanentsControllerTriggeredAbility(FilterPermanent filter, ComparisonType type, int value, Effect effect) { + public ControlsPermanentsControllerTriggeredAbility(FilterPermanent filter, CountType type, int value, Effect effect) { super(Zone.BATTLEFIELD, effect); this.filter = filter; this.value = value; @@ -69,24 +69,7 @@ public class ControlsPermanentsControllerTriggeredAbility extends StateTriggered @Override public boolean checkTrigger(GameEvent event, Game game) { int inputValue = game.getBattlefield().countAll(filter, getControllerId(), game); - switch (type) { - case Equal: - if (inputValue != value) { - return false; - } - break; - case GreaterThan: - if (inputValue <= value) { - return false; - } - break; - case LessThan: - if (inputValue >= value) { - return false; - } - break; - } - return true; + return CountType.compare(value, type, inputValue); } @Override diff --git a/Mage/src/main/java/mage/abilities/condition/Condition.java b/Mage/src/main/java/mage/abilities/condition/Condition.java index 5ea393c4c9..512d372000 100644 --- a/Mage/src/main/java/mage/abilities/condition/Condition.java +++ b/Mage/src/main/java/mage/abilities/condition/Condition.java @@ -1,9 +1,10 @@ package mage.abilities.condition; -import java.io.Serializable; import mage.abilities.Ability; import mage.game.Game; +import java.io.Serializable; + /** * Interface describing condition occurrence. @@ -13,24 +14,6 @@ import mage.game.Game; @FunctionalInterface public interface Condition extends Serializable { - enum ComparisonType { - - GreaterThan(">"), - Equal("=="), - LessThan("<"); - - private final String text; - - ComparisonType(String text) { - this.text = text; - } - - @Override - public String toString() { - return text; - } - } - /** * Checks the game to see if this condition applies for the given ability. * diff --git a/Mage/src/main/java/mage/abilities/condition/common/CardsInAnyLibraryCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInAnyLibraryCondition.java index b0e6681f8d..cfa5e4f5a8 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/CardsInAnyLibraryCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/CardsInAnyLibraryCondition.java @@ -27,22 +27,23 @@ */ package mage.abilities.condition.common; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.condition.Condition; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** - * * @author LevelX2 */ public class CardsInAnyLibraryCondition implements Condition { - protected final Condition.ComparisonType type; + protected final CountType type; protected final int value; - public CardsInAnyLibraryCondition(Condition.ComparisonType type, int value) { + public CardsInAnyLibraryCondition(CountType type, int value) { this.type = type; this.value = value; } @@ -54,23 +55,8 @@ public class CardsInAnyLibraryCondition implements Condition { for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - switch (type) { - case GreaterThan: - if (player.getLibrary().size() > value) { - return true; - } - break; - case Equal: - if (player.getLibrary().size() == value) { - return true; - } - break; - case LessThan: - if (player.getLibrary().size() < value) { - return true; - } - break; - } + return CountType.compare(player.getLibrary().size(), type, value); + } } } @@ -81,13 +67,13 @@ public class CardsInAnyLibraryCondition implements Condition { public String toString() { StringBuilder sb = new StringBuilder("a library has "); switch (type) { - case GreaterThan: + case MORE_THAN: sb.append(value + 1).append(" or more cards in it "); break; - case Equal: + case EQUAL_TO: sb.append(value).append(" cards in it "); break; - case LessThan: + case FEWER_THAN: sb.append(value - 1).append(" or fewer cards in it "); break; } diff --git a/Mage/src/main/java/mage/abilities/condition/common/FerociousCondition.java b/Mage/src/main/java/mage/abilities/condition/common/FerociousCondition.java index 3a2df9c78b..512a914ef6 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/FerociousCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/FerociousCondition.java @@ -29,8 +29,8 @@ package mage.abilities.condition.common; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.condition.Condition; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; @@ -43,7 +43,7 @@ public enum FerociousCondition implements Condition { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); static { - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(CountType.MORE_THAN, 3)); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java index 46294e4581..03bae928ed 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/cost/CastWithoutPayingManaCostEffect.java @@ -29,10 +29,10 @@ package mage.abilities.effects.common.cost; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.constants.Outcome; -import mage.filter.Filter; import mage.filter.common.FilterNonlandCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -58,7 +58,7 @@ public class CastWithoutPayingManaCostEffect extends OneShotEffect { public CastWithoutPayingManaCostEffect(int maxCost) { super(Outcome.PlayForFree); filter = new FilterNonlandCard("card with converted mana cost " + maxCost + " or less from your hand"); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, maxCost + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, maxCost + 1)); this.manaCost = maxCost; this.staticText = "you may cast a card with converted mana cost " + maxCost + " or less from your hand without paying its mana cost"; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryWithLessCMCPutInPlayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryWithLessCMCPutInPlayEffect.java index 889ca401dc..e4b753d777 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryWithLessCMCPutInPlayEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryWithLessCMCPutInPlayEffect.java @@ -28,11 +28,11 @@ package mage.abilities.effects.common.search; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; @@ -67,7 +67,7 @@ public class SearchLibraryWithLessCMCPutInPlayEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { FilterCard advancedFilter = filter.copy(); // never change static objects so copy the object here before - advancedFilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1)); + advancedFilter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, source.getManaCostsToPay().getX() + 1)); TargetCardInLibrary target = new TargetCardInLibrary(advancedFilter); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java index 86de47c283..8805ea9e7a 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java @@ -28,6 +28,7 @@ package mage.abilities.effects.keyword; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.Effect; @@ -35,7 +36,6 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.constants.Outcome; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; @@ -96,7 +96,7 @@ public class BolsterEffect extends OneShotEffect { if (leastToughness != Integer.MAX_VALUE) { if (selectedCreature == null) { FilterPermanent filter = new FilterControlledCreaturePermanent("creature you control with toughness " + leastToughness); - filter.add(new ToughnessPredicate(Filter.ComparisonType.Equal, leastToughness)); + filter.add(new ToughnessPredicate(CountType.EQUAL_TO, leastToughness)); Target target = new TargetPermanent(1,1, filter, true); if (controller.chooseTarget(outcome, target, source, game)) { selectedCreature = game.getPermanent(target.getFirstTarget()); diff --git a/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java b/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java index 056926ec1a..027d6c67df 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java @@ -28,18 +28,19 @@ package mage.abilities.keyword; -import java.util.UUID; +import mage.abilities.CountType; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.ReturnToHandTargetEffect; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * 702.45. Soulshift @@ -75,7 +76,7 @@ public class SoulshiftAbility extends DiesTriggeredAbility { this.getTargets().clear(); int intValue = amount.calculate(game, this, null); FilterCard filter = new FilterCard("Spirit card with converted mana cost " + intValue + " or less from your graveyard"); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, intValue + 1)); + filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, intValue + 1)); filter.add(new SubtypePredicate("Spirit")); this.addTarget(new TargetCardInYourGraveyard(filter)); super.trigger(game, controllerId); //To change body of generated methods, choose Tools | Templates. diff --git a/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java b/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java index 5dc86dada7..0b87c3fe2a 100644 --- a/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java @@ -1,6 +1,8 @@ package mage.abilities.keyword; +import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.DiscardSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -8,17 +10,14 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.Outcome; +import mage.constants.TimingRule; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; -import mage.MageObject; -import mage.constants.TimingRule; - /** * * 702.52. Transmute @@ -79,7 +78,7 @@ class TransmuteEffect extends OneShotEffect { MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null && controller != null) { FilterCard filter = new FilterCard("card with converted mana cost " + sourceObject.getConvertedManaCost()); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, sourceObject.getConvertedManaCost())); + filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, sourceObject.getConvertedManaCost())); TargetCardInLibrary target = new TargetCardInLibrary(1, filter); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { diff --git a/Mage/src/main/java/mage/filter/Filter.java b/Mage/src/main/java/mage/filter/Filter.java index 83c7d8ee52..3f701fa69b 100644 --- a/Mage/src/main/java/mage/filter/Filter.java +++ b/Mage/src/main/java/mage/filter/Filter.java @@ -27,37 +27,18 @@ */ package mage.filter; -import java.io.Serializable; import mage.filter.predicate.Predicate; import mage.game.Game; +import java.io.Serializable; + /** - * + * @param * @author BetaSteward_at_googlemail.com * @author North - * - * @param */ public interface Filter extends Serializable { - enum ComparisonType { - - GreaterThan(">"), - Equal("=="), - LessThan("<"); - - private final String text; - - ComparisonType(String text) { - this.text = text; - } - - @Override - public String toString() { - return text; - } - } - enum ComparisonScope { Any, All } diff --git a/Mage/src/main/java/mage/filter/predicate/IntComparePredicate.java b/Mage/src/main/java/mage/filter/predicate/IntComparePredicate.java index 47e376f511..90e6f3c638 100644 --- a/Mage/src/main/java/mage/filter/predicate/IntComparePredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/IntComparePredicate.java @@ -28,7 +28,7 @@ package mage.filter.predicate; import mage.MageObject; -import mage.filter.Filter; +import mage.abilities.CountType; import mage.game.Game; /** @@ -38,10 +38,10 @@ import mage.game.Game; */ public abstract class IntComparePredicate implements Predicate { - protected final Filter.ComparisonType type; + protected final CountType type; protected final int value; - public IntComparePredicate(Filter.ComparisonType type, int value) { + public IntComparePredicate(CountType type, int value) { this.type = type; this.value = value; } @@ -51,24 +51,7 @@ public abstract class IntComparePredicate implements Predi @Override public final boolean apply(T input, Game game) { int inputValue = getInputValue(input); - switch (type) { - case Equal: - if (inputValue != value) { - return false; - } - break; - case GreaterThan: - if (inputValue <= value) { - return false; - } - break; - case LessThan: - if (inputValue >= value) { - return false; - } - break; - } - return true; + return CountType.compare(value, type, inputValue); } @Override diff --git a/Mage/src/main/java/mage/filter/predicate/mageobject/ConvertedManaCostPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/ConvertedManaCostPredicate.java index 3524d26ded..7515c5e71b 100644 --- a/Mage/src/main/java/mage/filter/predicate/mageobject/ConvertedManaCostPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/ConvertedManaCostPredicate.java @@ -28,7 +28,7 @@ package mage.filter.predicate.mageobject; import mage.MageObject; -import mage.filter.Filter; +import mage.abilities.CountType; import mage.filter.predicate.IntComparePredicate; /** @@ -37,7 +37,7 @@ import mage.filter.predicate.IntComparePredicate; */ public class ConvertedManaCostPredicate extends IntComparePredicate { - public ConvertedManaCostPredicate(Filter.ComparisonType type, int value) { + public ConvertedManaCostPredicate(CountType type, int value) { super(type, value); } diff --git a/Mage/src/main/java/mage/filter/predicate/mageobject/PowerPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/PowerPredicate.java index 8e69605076..45425282e3 100644 --- a/Mage/src/main/java/mage/filter/predicate/mageobject/PowerPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/PowerPredicate.java @@ -28,7 +28,7 @@ package mage.filter.predicate.mageobject; import mage.MageObject; -import mage.filter.Filter; +import mage.abilities.CountType; import mage.filter.predicate.IntComparePredicate; /** @@ -37,7 +37,7 @@ import mage.filter.predicate.IntComparePredicate; */ public class PowerPredicate extends IntComparePredicate { - public PowerPredicate(Filter.ComparisonType type, int value) { + public PowerPredicate(CountType type, int value) { super(type, value); } diff --git a/Mage/src/main/java/mage/filter/predicate/mageobject/ToughnessPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/ToughnessPredicate.java index a17d2ca73f..228aaafed0 100644 --- a/Mage/src/main/java/mage/filter/predicate/mageobject/ToughnessPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/ToughnessPredicate.java @@ -28,7 +28,7 @@ package mage.filter.predicate.mageobject; import mage.MageObject; -import mage.filter.Filter; +import mage.abilities.CountType; import mage.filter.predicate.IntComparePredicate; /** @@ -37,7 +37,7 @@ import mage.filter.predicate.IntComparePredicate; */ public class ToughnessPredicate extends IntComparePredicate { - public ToughnessPredicate(Filter.ComparisonType type, int value) { + public ToughnessPredicate(CountType type, int value) { super(type, value); }