there were 3 enums to compare ints, refactored to 1

This commit is contained in:
ingmargoudt 2017-04-10 00:21:09 +02:00
parent 813d84274a
commit cb693b5826
339 changed files with 1263 additions and 1225 deletions

View file

@ -28,6 +28,7 @@
package mage.cards.a; package mage.cards.a;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CantBeCounteredSourceEffect; import mage.abilities.effects.common.CantBeCounteredSourceEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterNonlandPermanent; import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.common.TargetNonlandPermanent; 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"); private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent with converted mana cost 3 or less");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
} }
public AbruptDecay(UUID ownerId, CardSetInfo setInfo) { public AbruptDecay(UUID ownerId, CardSetInfo setInfo) {

View file

@ -27,6 +27,7 @@
*/ */
package mage.cards.a; package mage.cards.a;
import mage.abilities.CountType;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent FILTER = new FilterCreaturePermanent("creature with power 3 or greater");
static { static {
FILTER.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); FILTER.add(new PowerPredicate(CountType.MORE_THAN, 2));
} }
public AbzanCharm(UUID ownerId, CardSetInfo setInfo) { public AbzanCharm(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.a; package mage.cards.a;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -37,7 +38,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.filter.predicate.mageobject.ToughnessPredicate; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("1/1 creature");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.Equal, 1)); filter.add(new PowerPredicate(CountType.EQUAL_TO, 1));
filter.add(new ToughnessPredicate(Filter.ComparisonType.Equal, 1)); filter.add(new ToughnessPredicate(CountType.EQUAL_TO, 1));
} }
public AegisOfTheMeek(UUID ownerId, CardSetInfo setInfo) { public AegisOfTheMeek(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.a; package mage.cards.a;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
@ -41,7 +42,6 @@ import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -104,7 +104,7 @@ class AetherVialEffect extends OneShotEffect {
int count = permanent.getCounters(game).getCount(CounterType.CHARGE); int count = permanent.getCounters(game).getCount(CounterType.CHARGE);
FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost equal to " + count); 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?"; String choiceText = "Put a " + filter.getMessage() + " from your hand onto the battlefield?";
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());

View file

@ -29,6 +29,7 @@ package mage.cards.a;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -41,7 +42,6 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.Game; 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"); private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public AleshaWhoSmilesAtDeath(UUID ownerId, CardSetInfo setInfo) { public AleshaWhoSmilesAtDeath(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.a; package mage.cards.a;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -37,7 +38,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.Game; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 5 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); filter.add(new PowerPredicate(CountType.MORE_THAN, 4));
} }
public AlignedHedronNetworkExileEffect() { public AlignedHedronNetworkExileEffect() {

View file

@ -28,6 +28,7 @@
package mage.cards.a; package mage.cards.a;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.SourceIsSpellCondition; import mage.abilities.condition.common.SourceIsSpellCondition;
import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.AlternativeCostSourceAbility;
@ -37,7 +38,6 @@ import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; 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"); private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with converted mana cost 3 or less");
static { static {
filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
} }
public Aluren(UUID ownerId, CardSetInfo setInfo) { 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"); private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with converted mana cost 3 or less");
static { 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() { public AlurenRuleEffect() {
super(Duration.WhileOnBattlefield, Outcome.Detriment); super(Duration.WhileOnBattlefield, Outcome.Detriment);

View file

@ -28,13 +28,13 @@
package mage.cards.a; package mage.cards.a;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.common.SimpleEvasionAbility;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 3 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); filter.add(new PowerPredicate(CountType.MORE_THAN, 2));
} }
public AmrouKithkin(UUID ownerId, CardSetInfo setInfo) { public AmrouKithkin(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.a; package mage.cards.a;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; 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"); private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with converted mana cost 3 or less");
static { static {
filter.add(new SubtypePredicate("Rebel")); 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) { public AmrouScout(UUID ownerId, CardSetInfo setInfo) {

View file

@ -27,11 +27,11 @@
*/ */
package mage.cards.a; package mage.cards.a;
import mage.abilities.CountType;
import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect; import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.common.TargetOpponent; 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"); private static final FilterCard filter = new FilterCard("a card from it with converted mana cost 4 or greater");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 3)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 3));
} }
public AppetiteForBrains(UUID ownerId, CardSetInfo setInfo) { public AppetiteForBrains(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.a; package mage.cards.a;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.AttachedToMatchesFilterCondition; import mage.abilities.condition.common.AttachedToMatchesFilterCondition;
@ -41,7 +42,6 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -70,7 +70,7 @@ public class ArachnusWeb extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect())); 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. // 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"); 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, this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD,
new DestroySourceEffect(), TargetController.ANY, new DestroySourceEffect(), TargetController.ANY,
new AttachedToMatchesFilterCondition(filter), false)); new AttachedToMatchesFilterCondition(filter), false));

View file

@ -28,6 +28,7 @@
package mage.cards.a; package mage.cards.a;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterArtifactCard; import mage.filter.common.FilterArtifactCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.common.TargetCardInLibrary; 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"); private static final FilterArtifactCard filter = new FilterArtifactCard("artifact card with converted mana cost 1 or less");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2));
} }
public ArtificersIntuition(UUID ownerId, CardSetInfo setInfo) { public ArtificersIntuition(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");

View file

@ -29,6 +29,7 @@ package mage.cards.a;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
@ -37,7 +38,6 @@ import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.*; import mage.cards.*;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; 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()); 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())); Target target = new TargetCardInExile(filter, CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()));

View file

