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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -28,6 +28,7 @@
package mage.cards.a;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.AttachedToMatchesFilterCondition;
@ -41,7 +42,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.TargetPermanent;
@ -70,7 +70,7 @@ public class ArachnusWeb extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect()));
// At the beginning of the end step, if enchanted creature's power is 4 or greater, destroy Arachnus Web.
FilterPermanent filter = new FilterPermanent("if enchanted creature's power is 4 or greater");
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3));
filter.add(new PowerPredicate(CountType.MORE_THAN, 3));
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD,
new DestroySourceEffect(), TargetController.ANY,
new AttachedToMatchesFilterCondition(filter), false));

View file

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

View file

@ -29,6 +29,7 @@ package mage.cards.a;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
import mage.abilities.costs.Cost;
@ -37,7 +38,6 @@ import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.*;
import mage.constants.*;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -151,7 +151,7 @@ class AshiokNightmareWeaverPutIntoPlayEffect extends OneShotEffect {
}
FilterCard filter = new FilterCreatureCard("creature card with converted mana cost {" + cmc + "} exiled with " + sourceObject.getIdName());
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc));
filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, cmc));
Target target = new TargetCardInExile(filter, CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()));

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -28,6 +28,7 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
import mage.abilities.costs.common.TapSourceCost;
@ -42,7 +43,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.common.FilterInstantOrSorceryCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -108,7 +108,7 @@ class BrainInAJarCastEffect extends OneShotEffect {
if (controller != null && sourceObject != null) {
int counters = sourceObject.getCounters(game).getCount(CounterType.CHARGE);
FilterCard filter = new FilterInstantOrSorceryCard();
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, counters));
filter.add(new ConvertedManaCostPredicate(CountType.EQUAL_TO, counters));
int cardsToCast = controller.getHand().count(filter, source.getControllerId(), source.getSourceId(), game);
if (cardsToCast > 0 && controller.chooseUse(outcome, "Cast an instant or sorcery card with converted mana costs of " + counters + " from your hand without paying its mana cost?", source, game)) {
TargetCardInHand target = new TargetCardInHand(filter);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -30,6 +30,7 @@ package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
@ -38,7 +39,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
@ -47,7 +47,6 @@ import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
*
* @author Backfir3
*/
public class CateranKidnappers extends CardImpl {
@ -56,11 +55,11 @@ public class CateranKidnappers extends CardImpl {
static {
filter.add(new SubtypePredicate("Mercenary"));
filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4));
filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
}
public CateranKidnappers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.subtype.add("Human");
this.subtype.add("Mercenary");

View file

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

View file

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

View file

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

View file

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

View file

@ -28,6 +28,7 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -36,7 +37,6 @@ import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -98,7 +98,7 @@ class CitanulFluteSearchEffect extends OneShotEffect {
FilterCard filter = new FilterCard("creature card with converted mana cost X or less");
filter.add(new CardTypePredicate(CardType.CREATURE));
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1));
filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, source.getManaCostsToPay().getX() + 1));
TargetCardInLibrary target = new TargetCardInLibrary(filter);
if (player.searchLibrary(target, game)) {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -28,13 +28,13 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.Filter;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.Predicate;
@ -83,7 +83,7 @@ class HasLowestCMCAmongstNonlandPermanentsPredicate implements Predicate<Permane
@Override
public boolean apply(Permanent input, Game game) {
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);
}

View file

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

View file

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

View file

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

View file

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

View file

@ -29,6 +29,7 @@ package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
@ -81,7 +81,7 @@ public class DeepfireElemental extends CardImpl {
ability.getTargets().clear();
FilterPermanent newFilter = filter.copy();
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);
ability.addTarget(target);
}

View file

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

View file

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

View file

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

View file

@ -28,6 +28,7 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.SpellAbility;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.Effect;
@ -36,7 +37,6 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game;
@ -67,7 +67,7 @@ public class Detonate extends CardImpl {
ability.getTargets().clear();
int xValue = ability.getManaCostsToPay().getX();
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));
}
}

View file

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

View file

@ -30,6 +30,7 @@ package mage.cards.d;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.DiscardTargetCost;
import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.common.FilterNonlandCard;
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();
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);
}
}

View file

@ -27,11 +27,11 @@
*/
package mage.cards.d;
import mage.abilities.CountType;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
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");
static {
filter.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 3));
filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 3));
}
public DisdainfulStroke(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,12 +28,12 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.SpellAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game;
@ -61,7 +61,7 @@ public class Disembowel extends CardImpl {
ability.getTargets().clear();
int xValue = ability.getManaCostsToPay().getX();
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));
}
}

View file

@ -29,6 +29,7 @@ package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CastSourceTriggeredAbility;
@ -39,7 +40,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
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");
static {
filterFourOrGreater.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 3));
filterThreeOrLess.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4));
filterFourOrGreater.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 3));
filterThreeOrLess.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
filterThreeOrLess.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
}

View file

@ -28,13 +28,13 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.SpellAbility;
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -67,7 +67,7 @@ public class Dominate extends CardImpl {
ability.getTargets().clear();
int xValue = ability.getManaCostsToPay().getX();
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));
}
}

View file

@ -28,6 +28,7 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
@ -42,7 +43,6 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
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");
static {
filter.add(new ConvertedManaCostPredicate(ComparisonType.GreaterThan, 5));
filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
}
public DragonBreath(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
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");
static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5));
filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
}
public DragonFangs(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
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");
static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5));
filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
}
public DragonScales(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
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");
static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5));
filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
}
public DragonShadow(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -41,7 +42,6 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
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");
static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5));
filter.add(new ConvertedManaCostPredicate(CountType.MORE_THAN, 5));
}
public DragonWings(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,12 +29,12 @@ package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
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");
static {
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3));
filter.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 3));
}
public DriverOfTheDead(UUID ownerId, CardSetInfo setInfo) {

View file

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

View file

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

View file

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

View file

@ -29,6 +29,7 @@ package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
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");
static {
filter.add(new PowerPredicate(ComparisonType.LessThan, 3));
filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
}
public DwarvenNomad(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,6 +29,7 @@ package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
@ -36,7 +37,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
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");
static {
filter.add(new PowerPredicate(ComparisonType.LessThan, 3));
filter.add(new PowerPredicate(CountType.FEWER_THAN, 3));
}
public DwarvenWarriors(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.e;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.OneShotEffect;
@ -38,7 +39,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
@ -107,7 +107,7 @@ class EldritchEvolutionEffect extends OneShotEffect {
if (sacrificedPermanent != null && controller != null) {
int newConvertedCost = sacrificedPermanent.getConvertedManaCost() + 2;
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));
TargetCardInLibrary target = new TargetCardInLibrary(filter);
if (controller.searchLibrary(target, game)) {

View file

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

View file

@ -27,12 +27,12 @@
*/
package mage.cards.e;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
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");
static {
filter.add(new PowerPredicate(ComparisonType.GreaterThan, 2));
filter.add(new PowerPredicate(CountType.MORE_THAN, 2));
}
public ElementalBond(UUID ownerId, CardSetInfo setInfo) {

View file

@ -28,6 +28,7 @@
package mage.cards.e;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
import mage.abilities.common.SimpleStaticAbility;
@ -42,7 +43,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import mage.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");
static {
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3));
filter.add(new PowerPredicate(CountType.MORE_THAN, 3));
}
public ElspethSunsChampion(UUID ownerId, CardSetInfo setInfo) {

View file

@ -27,12 +27,12 @@
*/
package mage.cards.e;
import mage.abilities.CountType;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
@ -49,7 +49,7 @@ public class EmrakulsInfluence extends CardImpl {
static {
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) {

View file

@ -28,12 +28,12 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
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");
static {
filter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, 3));
filter.add(new ToughnessPredicate(CountType.FEWER_THAN, 3));
}
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.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
filter, Filter.ComparisonType.GreaterThan, 0,
filter, CountType.MORE_THAN, 0,
new SacrificeSourceEffect()));
}

View file

@ -29,6 +29,7 @@ package mage.cards.e;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
@ -40,7 +41,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
@ -51,7 +51,6 @@ import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
*
* @author LevelX2
*/
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));
// When you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder.
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()));
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -29,6 +29,7 @@ package mage.cards.e;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -43,7 +44,6 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -57,14 +57,12 @@ import mage.target.TargetCard;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*
*/
public class Evershrike extends CardImpl {
public Evershrike(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W/B}{W/B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W/B}{W/B}");
this.subtype.add("Elemental");
this.subtype.add("Spirit");
@ -120,7 +118,7 @@ class EvershrikeEffect extends OneShotEffect {
filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT));
filterAuraCard.add(new SubtypePredicate("Aura"));
filterAuraCard.add(new AuraCardCanAttachToPermanentId(evershrikePermanent.getId()));
filterAuraCard.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, xAmount));
filterAuraCard.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, xAmount));
int count = controller.getHand().count(filterAuraCard, game);
while (controller.canRespond() && count > 0 && controller.chooseUse(Outcome.Benefit, "Do you wish to put an Aura card from your hand onto Evershrike", source, game)) {
TargetCard targetAura = new TargetCard(Zone.HAND, filterAuraCard);

View file

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

View file

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

View file

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

View file

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

View file

@ -27,6 +27,7 @@
*/
package mage.cards.f;
import mage.abilities.CountType;
import mage.abilities.Mode;
import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -34,7 +35,6 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.Filter;
import mage.filter.FilterSpell;
import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.Predicates;
@ -56,7 +56,7 @@ public class FerocityOfTheUnderworld extends CardImpl {
private static final FilterSpell filterMode2 = new FilterSpell("instant or sorcery spell");
static {
filterMode1.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4));
filterMode1.add(new ConvertedManaCostPredicate(CountType.FEWER_THAN, 4));
filterMode2.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY)));
}

View file

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

View file

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

View file

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

View file

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

View file

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

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