@ -29,6 +29,7 @@ package mage.cards.a;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterArtifactCard; import mage.filter.common.FilterArtifactCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.common.TargetCardInYourGraveyard; 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"); private static final FilterArtifactCard filter = new FilterArtifactCard("artifact card with converted mana cost 1 or less from your graveyard");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 2)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 2));
} }
public AuriokSalvagers(UUID ownerId, CardSetInfo setInfo) { public AuriokSalvagers(UUID ownerId, CardSetInfo setInfo) {

View file

@ -27,12 +27,12 @@
*/ */
package mage.cards.a; package mage.cards.a;
import mage.abilities.CountType;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterArtifactPermanent; import mage.filter.common.FilterArtifactPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterEnchantmentPermanent; 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 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"); private static final FilterCreaturePermanent filter4orMore = new FilterCreaturePermanent("creatures with converted mana cost 4 or greater");
static { static {
filter3orLess.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); filter3orLess.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
filter4orMore.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 3)); filter4orMore.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 3));
} }
public AustereCommand(UUID ownerId, CardSetInfo setInfo) { public AustereCommand(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.a;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.Target; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public AysenBureaucrats(UUID ownerId, CardSetInfo setInfo) { public AysenBureaucrats(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,12 +28,12 @@
package mage.cards.b; package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 1 or less");
static { static {
filter.add(new PowerPredicate(ComparisonType.LessThan, 2)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 2));
} }
public BalaGedScorpion(UUID ownerId, CardSetInfo setInfo) { public BalaGedScorpion(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,12 +28,12 @@
package mage.cards.b; package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -62,7 +62,7 @@ public class BarbarianOutcast extends CardImpl {
// When you control no Swamps, sacrifice Barbarian Outcast. // When you control no Swamps, sacrifice Barbarian Outcast.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
new FilterLandPermanent("Swamp", "no Swamps"), Filter.ComparisonType.Equal, 0, new FilterLandPermanent("Swamp", "no Swamps"), CountType.EQUAL_TO, 0,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -30,6 +30,7 @@ package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
@ -39,7 +40,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater");
static { static {
filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); filter.add(new PowerPredicate(CountType.MORE_THAN, 4));
} }
public BeaconBehemoth (UUID ownerId, CardSetInfo setInfo) { public BeaconBehemoth (UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -36,7 +37,6 @@ import mage.abilities.keyword.MadnessAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 4 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); filter.add(new PowerPredicate(CountType.MORE_THAN, 3));
} }
public BigGameHunter(UUID ownerId, CardSetInfo setInfo) { public BigGameHunter(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.b; package mage.cards.b;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
@ -40,7 +41,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -106,7 +106,7 @@ class BirthingPodEffect extends OneShotEffect {
if (sacrificedPermanent != null && controller != null) { if (sacrificedPermanent != null && controller != null) {
int newConvertedCost = sacrificedPermanent.getConvertedManaCost() + 1; int newConvertedCost = sacrificedPermanent.getConvertedManaCost() + 1;
FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost); 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)); filter.add(new CardTypePredicate(CardType.CREATURE));
TargetCardInLibrary target = new TargetCardInLibrary(filter); TargetCardInLibrary target = new TargetCardInLibrary(filter);
if (controller.searchLibrary(target, game)) { if (controller.searchLibrary(target, game)) {

View file

@ -29,6 +29,7 @@ package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -38,7 +39,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -57,7 +57,7 @@ public class Blightspeaker extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Rebel")); 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) { public Blightspeaker(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.b; package mage.cards.b;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
@ -39,7 +40,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate;
@ -58,7 +58,7 @@ public class BloodLust extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static { static {
filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 4)); filter.add(new ToughnessPredicate(CountType.MORE_THAN, 4));
} }
public BloodLust(UUID ownerId, CardSetInfo setInfo) { public BloodLust(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.b; package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
@ -37,7 +38,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater");
static { static {
filter.add(new PowerPredicate(ComparisonType.GreaterThan, 4)); filter.add(new PowerPredicate(CountType.MORE_THAN, 4));
} }
public BloodthornTaunter(UUID ownerId, CardSetInfo setInfo) { public BloodthornTaunter(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
@ -38,7 +39,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
@ -60,7 +60,7 @@ public class BogGlider extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Mercenary")); 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) { public BogGlider(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.b; package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import java.util.UUID; import java.util.UUID;
@ -58,7 +58,7 @@ public class BogSerpent extends CardImpl {
// When you control no Swamps, sacrifice Bog Serpent. // When you control no Swamps, sacrifice Bog Serpent.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
new FilterLandPermanent("Swamp", "no Swamps"), Filter.ComparisonType.Equal, 0, new FilterLandPermanent("Swamp", "no Swamps"), CountType.EQUAL_TO, 0,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -28,6 +28,7 @@
package mage.cards.b; package mage.cards.b;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.RemoveVariableCountersSourceCost; import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
@ -42,7 +43,6 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.common.FilterInstantOrSorceryCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -108,7 +108,7 @@ class BrainInAJarCastEffect extends OneShotEffect {
if (controller != null && sourceObject != null) { if (controller != null && sourceObject != null) {
int counters = sourceObject.getCounters(game).getCount(CounterType.CHARGE); int counters = sourceObject.getCounters(game).getCount(CounterType.CHARGE);
FilterCard filter = new FilterInstantOrSorceryCard(); 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); 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)) { 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); TargetCardInHand target = new TargetCardInHand(filter);

View file

@ -28,13 +28,13 @@
package mage.cards.b; package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); filter.add(new PowerPredicate(CountType.MORE_THAN, 1));
} }
public BrassclawOrcs(UUID ownerId, CardSetInfo setInfo) { public BrassclawOrcs(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.b; package mage.cards.b;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
@ -39,7 +40,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public BreakThroughTheLine(UUID ownerId, CardSetInfo setInfo) { public BreakThroughTheLine(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.b; package mage.cards.b;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount; import mage.abilities.dynamicvalue.common.ColorsOfManaSpentToCastCount;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
@ -36,7 +37,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -98,7 +98,7 @@ class BringToLightEffect extends OneShotEffect {
int numberColors = ColorsOfManaSpentToCastCount.getInstance().calculate(game, source, this); int numberColors = ColorsOfManaSpentToCastCount.getInstance().calculate(game, source, this);
FilterCard filter = new FilterCard(); FilterCard filter = new FilterCard();
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY))); 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); TargetCardInLibrary target = new TargetCardInLibrary(filter);
controller.searchLibrary(target, game); controller.searchLibrary(target, game);
Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);

View file

@ -28,13 +28,13 @@
package mage.cards.b; package mage.cards.b;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.keyword.InvestigateEffect; import mage.abilities.effects.keyword.InvestigateEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -51,7 +51,7 @@ public class BygoneBishop extends CardImpl {
static { static {
filterSpell.add(new CardTypePredicate(CardType.CREATURE)); 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) { public BygoneBishop(UUID ownerId, CardSetInfo setInfo) {

View file

@ -30,6 +30,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
@ -38,7 +39,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -56,7 +56,7 @@ public class CateranBrute extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Mercenary")); 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) { public CateranBrute(UUID ownerId, CardSetInfo setInfo) {

View file

@ -30,6 +30,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
@ -39,7 +40,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -57,7 +57,7 @@ public class CateranEnforcer extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Mercenary")); 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) { public CateranEnforcer(UUID ownerId, CardSetInfo setInfo) {

View file

@ -30,6 +30,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
@ -38,7 +39,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -47,7 +47,6 @@ import mage.target.common.TargetCardInLibrary;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author Backfir3 * @author Backfir3
*/ */
public class CateranKidnappers extends CardImpl { public class CateranKidnappers extends CardImpl {
@ -56,11 +55,11 @@ public class CateranKidnappers extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Mercenary")); 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) { 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("Human");
this.subtype.add("Mercenary"); this.subtype.add("Mercenary");

View file

@ -30,6 +30,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
@ -40,7 +41,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -59,7 +59,7 @@ public class CateranOverlord extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Mercenary")); 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) { public CateranOverlord(UUID ownerId, CardSetInfo setInfo) {

View file

@ -30,6 +30,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
@ -38,7 +39,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -56,7 +56,7 @@ public class CateranPersuader extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Mercenary")); 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) { public CateranPersuader(UUID ownerId, CardSetInfo setInfo) {

View file

@ -30,6 +30,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
@ -39,7 +40,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -57,7 +57,7 @@ public class CateranSlaver extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Mercenary")); 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) { public CateranSlaver(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyAllEffect;
@ -39,7 +40,6 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterSpiritOrArcaneCard; import mage.filter.common.FilterSpiritOrArcaneCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -101,7 +101,7 @@ class CelestialKirinEffect extends OneShotEffect {
if (spell != null) { if (spell != null) {
int cmc = spell.getConvertedManaCost(); int cmc = spell.getConvertedManaCost();
FilterPermanent filter = new FilterPermanent(); 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 new DestroyAllEffect(filter).apply(game, source);
} }
return false; return false;

View file

@ -28,6 +28,7 @@
package mage.cards.c; package mage.cards.c;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -36,7 +37,6 @@ import mage.cards.*;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; 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"); FilterCard filter = new FilterCard("creature card with converted mana cost X or less");
filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new CardTypePredicate(CardType.CREATURE));
//Set the mana cost one higher to 'emulate' a less than or equal to comparison. //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); TargetCardInLibrary target = new TargetCardInLibrary(filter);
if (player.searchLibrary(target, game)) { if (player.searchLibrary(target, game)) {

View file

@ -29,6 +29,7 @@ package mage.cards.c;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
@ -40,7 +41,6 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate;
import mage.game.ExileZone; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with toughness 4 or greater");
static { static {
filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3)); filter.add(new ToughnessPredicate(CountType.MORE_THAN, 3));
} }
public ColfenorsUrn(UUID ownerId, CardSetInfo setInfo) { public ColfenorsUrn(UUID ownerId, CardSetInfo setInfo) {

View file

@ -27,12 +27,12 @@
*/ */
package mage.cards.c; package mage.cards.c;
import mage.abilities.CountType;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -49,7 +49,7 @@ public class CollectedCompany extends CardImpl {
static { static {
filter.add(new CardTypePredicate(CardType.CREATURE)); 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) { public CollectedCompany(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.c; package mage.cards.c;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.common.TapTargetCost; import mage.abilities.costs.common.TapTargetCost;
@ -40,7 +41,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.FilterPlayer; import mage.filter.FilterPlayer;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -71,7 +71,7 @@ public class CollectiveEffort extends CardImpl {
static { static {
filterUntapped.add(Predicates.not(new TappedPredicate())); 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) { public CollectiveEffort(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,12 +28,12 @@
package mage.cards.c; package mage.cards.c;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.DevoidAbility; import mage.abilities.keyword.DevoidAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 4));
} }
public CompleteDisregard(UUID ownerId, CardSetInfo setInfo) { public CompleteDisregard(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.c; package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.CastSourceTriggeredAbility;
@ -38,7 +39,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.WatcherScope; import mage.constants.WatcherScope;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.ObjectPlayer; import mage.filter.predicate.ObjectPlayer;
import mage.filter.predicate.ObjectPlayerPredicate; import mage.filter.predicate.ObjectPlayerPredicate;
@ -66,7 +66,7 @@ public class ConduitOfRuin extends CardImpl {
static { static {
filter.add(new ColorlessPredicate()); filter.add(new ColorlessPredicate());
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 6)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 6));
filterCost.add(new FirstCastCreatureSpellPredicate()); filterCost.add(new FirstCastCreatureSpellPredicate());
} }

View file

@ -27,11 +27,11 @@
*/ */
package mage.cards.c; package mage.cards.c;
import mage.abilities.CountType;
import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with converted mana cost 3 or less");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
} }
public ConsumeTheMeek(UUID ownerId, CardSetInfo setInfo) { public ConsumeTheMeek(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,13 +28,13 @@
package mage.cards.c; package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterArtifactPermanent; import mage.filter.common.FilterArtifactPermanent;
import java.util.UUID; import java.util.UUID;
@ -56,7 +56,7 @@ public class CovetousDragon extends CardImpl {
// When you control no artifacts, sacrifice Covetous Dragon. // When you control no artifacts, sacrifice Covetous Dragon.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
new FilterArtifactPermanent("no artifacts"), Filter.ComparisonType.Equal, 0, new FilterArtifactPermanent("no artifacts"), CountType.EQUAL_TO, 0,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -28,6 +28,7 @@
package mage.cards.c; package mage.cards.c;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.CountType;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -36,7 +37,6 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
@ -54,7 +54,7 @@ public class Crackdown extends CardImpl {
static { static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.WHITE))); 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) { public Crackdown(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.c; package mage.cards.c;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.effects.common.DamagePlayersEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -35,7 +36,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
@ -117,7 +117,7 @@ class CracklingDoomEffect extends OneShotEffect {
} }
} else if (greatestPower != Integer.MIN_VALUE) { } else if (greatestPower != Integer.MIN_VALUE) {
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature to sacrifice with power equal to " + greatestPower); 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); Target target = new TargetControlledCreaturePermanent(filter);
if (opponent.choose(outcome, target, playerId, game)) { if (opponent.choose(outcome, target, playerId, game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget()); Permanent permanent = game.getPermanent(target.getFirstTarget());

View file

@ -29,6 +29,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public CraftyPathmage(UUID ownerId, CardSetInfo setInfo) { public CraftyPathmage(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.ManaWasSpentCondition; import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -41,7 +42,6 @@ import mage.constants.CardType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -112,7 +112,7 @@ class CryptChampionEffect extends OneShotEffect {
if (player != null) { if (player != null) {
FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard"); FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 3 or less from your graveyard");
filter.add(new OwnerIdPredicate(playerId)); 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); Target target = new TargetCardInGraveyard(filter);
if (target.canChoose(playerId, game) && player.chooseTarget(outcome, target, source, game)) { if (target.canChoose(playerId, game) && player.chooseTarget(outcome, target, source, game)) {
Card card = game.getCard(target.getFirstTarget()); Card card = game.getCard(target.getFirstTarget());

View file

@ -28,13 +28,13 @@
package mage.cards.c; package mage.cards.c;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterNonlandPermanent; import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.Predicate; import mage.filter.predicate.Predicate;
@ -83,7 +83,7 @@ class HasLowestCMCAmongstNonlandPermanentsPredicate implements Predicate<Permane
@Override @Override
public boolean apply(Permanent input, Game game) { public boolean apply(Permanent input, Game game) {
FilterPermanent filter = new FilterNonlandPermanent(); FilterPermanent filter = new FilterNonlandPermanent();
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, input.getConvertedManaCost())); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, input.getConvertedManaCost()));
return !game.getBattlefield().contains(filter, 1, game); return !game.getBattlefield().contains(filter, 1, game);
} }

View file

@ -27,11 +27,11 @@
*/ */
package mage.cards.c; package mage.cards.c;
import mage.abilities.CountType;
import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -45,7 +45,7 @@ public class CullingSun extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
} }
public CullingSun(UUID ownerId, CardSetInfo setInfo) { public CullingSun(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.c; package mage.cards.c;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect;
import mage.abilities.keyword.IntimidateAbility; import mage.abilities.keyword.IntimidateAbility;
@ -35,7 +36,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
@ -49,7 +49,7 @@ public class CyclopsTyrant extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public CyclopsTyrant(UUID ownerId, CardSetInfo setInfo) { public CyclopsTyrant(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
@ -36,20 +37,17 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author KholdFuzion * @author KholdFuzion
*
*/ */
public class Dandan extends CardImpl { public class Dandan extends CardImpl {
public Dandan(UUID ownerId, CardSetInfo setInfo) { public Dandan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{U}");
this.subtype.add("Fish"); this.subtype.add("Fish");
this.power = new MageInt(4); this.power = new MageInt(4);
@ -60,7 +58,7 @@ public class Dandan extends CardImpl {
// When you control no Islands, sacrifice Dandan. // When you control no Islands, sacrifice Dandan.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, new FilterLandPermanent("Island", "no Islands"), CountType.EQUAL_TO, 0,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -30,6 +30,7 @@ package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.common.SimpleEvasionAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
@ -41,7 +42,6 @@ import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.ExileZone; import mage.game.ExileZone;
@ -63,7 +63,7 @@ public class DaxosOfMeletis extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 3 or greater"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 3 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); filter.add(new PowerPredicate(CountType.MORE_THAN, 2));
} }
public DaxosOfMeletis(UUID ownerId, CardSetInfo setInfo) { public DaxosOfMeletis(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -81,7 +81,7 @@ public class DeepfireElemental extends CardImpl {
ability.getTargets().clear(); ability.getTargets().clear();
FilterPermanent newFilter = filter.copy(); FilterPermanent newFilter = filter.copy();
newFilter.setMessage(new StringBuilder("artifact or creature with converted mana cost {").append(ability.getManaCostsToPay().getX()).append('}').toString()); newFilter.setMessage(new StringBuilder("artifact or creature with converted mana cost {").append(ability.getManaCostsToPay().getX()).append('}').toString());
newFilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, ability.getManaCostsToPay().getX())); newFilter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, ability.getManaCostsToPay().getX()));
Target target = new TargetPermanent(newFilter); Target target = new TargetPermanent(newFilter);
ability.addTarget(target); ability.addTarget(target);
} }

View file

@ -27,11 +27,11 @@
*/ */
package mage.cards.d; package mage.cards.d;
import mage.abilities.CountType;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -47,7 +47,7 @@ public class Defeat extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public Defeat(UUID ownerId, CardSetInfo setInfo) { public Defeat(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -37,7 +38,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -55,7 +55,7 @@ public class DefiantFalcon extends CardImpl {
static { static {
filter.add(new SubtypePredicate("Rebel")); filter.add(new SubtypePredicate("Rebel"));
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
} }
public DefiantFalcon(UUID ownerId, CardSetInfo setInfo) { public DefiantFalcon(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.common.SimpleEvasionAbility;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.abilities.keyword.CrewAbility; import mage.abilities.keyword.CrewAbility;
@ -35,7 +36,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
@ -49,7 +49,7 @@ public class DemolitionStomper extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public DemolitionStomper(UUID ownerId, CardSetInfo setInfo) { public DemolitionStomper(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;
import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
@ -36,7 +37,6 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterArtifactPermanent; import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -67,7 +67,7 @@ public class Detonate extends CardImpl {
ability.getTargets().clear(); ability.getTargets().clear();
int xValue = ability.getManaCostsToPay().getX(); int xValue = ability.getManaCostsToPay().getX();
FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact with converted mana cost X"); FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact with converted mana cost X");
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue));
ability.addTarget(new TargetArtifactPermanent(filter)); ability.addTarget(new TargetArtifactPermanent(filter));
} }
} }

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.CounterTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.*;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -61,7 +61,7 @@ public class DimirCharm extends CardImpl {
private static final FilterSpell filterSorcery = new FilterSpell("sorcery spell"); private static final FilterSpell filterSorcery = new FilterSpell("sorcery spell");
static { static {
filterCreature.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filterCreature.add(new PowerPredicate(CountType.FEWER_THAN, 3));
filterSorcery.add(new CardTypePredicate(CardType.SORCERY)); filterSorcery.add(new CardTypePredicate(CardType.SORCERY));
} }

View file

@ -30,6 +30,7 @@ package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.common.DiscardTargetCost; import mage.abilities.costs.common.DiscardTargetCost;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterNonlandCard; import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -112,7 +112,7 @@ class DiscipleOfDeceitEffect extends OneShotEffect {
} }
String targetName = new StringBuilder("card with converted mana cost of ").append(card.getConvertedManaCost()).toString(); String targetName = new StringBuilder("card with converted mana cost of ").append(card.getConvertedManaCost()).toString();
FilterCard filter = new FilterCard(targetName); FilterCard filter = new FilterCard(targetName);
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, card.getConvertedManaCost())); filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, card.getConvertedManaCost()));
return new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true).apply(game, source); return new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true).apply(game, source);
} }
} }

View file

@ -27,11 +27,11 @@
*/ */
package mage.cards.d; package mage.cards.d;
import mage.abilities.CountType;
import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.TargetSpell; import mage.target.TargetSpell;
@ -46,7 +46,7 @@ public class DisdainfulStroke extends CardImpl {
private static final FilterSpell filter = new FilterSpell("spell with converted mana cost 4 or greater"); private static final FilterSpell filter = new FilterSpell("spell with converted mana cost 4 or greater");
static { static {
filter.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 3)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 3));
} }
public DisdainfulStroke(UUID ownerId, CardSetInfo setInfo) { public DisdainfulStroke(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,12 +28,12 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -61,7 +61,7 @@ public class Disembowel extends CardImpl {
ability.getTargets().clear(); ability.getTargets().clear();
int xValue = ability.getManaCostsToPay().getX(); int xValue = ability.getManaCostsToPay().getX();
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost X"); FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost X");
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue)); filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, xValue));
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));
} }
} }

View file

@ -29,6 +29,7 @@ package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.CastSourceTriggeredAbility;
@ -39,7 +40,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -91,8 +91,8 @@ class DistendedMindbenderEffect extends OneShotEffect {
private static final FilterCard filterThreeOrLess = new FilterCard("a nonland card from it with converted mana cost 3 or less"); private static final FilterCard filterThreeOrLess = new FilterCard("a nonland card from it with converted mana cost 3 or less");
static { static {
filterFourOrGreater.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 3)); filterFourOrGreater.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 3));
filterThreeOrLess.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); filterThreeOrLess.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
filterThreeOrLess.add(Predicates.not(new CardTypePredicate(CardType.LAND))); filterThreeOrLess.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
} }

View file

@ -28,13 +28,13 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;
import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -67,7 +67,7 @@ public class Dominate extends CardImpl {
ability.getTargets().clear(); ability.getTargets().clear();
int xValue = ability.getManaCostsToPay().getX(); int xValue = ability.getManaCostsToPay().getX();
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost X or less"); FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost X or less");
filter.add(Predicates.not(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, xValue))); filter.add(Predicates.not(new ConvertedManaCostPredicate(CountType.MORE_THAN, xValue)));
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));
} }
} }

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -42,7 +43,6 @@ import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -61,7 +61,7 @@ public class DragonBreath extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
static { static {
filter.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 5)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
} }
public DragonBreath(UUID ownerId, CardSetInfo setInfo) { public DragonBreath(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -59,7 +59,7 @@ public class DragonFangs extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
} }
public DragonFangs(UUID ownerId, CardSetInfo setInfo) { public DragonFangs(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -59,7 +59,7 @@ public class DragonScales extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
} }
public DragonScales(UUID ownerId, CardSetInfo setInfo) { public DragonScales(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -59,7 +59,7 @@ public class DragonShadow extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
} }
public DragonShadow(UUID ownerId, CardSetInfo setInfo) { public DragonShadow(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -41,7 +42,6 @@ import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -60,7 +60,7 @@ public class DragonWings extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
} }
public DragonWings(UUID ownerId, CardSetInfo setInfo) { public DragonWings(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,12 +29,12 @@ package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.Target; import mage.target.Target;
@ -50,7 +50,7 @@ public class DriverOfTheDead extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard to the battlefield"); private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard to the battlefield");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3));
} }
public DriverOfTheDead(UUID ownerId, CardSetInfo setInfo) { public DriverOfTheDead(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.StateTriggeredAbility; import mage.abilities.StateTriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -38,7 +39,6 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.Game; import mage.game.Game;
@ -114,7 +114,7 @@ class DropOfHoneyEffect extends OneShotEffect {
} }
if (multipleExist) { if (multipleExist) {
FilterCreaturePermanent filter = new FilterCreaturePermanent("one of the creatures with the least power"); 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 target = new TargetPermanent(filter);
target.setNotTarget(true); target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) { if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {

View file

@ -28,6 +28,7 @@
package mage.cards.d; package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
@ -35,7 +36,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.Game; import mage.game.Game;
@ -80,7 +80,7 @@ class DrumHunterTriggeredAbility extends TriggeredAbilityImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); filter.add(new PowerPredicate(CountType.MORE_THAN, 4));
} }
public DrumHunterTriggeredAbility() { public DrumHunterTriggeredAbility() {

View file

@ -29,9 +29,10 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.*; import mage.abilities.effects.common.DestroyAllEffect;
import mage.abilities.keyword.AftermathAbility; import mage.abilities.keyword.AftermathAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -40,7 +41,6 @@ import mage.cards.SplitCard;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -60,7 +60,7 @@ import java.util.UUID;
public class DuskDawn extends SplitCard { public class DuskDawn extends SplitCard {
private static final FilterCreaturePermanent filterCreatures3orGreater = new FilterCreaturePermanent("creatures with power greater than or equal to 3"); private static final FilterCreaturePermanent filterCreatures3orGreater = new FilterCreaturePermanent("creatures with power greater than or equal to 3");
static { static {
filterCreatures3orGreater.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); filterCreatures3orGreater.add(new PowerPredicate(CountType.MORE_THAN, 2));
} }
public DuskDawn(UUID ownerId, CardSetInfo setInfo) { public DuskDawn(UUID ownerId, CardSetInfo setInfo) {
@ -93,7 +93,7 @@ class DawnEffect extends OneShotEffect {
private static final FilterCard filter2orLess = new FilterCreatureCard("creatures with power less than or equal to 2"); private static final FilterCard filter2orLess = new FilterCreatureCard("creatures with power less than or equal to 2");
static { static {
filter2orLess.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter2orLess.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
DawnEffect() { DawnEffect() {

View file

@ -29,6 +29,7 @@ package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -52,7 +52,7 @@ public class DwarvenNomad extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less");
static { static {
filter.add(new PowerPredicate(ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public DwarvenNomad(UUID ownerId, CardSetInfo setInfo) { public DwarvenNomad(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -52,7 +52,7 @@ public class DwarvenWarriors extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less");
static { static {
filter.add(new PowerPredicate(ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public DwarvenWarriors(UUID ownerId, CardSetInfo setInfo) { public DwarvenWarriors(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.e; package mage.cards.e;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -38,7 +39,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -107,7 +107,7 @@ class EldritchEvolutionEffect extends OneShotEffect {
if (sacrificedPermanent != null && controller != null) { if (sacrificedPermanent != null && controller != null) {
int newConvertedCost = sacrificedPermanent.getConvertedManaCost() + 2; int newConvertedCost = sacrificedPermanent.getConvertedManaCost() + 2;
FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost + " or less"); FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost + " or less");
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, newConvertedCost+1)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, newConvertedCost+1));
filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new CardTypePredicate(CardType.CREATURE));
TargetCardInLibrary target = new TargetCardInLibrary(filter); TargetCardInLibrary target = new TargetCardInLibrary(filter);
if (controller.searchLibrary(target, game)) { if (controller.searchLibrary(target, game)) {

View file

@ -28,6 +28,7 @@
package mage.cards.e; package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.common.SimpleEvasionAbility;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.abilities.keyword.FabricateAbility; import mage.abilities.keyword.FabricateAbility;
@ -35,7 +36,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
@ -50,7 +50,7 @@ public class ElegantEdgecrafters extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
} }
public ElegantEdgecrafters(UUID ownerId, CardSetInfo setInfo) { public ElegantEdgecrafters(UUID ownerId, CardSetInfo setInfo) {

View file

@ -27,12 +27,12 @@
*/ */
package mage.cards.e; package mage.cards.e;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
@ -48,7 +48,7 @@ public class ElementalBond extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("a creature with power 3 or greater"); private static final FilterPermanent filter = new FilterControlledCreaturePermanent("a creature with power 3 or greater");
static { static {
filter.add(new PowerPredicate(ComparisonType.GreaterThan, 2)); filter.add(new PowerPredicate(CountType.MORE_THAN, 2));
} }
public ElementalBond(UUID ownerId, CardSetInfo setInfo) { public ElementalBond(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.e; package mage.cards.e;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -42,7 +43,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.command.Emblem; import mage.game.command.Emblem;
@ -59,7 +59,7 @@ public class ElspethSunsChampion extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 4 or greater"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 4 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); filter.add(new PowerPredicate(CountType.MORE_THAN, 3));
} }
public ElspethSunsChampion(UUID ownerId, CardSetInfo setInfo) { public ElspethSunsChampion(UUID ownerId, CardSetInfo setInfo) {

View file

@ -27,12 +27,12 @@
*/ */
package mage.cards.e; package mage.cards.e;
import mage.abilities.CountType;
import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -49,7 +49,7 @@ public class EmrakulsInfluence extends CardImpl {
static { static {
filterSpell.add(new SubtypePredicate("Eldrazi")); filterSpell.add(new SubtypePredicate("Eldrazi"));
filterSpell.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 6)); filterSpell.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 6));
} }
public EmrakulsInfluence(UUID ownerId, CardSetInfo setInfo) { public EmrakulsInfluence(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,12 +28,12 @@
package mage.cards.e; package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate;
@ -48,7 +48,7 @@ public class EndangeredArmodon extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 2 or less"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 2 or less");
static { static {
filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3));
} }
public EndangeredArmodon(UUID ownerId, CardSetInfo setInfo) { public EndangeredArmodon(UUID ownerId, CardSetInfo setInfo) {
@ -59,7 +59,7 @@ public class EndangeredArmodon extends CardImpl {
// When you control a creature with toughness 2 or less, sacrifice Endangered Armodon. // When you control a creature with toughness 2 or less, sacrifice Endangered Armodon.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
filter, Filter.ComparisonType.GreaterThan, 0, filter, CountType.MORE_THAN, 0,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -29,6 +29,7 @@ package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
@ -51,7 +51,6 @@ import mage.target.targetpointer.FixedTarget;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public class EndrekSahrMasterBreeder extends CardImpl { public class EndrekSahrMasterBreeder extends CardImpl {
@ -69,7 +68,7 @@ public class EndrekSahrMasterBreeder extends CardImpl {
this.addAbility(new SpellCastControllerTriggeredAbility(new EndrekSahrMasterBreederEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false, true)); this.addAbility(new SpellCastControllerTriggeredAbility(new EndrekSahrMasterBreederEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false, true));
// When you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder. // When you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
new FilterCreaturePermanent("Thrull", "seven or more Thrulls"), Filter.ComparisonType.GreaterThan, 6, new FilterCreaturePermanent("Thrull", "seven or more Thrulls"), CountType.MORE_THAN, 6,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -28,6 +28,7 @@
package mage.cards.e; package mage.cards.e;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -35,7 +36,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -100,7 +100,7 @@ class EngulfTheShoreEffect extends OneShotEffect {
if (controller != null) { if (controller != null) {
int islands = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); int islands = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game);
FilterPermanent creatureFilter = new FilterCreaturePermanent(); FilterPermanent creatureFilter = new FilterCreaturePermanent();
creatureFilter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, islands + 1)); creatureFilter.add(new ToughnessPredicate(CountType.FEWER_THAN, islands + 1));
Set<Card> cardsToHand = new HashSet<>(); Set<Card> cardsToHand = new HashSet<>();
for (Permanent permanent : game.getBattlefield().getActivePermanents(creatureFilter, source.getControllerId(), source.getSourceId(), game)) { for (Permanent permanent : game.getBattlefield().getActivePermanents(creatureFilter, source.getControllerId(), source.getSourceId(), game)) {
cardsToHand.add(permanent); cardsToHand.add(permanent);

View file

@ -29,6 +29,7 @@ package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.UntapTargetEffect;
@ -40,7 +41,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.filter.predicate.permanent.ControllerPredicate; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls with power 2 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
filter.add(new ControllerPredicate(TargetController.OPPONENT)); filter.add(new ControllerPredicate(TargetController.OPPONENT));
} }

View file

@ -29,6 +29,7 @@ package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.Target; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 4));
} }
public EpharasWarden(UUID ownerId, CardSetInfo setInfo) { public EpharasWarden(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,12 +29,12 @@ package mage.cards.e;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.*; import mage.cards.*;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.common.FilterInstantOrSorceryCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -91,7 +91,7 @@ class EpicExperimentEffect extends OneShotEffect {
// cast the possible cards without paying the mana // cast the possible cards without paying the mana
ExileZone epicExperimentExileZone = game.getExile().getExileZone(source.getSourceId()); ExileZone epicExperimentExileZone = game.getExile().getExileZone(source.getSourceId());
FilterCard filter = new FilterInstantOrSorceryCard(); 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"); filter.setMessage("instant and sorcery cards with converted mana cost " + source.getManaCostsToPay().getX() + " or less");
Cards cardsToCast = new CardsImpl(); Cards cardsToCast = new CardsImpl();
if (epicExperimentExileZone == null) { if (epicExperimentExileZone == null) {

View file

@ -29,6 +29,7 @@ package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate;
import mage.target.Target; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 2 or less");
static { static {
filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3));
} }
public ErrantDoomsayers(UUID ownerId, CardSetInfo setInfo) { public ErrantDoomsayers(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -43,7 +44,6 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -57,14 +57,12 @@ import mage.target.TargetCard;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*
*/ */
public class Evershrike extends CardImpl { public class Evershrike extends CardImpl {
public Evershrike(UUID ownerId, CardSetInfo setInfo) { 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("Elemental");
this.subtype.add("Spirit"); this.subtype.add("Spirit");
@ -120,7 +118,7 @@ class EvershrikeEffect extends OneShotEffect {
filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT)); filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT));
filterAuraCard.add(new SubtypePredicate("Aura")); filterAuraCard.add(new SubtypePredicate("Aura"));
filterAuraCard.add(new AuraCardCanAttachToPermanentId(evershrikePermanent.getId())); 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); 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)) { 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); TargetCard targetAura = new TargetCard(Zone.HAND, filterAuraCard);

View file

@ -28,6 +28,7 @@
package mage.cards.e; package mage.cards.e;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition; import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.decorator.ConditionalTriggeredAbility;
@ -38,7 +39,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.TargetPlayer; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4)); filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
} }
public ExileIntoDarkness(UUID ownerId, CardSetInfo setInfo) { public ExileIntoDarkness(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.e; package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
@ -35,7 +36,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.Game; import mage.game.Game;
@ -46,13 +46,12 @@ import mage.target.TargetPlayer;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public class ExuberantFirestoker extends CardImpl { public class ExuberantFirestoker extends CardImpl {
public ExuberantFirestoker(UUID ownerId, CardSetInfo setInfo) { 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("Human");
this.subtype.add("Druid"); this.subtype.add("Druid");
this.subtype.add("Shaman"); 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); filter.add(new PowerPredicate(CountType.MORE_THAN, 4));
} }
public ExuberantFirestokerTriggeredAbility() { public ExuberantFirestokerTriggeredAbility() {

View file

@ -29,6 +29,7 @@ package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -37,7 +38,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
@ -58,7 +58,7 @@ public class EzuriClawOfProgress extends CardImpl {
final private static FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent(); final private static FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent();
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
filter2.add(new AnotherPredicate()); filter2.add(new AnotherPredicate());
} }

View file

@ -29,13 +29,13 @@ package mage.cards.f;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -108,7 +108,7 @@ class FavorOfTheMightyEffect extends ContinuousEffectImpl {
} }
} }
FilterPermanent filterMaxCMC = new FilterCreaturePermanent(); 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)) { for (Permanent permanent : game.getBattlefield().getActivePermanents(filterMaxCMC, source.getControllerId(), game)) {
if (permanent != null) { if (permanent != null) {
permanent.addAbility(new ProtectionAbility(filter), source.getSourceId(), game); permanent.addAbility(new ProtectionAbility(filter), source.getSourceId(), game);

View file

@ -27,6 +27,7 @@
*/ */
package mage.cards.f; package mage.cards.f;
import mage.abilities.CountType;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.effects.common.CopyTargetSpellEffect; import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -34,7 +35,6 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.common.FilterNonlandPermanent; import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.Predicates; 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"); private static final FilterSpell filterMode2 = new FilterSpell("instant or sorcery spell");
static { 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))); filterMode2.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY)));
} }

View file

@ -28,12 +28,12 @@
package mage.cards.f; package mage.cards.f;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.common.TargetCardInLibrary; 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"); private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with converted mana cost 6 or greater");
static { static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5)); filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
} }
public FierceEmpath(UUID ownerId, CardSetInfo setInfo) { public FierceEmpath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");

View file

@ -28,12 +28,12 @@
package mage.cards.f; package mage.cards.f;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.*; import mage.cards.*;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -100,7 +100,7 @@ class FiremindsForesightSearchEffect extends OneShotEffect {
for (int cmc=3; cmc > 0; cmc--) { for (int cmc=3; cmc > 0; cmc--) {
FilterCard filter = new FilterCard("instant card with converted mana cost " + cmc); FilterCard filter = new FilterCard("instant card with converted mana cost " + cmc);
filter.add(new CardTypePredicate(CardType.INSTANT)); 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); cardsCount = cardsInLibrary.count(filter, game);

View file

@ -28,13 +28,13 @@
package mage.cards.f; package mage.cards.f;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.common.SimpleEvasionAbility;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or greater");
static { static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 1)); filter.add(new PowerPredicate(CountType.MORE_THAN, 1));
} }
public FleetFootedMonk(UUID ownerId, CardSetInfo setInfo) { public FleetFootedMonk(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,12 +29,12 @@ package mage.cards.f;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate;
import mage.target.common.TargetCreaturePermanent; 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"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughess 2 or less");
static { static {
filter.add(new ToughnessPredicate(ComparisonType.LessThan, 3)); filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3));
} }
public FleshpulperGiant(UUID ownerId, CardSetInfo setInfo) { public FleshpulperGiant(UUID ownerId, CardSetInfo setInfo) {

View file

@ -30,6 +30,7 @@ package mage.cards.f;
import mage.MageInt; import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -42,7 +43,6 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TimingRule; import mage.constants.TimingRule;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game; import mage.game.Game;
@ -98,7 +98,7 @@ class FleshwritherEffect extends OneShotEffect {
MageObject sourceObject = game.getObject(source.getSourceId()); MageObject sourceObject = game.getObject(source.getSourceId());
if (sourceObject != null && controller != null) { if (sourceObject != null && controller != null) {
FilterCreatureCard filter = new FilterCreatureCard("creature with converted mana cost " + sourceObject.getConvertedManaCost()); 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); TargetCardInLibrary target = new TargetCardInLibrary(1, filter);
if (controller.searchLibrary(target, game)) { if (controller.searchLibrary(target, game)) {
if (!target.getTargets().isEmpty()) { if (!target.getTargets().isEmpty()) {

Some files were not shown because too many files have changed in this diff Show more