Merge pull request #3406 from ingmargoudt/subtypes

Subtypes
This commit is contained in:
LevelX2 2017-05-21 10:50:54 +02:00 committed by GitHub
commit 77bf4aea92
1497 changed files with 5182 additions and 2759 deletions

View file

@ -34,6 +34,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -49,7 +50,7 @@ public class ATST extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures");
static { static {
filter.add(new SubtypePredicate("Trooper")); filter.add(new SubtypePredicate(SubType.TROOPER));
} }
public ATST(UUID ownerId, CardSetInfo setInfo) { public ATST(UUID ownerId, CardSetInfo setInfo) {

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -50,7 +51,7 @@ public class Abolish extends CardImpl {
private static final FilterCard filterCost = new FilterCard("Plains card"); private static final FilterCard filterCost = new FilterCard("Plains card");
static { static {
filterCost.add(new SubtypePredicate("Plains")); filterCost.add(new SubtypePredicate(SubType.PLAINS));
} }
public Abolish(UUID ownerId, CardSetInfo setInfo) { public Abolish(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
@ -60,7 +61,7 @@ static final FilterControlledCreaturePermanent filter1 = new FilterControlledCre
static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures without flying"); static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures without flying");
static { static {
filter1.add(new SubtypePredicate("Cephalid")); filter1.add(new SubtypePredicate(SubType.CEPHALID));
filter2.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); filter2.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
} }

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -94,7 +95,7 @@ class AcademyResearchersEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
FilterCard filterCardInHand = new FilterCard(); FilterCard filterCardInHand = new FilterCard();
filterCardInHand.add(new SubtypePredicate("Aura")); filterCardInHand.add(new SubtypePredicate(SubType.AURA));
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
Permanent academyResearchers = game.getPermanent(source.getSourceId()); Permanent academyResearchers = game.getPermanent(source.getSourceId());
if (controller != null && academyResearchers != null) { if (controller != null && academyResearchers != null) {

View file

@ -31,6 +31,7 @@ import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -44,7 +45,7 @@ public class AcidRain extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Forests"); private static final FilterPermanent filter = new FilterPermanent("Forests");
static { static {
filter.add(new SubtypePredicate("Forest")); filter.add(new SubtypePredicate(SubType.FOREST));
} }
public AcidRain(UUID ownerId, CardSetInfo setInfo) { public AcidRain(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -54,7 +55,7 @@ public class AcidSpewerDragon extends CardImpl {
static { static {
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
filter.add(new SubtypePredicate("Dragon")); filter.add(new SubtypePredicate(SubType.DRAGON));
} }
public AcidSpewerDragon(UUID ownerId, CardSetInfo setInfo) { public AcidSpewerDragon(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -50,7 +51,7 @@ public class AcidWebSpider extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Equipment"); private static final FilterPermanent filter = new FilterPermanent("Equipment");
static { static {
filter.add(new SubtypePredicate("Equipment")); filter.add(new SubtypePredicate(SubType.EQUIPMENT));
} }
public AcidWebSpider (UUID ownerId, CardSetInfo setInfo) { public AcidWebSpider (UUID ownerId, CardSetInfo setInfo) {

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -51,7 +52,7 @@ public class ActiveVolcano extends CardImpl {
private static final FilterPermanent filterIsland = new FilterPermanent("Island"); private static final FilterPermanent filterIsland = new FilterPermanent("Island");
static { static {
filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); filterBlue.add(new ColorPredicate(ObjectColor.BLUE));
filterIsland.add(new SubtypePredicate("Island")); filterIsland.add(new SubtypePredicate(SubType.ISLAND));
} }
public ActiveVolcano(UUID ownerId, CardSetInfo setInfo) { public ActiveVolcano(UUID ownerId, CardSetInfo setInfo) {

View file

@ -39,10 +39,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.UntapAllControllerEffect; import mage.abilities.effects.common.UntapAllControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
@ -58,7 +55,7 @@ public class AdmiralAckbar extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Starship creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Starship creatures");
static { static {
filter.add(new SubtypePredicate("Starship")); filter.add(new SubtypePredicate(SubType.STARSHIP));
} }
public AdmiralAckbar(UUID ownerId, CardSetInfo setInfo) { public AdmiralAckbar(UUID ownerId, CardSetInfo setInfo) {

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -53,7 +54,7 @@ public class AdvocateOfTheBeast extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creature you control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Beast creature you control");
static { static {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(new SubtypePredicate("Beast")); filter.add(new SubtypePredicate(SubType.BEAST));
} }
public AdvocateOfTheBeast(UUID ownerId, CardSetInfo setInfo) { public AdvocateOfTheBeast(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,10 +38,7 @@ import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -60,7 +57,7 @@ public class AerialModification extends CardImpl {
static { static {
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE),
new SubtypePredicate("Vehicle"))); new SubtypePredicate(SubType.VEHICLE)));
} }
public AerialModification(UUID ownerId, CardSetInfo setInfo) { public AerialModification(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -50,7 +51,7 @@ public class AeronautAdmiral extends CardImpl {
private static final FilterControlledArtifactPermanent filter = new FilterControlledArtifactPermanent("Vehicles"); private static final FilterControlledArtifactPermanent filter = new FilterControlledArtifactPermanent("Vehicles");
static { static {
filter.add(new SubtypePredicate("Vehicle")); filter.add(new SubtypePredicate(SubType.VEHICLE));
} }
public AeronautAdmiral(UUID ownerId, CardSetInfo setInfo) { public AeronautAdmiral(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -56,7 +57,7 @@ public class AetherCharge extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Beast you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Beast you control");
static { static {
filter.add(new SubtypePredicate("Beast")); filter.add(new SubtypePredicate(SubType.BEAST));
} }
public AetherCharge(UUID ownerId, CardSetInfo setInfo) { public AetherCharge(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,10 +38,7 @@ import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -59,7 +56,7 @@ public class AetherMeltdown extends CardImpl {
private final static FilterPermanent filter = new FilterPermanent("creature or vehicle"); private final static FilterPermanent filter = new FilterPermanent("creature or vehicle");
static { static {
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new SubtypePredicate("Vehicle"))); filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new SubtypePredicate(SubType.VEHICLE)));
} }
public AetherMeltdown(UUID ownerId, CardSetInfo setInfo) { public AetherMeltdown(UUID ownerId, CardSetInfo setInfo) {

View file

@ -32,6 +32,7 @@ import mage.abilities.effects.common.TapAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -47,8 +48,8 @@ public class AetherShockwave extends CardImpl {
private static final FilterCreaturePermanent filterSpirit = new FilterCreaturePermanent("Spirits"); private static final FilterCreaturePermanent filterSpirit = new FilterCreaturePermanent("Spirits");
private static final FilterCreaturePermanent filterNonSpirit = new FilterCreaturePermanent("non-Spirit creatures"); private static final FilterCreaturePermanent filterNonSpirit = new FilterCreaturePermanent("non-Spirit creatures");
static { static {
filterSpirit.add(new SubtypePredicate("Spirit")); filterSpirit.add(new SubtypePredicate(SubType.SPIRIT));
filterNonSpirit.add(Predicates.not(new SubtypePredicate("Spirit"))); filterNonSpirit.add(Predicates.not(new SubtypePredicate(SubType.SPIRIT)));
} }
public AetherShockwave(UUID ownerId, CardSetInfo setInfo) { public AetherShockwave(UUID ownerId, CardSetInfo setInfo) {

View file

@ -32,6 +32,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -46,7 +47,7 @@ public class AirborneAid extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Bird on the battlefield"); private static final FilterPermanent filter = new FilterPermanent("Bird on the battlefield");
static { static {
filter.add(new SubtypePredicate("Bird")); filter.add(new SubtypePredicate(SubType.BIRD));
} }
public AirborneAid(UUID ownerId, CardSetInfo setInfo) { public AirborneAid(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -55,7 +56,7 @@ public class AirdropCondor extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Goblin creature"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Goblin creature");
static { static {
filter.add(new SubtypePredicate("Goblin")); filter.add(new SubtypePredicate(SubType.GOBLIN));
} }
public AirdropCondor(UUID ownerId, CardSetInfo setInfo) { public AirdropCondor(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.common.counter.DistributeCountersEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
@ -61,7 +62,7 @@ public class AjaniMentorOfHeroes extends CardImpl {
static { static {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
filterCard.add(Predicates.or( filterCard.add(Predicates.or(
new SubtypePredicate("Aura"), new SubtypePredicate(SubType.AURA),
new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.CREATURE),
new CardTypePredicate(CardType.PLANESWALKER))); new CardTypePredicate(CardType.PLANESWALKER)));
} }

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
@ -54,7 +55,7 @@ public class AjanisComrade extends CardImpl {
static { static {
filter.add(new CardTypePredicate(CardType.PLANESWALKER)); filter.add(new CardTypePredicate(CardType.PLANESWALKER));
filter.add(new SubtypePredicate("Ajani")); filter.add(new SubtypePredicate(SubType.AJANI));
} }
public AjanisComrade(UUID ownerId, CardSetInfo setInfo) { public AjanisComrade(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -51,7 +52,7 @@ public class AkoumBattlesinger extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("have Ally creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("have Ally creatures");
static { static {
filter.add(new SubtypePredicate("Ally")); filter.add(new SubtypePredicate(SubType.ALLY));
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
} }

View file

@ -36,10 +36,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.cards.Cards; import mage.cards.Cards;
import mage.constants.AbilityWord; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -59,7 +56,7 @@ public class AkoumFlameseeker extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an untapped Ally you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("an untapped Ally you control");
static { static {
filter.add(new SubtypePredicate("Ally")); filter.add(new SubtypePredicate(SubType.ALLY));
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
} }

View file

@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -55,7 +56,7 @@ public class AkromasDevoted extends CardImpl {
// Cleric creatures have vigilance. // Cleric creatures have vigilance.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(VigilanceAbility.getInstance(), this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(VigilanceAbility.getInstance(),
Duration.WhileOnBattlefield, new FilterCreaturePermanent("Cleric", "Cleric creatures")))); Duration.WhileOnBattlefield, new FilterCreaturePermanent(SubType.CLERIC, "Cleric creatures"))));
} }
public AkromasDevoted(final AkromasDevoted card) { public AkromasDevoted(final AkromasDevoted card) {

View file

@ -38,10 +38,7 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
@ -56,7 +53,7 @@ public class AkutaBornOfAsh extends CardImpl {
private static final FilterControlledPermanent filterSwamp = new FilterControlledPermanent("a Swamp"); private static final FilterControlledPermanent filterSwamp = new FilterControlledPermanent("a Swamp");
static { static {
filterSwamp.add(new SubtypePredicate("Swamp")); filterSwamp.add(new SubtypePredicate(SubType.SWAMP));
} }
public AkutaBornOfAsh(UUID ownerId, CardSetInfo setInfo) { public AkutaBornOfAsh(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -51,7 +52,7 @@ public class AliBaba extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Wall"); private static final FilterPermanent filter = new FilterPermanent("Wall");
static { static {
filter.add(new SubtypePredicate("Wall")); filter.add(new SubtypePredicate(SubType.WALL));
} }
public AliBaba(UUID ownerId, CardSetInfo setInfo) { public AliBaba(UUID ownerId, CardSetInfo setInfo) {

View file

@ -39,6 +39,7 @@ import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
@ -56,7 +57,7 @@ public class AllyEncampment extends CardImpl {
private static final FilterSpell FILTER = new FilterSpell("an Ally spell"); private static final FilterSpell FILTER = new FilterSpell("an Ally spell");
static { static {
FILTER.add(new SubtypePredicate("Ally")); FILTER.add(new SubtypePredicate(SubType.ALLY));
} }
public AllyEncampment(UUID ownerId, CardSetInfo setInfo) { public AllyEncampment(UUID ownerId, CardSetInfo setInfo) {
@ -72,7 +73,7 @@ public class AllyEncampment extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(1)); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(1));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("Ally", "Ally you control"))); ability.addTarget(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent(SubType.ALLY, "Ally you control")));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -52,7 +53,7 @@ public class AlphaKavu extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Kavu creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Kavu creature");
static { static {
filter.add(new SubtypePredicate("Kavu")); filter.add(new SubtypePredicate(SubType.KAVU));
} }
public AlphaKavu(UUID ownerId, CardSetInfo setInfo) { public AlphaKavu(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,10 +38,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureAllEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.DependencyType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -57,11 +54,11 @@ import java.util.UUID;
*/ */
public class AmbushCommander extends CardImpl { public class AmbushCommander extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Elf", "an Elf"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.ELF, "an Elf");
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("Forests you control"); private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("Forests you control");
static { static {
filter2.add(new SubtypePredicate("Forest")); filter2.add(new SubtypePredicate(SubType.FOREST));
} }
public AmbushCommander(UUID ownerId, CardSetInfo setInfo) { public AmbushCommander(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -52,7 +53,7 @@ public class AmrouScout extends CardImpl {
private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with converted mana cost 3 or less"); private static final FilterPermanentCard filter = new FilterPermanentCard("Rebel permanent card with converted mana cost 3 or less");
static { static {
filter.add(new SubtypePredicate("Rebel")); filter.add(new SubtypePredicate(SubType.REBEL));
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4)); filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
} }

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -53,7 +54,7 @@ public class AnabaAncestor extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Another target Minotaur creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Another target Minotaur creature");
static { static {
filter.add(new SubtypePredicate("Minotaur")); filter.add(new SubtypePredicate(SubType.MINOTAUR));
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
} }

View file

@ -34,6 +34,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -49,7 +50,7 @@ public class AnabaSpiritCrafter extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Minotaur creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Minotaur creatures");
static { static {
filter.add(new SubtypePredicate("Minotaur")); filter.add(new SubtypePredicate(SubType.MINOTAUR));
} }
public AnabaSpiritCrafter(UUID ownerId, CardSetInfo setInfo) { public AnabaSpiritCrafter(UUID ownerId, CardSetInfo setInfo) {

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -52,7 +53,7 @@ public class AncestorsProphet extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Clerics you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Clerics you control");
static { static {
filter.add(new SubtypePredicate("Cleric")); filter.add(new SubtypePredicate(SubType.CLERIC));
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
} }

View file

@ -35,6 +35,7 @@ import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInHand;
@ -49,7 +50,7 @@ public class AncientAmphitheater extends CardImpl {
private static final FilterCard filter = new FilterCard("a Giant from your hand"); private static final FilterCard filter = new FilterCard("a Giant from your hand");
static { static {
filter.add(new SubtypePredicate("Giant")); filter.add(new SubtypePredicate(SubType.GIANT));
} }
public AncientAmphitheater(UUID ownerId, CardSetInfo setInfo) { public AncientAmphitheater(UUID ownerId, CardSetInfo setInfo) {

View file

@ -8,6 +8,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -20,7 +21,7 @@ public class AngelOfFlightAlabaster extends CardImpl {
private static final FilterCard filter = new FilterCard("Spirit card from your graveyard"); private static final FilterCard filter = new FilterCard("Spirit card from your graveyard");
static { static {
filter.add(new SubtypePredicate("Spirit")); filter.add(new SubtypePredicate(SubType.SPIRIT));
} }
public AngelOfFlightAlabaster(UUID ownerId, CardSetInfo setInfo) { public AngelOfFlightAlabaster(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -83,8 +84,8 @@ class AngelOfGlorysRiseEffect extends OneShotEffect {
private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent(); private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent();
static { static {
filterZombie.add(new SubtypePredicate("Zombie")); filterZombie.add(new SubtypePredicate(SubType.ZOMBIE));
filterHuman.add(new SubtypePredicate("Human")); filterHuman.add(new SubtypePredicate(SubType.HUMAN));
} }
public AngelOfGlorysRiseEffect() { public AngelOfGlorysRiseEffect() {

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterAttackingCreature; import mage.filter.common.FilterAttackingCreature;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
@ -51,7 +52,7 @@ public class AngelicCaptain extends CardImpl {
private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Ally"); private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Ally");
static { static {
filter.add(new SubtypePredicate("Ally")); filter.add(new SubtypePredicate(SubType.ALLY));
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
} }

View file

@ -39,6 +39,7 @@ import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -56,7 +57,7 @@ public class AngelicOverseer extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human");
static { static {
filter.add(new SubtypePredicate("Human")); filter.add(new SubtypePredicate(SubType.HUMAN));
} }
public AngelicOverseer(UUID ownerId, CardSetInfo setInfo) { public AngelicOverseer(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,6 +38,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -58,7 +59,7 @@ public class Anger extends CardImpl {
static { static {
filter.add(new CardTypePredicate(CardType.LAND)); filter.add(new CardTypePredicate(CardType.LAND));
filter.add(new SubtypePredicate("Mountain")); filter.add(new SubtypePredicate(SubType.MOUNTAIN));
} }
public Anger(UUID ownerId, CardSetInfo setInfo) { public Anger(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,10 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
@ -55,7 +52,7 @@ public class AngryMob extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Swamps you opponents control"); private static final FilterPermanent filter = new FilterPermanent("Swamps you opponents control");
static { static {
filter.add(new SubtypePredicate("Swamp")); filter.add(new SubtypePredicate(SubType.SWAMP));
filter.add(new ControllerPredicate(TargetController.OPPONENT)); filter.add(new ControllerPredicate(TargetController.OPPONENT));
} }

View file

@ -53,7 +53,7 @@ public class AnimateWall extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wall"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wall");
static { static {
filter.add(new SubtypePredicate("Wall")); filter.add(new SubtypePredicate(SubType.WALL));
} }
public AnimateWall(UUID ownerId, CardSetInfo setInfo) { public AnimateWall(UUID ownerId, CardSetInfo setInfo) {

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.SacrificeAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
@ -50,7 +51,7 @@ public class AnowonTheRuinSage extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Vampire creature"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Vampire creature");
static { static {
filter.add(Predicates.not(new SubtypePredicate("Vampire"))); filter.add(Predicates.not(new SubtypePredicate(SubType.VAMPIRE)));
} }
public AnowonTheRuinSage(UUID ownerId, CardSetInfo setInfo) { public AnowonTheRuinSage(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,6 +38,7 @@ import mage.choices.Choice;
import mage.choices.ChoiceImpl; import mage.choices.ChoiceImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
@ -68,7 +69,7 @@ public class AphettoDredging extends CardImpl {
if (controller != null) { if (controller != null) {
Choice typeChoice = new ChoiceImpl(true); Choice typeChoice = new ChoiceImpl(true);
typeChoice.setMessage("Choose a creature type"); typeChoice.setMessage("Choose a creature type");
typeChoice.setChoices(CardRepository.instance.getCreatureTypes()); typeChoice.setChoices(SubType.getCreatureTypes(false));
while (!controller.choose(Outcome.PutCreatureInPlay, typeChoice, game)) { while (!controller.choose(Outcome.PutCreatureInPlay, typeChoice, game)) {
if (!controller.canRespond()) { if (!controller.canRespond()) {
return; return;
@ -77,7 +78,7 @@ public class AphettoDredging extends CardImpl {
String chosenType = typeChoice.getChoice(); String chosenType = typeChoice.getChoice();
FilterCreatureCard filter = new FilterCreatureCard(chosenType + " cards"); FilterCreatureCard filter = new FilterCreatureCard(chosenType + " cards");
filter.add(new SubtypePredicate(chosenType)); filter.add(new SubtypePredicate(SubType.byDescription(chosenType)));
ability.addTarget(new TargetCardInYourGraveyard(0, 3, filter)); ability.addTarget(new TargetCardInYourGraveyard(0, 3, filter));
} }
} }

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -55,7 +56,7 @@ public class AphettoGrifter extends CardImpl {
static { static {
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
filter.add(new SubtypePredicate("Wizard")); filter.add(new SubtypePredicate(SubType.WIZARD));
} }
public AphettoGrifter(UUID ownerId, CardSetInfo setInfo) { public AphettoGrifter(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
@ -54,7 +55,7 @@ public class ApothecaryGeist extends CardImpl {
static { static {
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
filter.add(new SubtypePredicate("Spirit")); filter.add(new SubtypePredicate(SubType.SPIRIT));
} }
public ApothecaryGeist(UUID ownerId, CardSetInfo setInfo) { public ApothecaryGeist(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,10 +35,7 @@ import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.SubLayer;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -57,7 +54,7 @@ public class AquitectsWill extends CardImpl {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Merfolk"); private final static FilterControlledPermanent filter = new FilterControlledPermanent("Merfolk");
static { static {
filter.add(new SubtypePredicate("Merfolk")); filter.add(new SubtypePredicate(SubType.MERFOLK));
} }
public AquitectsWill(UUID ownerId, CardSetInfo setInfo) { public AquitectsWill(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -54,7 +55,7 @@ public class Arachnogenesis extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Spider creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Spider creatures");
static { static {
filter.add(Predicates.not(new SubtypePredicate("Spider"))); filter.add(Predicates.not(new SubtypePredicate(SubType.SPIDER)));
} }
public Arachnogenesis(UUID ownerId, CardSetInfo setInfo) { public Arachnogenesis(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,6 +38,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
@ -64,7 +65,7 @@ public class ArachnusSpinner extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Spider you control"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Spider you control");
static { static {
filter.add(new SubtypePredicate("Spider")); filter.add(new SubtypePredicate(SubType.SPIDER));
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
} }

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
@ -52,7 +53,7 @@ public class ArashinForemost extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target Warrior creature you control"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target Warrior creature you control");
static { static {
filter.add(new SubtypePredicate("Warrior")); filter.add(new SubtypePredicate(SubType.WARRIOR));
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
} }

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.common.UntapTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.target.common.TargetLandPermanent; import mage.target.common.TargetLandPermanent;
@ -48,7 +49,7 @@ import java.util.UUID;
*/ */
public class ArborElf extends CardImpl { public class ArborElf extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest", "Forest"); private static final FilterLandPermanent filter = new FilterLandPermanent(SubType.FOREST, "Forest");
public ArborElf(UUID ownerId, CardSetInfo setInfo) { public ArborElf(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");

View file

@ -61,7 +61,7 @@ public class ArchangelAvacyn extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Angel creature you control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Angel creature you control");
static { static {
filter.add(Predicates.not(new SubtypePredicate("Angel"))); filter.add(Predicates.not(new SubtypePredicate(SubType.ANGEL)));
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
} }

View file

@ -37,6 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -58,7 +59,7 @@ public class ArchdemonOfGreed extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human");
static { static {
filter.add(new SubtypePredicate("Human")); filter.add(new SubtypePredicate(SubType.HUMAN));
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
} }

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -54,7 +55,7 @@ public class ArchdemonOfUnx extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Zombie creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Zombie creature");
static { static {
filter.add(Predicates.not(new SubtypePredicate("Zombie"))); filter.add(Predicates.not(new SubtypePredicate(SubType.ZOMBIE)));
} }
public ArchdemonOfUnx(UUID ownerId, CardSetInfo setInfo) { public ArchdemonOfUnx(UUID ownerId, CardSetInfo setInfo) {

View file

@ -39,6 +39,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -54,7 +55,7 @@ public class ArcticAven extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Plains"); private static final FilterPermanent filter = new FilterPermanent("Plains");
static { static {
filter.add(new SubtypePredicate("Plains")); filter.add(new SubtypePredicate(SubType.PLAINS));
} }
public ArcticAven(UUID ownerId, CardSetInfo setInfo) { public ArcticAven(UUID ownerId, CardSetInfo setInfo) {

View file

@ -33,7 +33,9 @@ import mage.abilities.common.FetchLandActivatedAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import java.util.EnumSet;
import java.util.UUID; import java.util.UUID;
/** /**
@ -45,7 +47,7 @@ public class AridMesa extends CardImpl {
public AridMesa(UUID ownerId, CardSetInfo setInfo) { public AridMesa(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
this.frameColor = new ObjectColor("WR"); this.frameColor = new ObjectColor("WR");
this.addAbility(new FetchLandActivatedAbility(new String[] {"Mountain", "Plains"})); this.addAbility(new FetchLandActivatedAbility(EnumSet.of(SubType.MOUNTAIN, SubType.PLAINS)));
} }
public AridMesa(final AridMesa card) { public AridMesa(final AridMesa card) {

View file

@ -51,7 +51,7 @@ public class ArmamentMaster extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other Kor creatures you control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other Kor creatures you control");
static { static {
filter.add(new SubtypePredicate("Kor")); filter.add(new SubtypePredicate(SubType.KOR));
} }
public ArmamentMaster(UUID ownerId, CardSetInfo setInfo) { public ArmamentMaster(UUID ownerId, CardSetInfo setInfo) {
@ -80,7 +80,7 @@ class ArmamentMasterEffect extends ContinuousEffectImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other Kor creatures you control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other Kor creatures you control");
static { static {
filter.add(new SubtypePredicate("Kor")); filter.add(new SubtypePredicate(SubType.KOR));
} }
public ArmamentMasterEffect() { public ArmamentMasterEffect() {

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetAttackingCreature; import mage.target.common.TargetAttackingCreature;
@ -48,7 +49,7 @@ public class ArmedResponse extends CardImpl {
private static final FilterControlledArtifactPermanent filter = new FilterControlledArtifactPermanent("Equipment you control"); private static final FilterControlledArtifactPermanent filter = new FilterControlledArtifactPermanent("Equipment you control");
static { static {
filter.add(new SubtypePredicate("Equipment")); filter.add(new SubtypePredicate(SubType.EQUIPMENT));
} }

View file

@ -54,7 +54,7 @@ public class ArmoredAscension extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("Plains you control"); private static final FilterLandPermanent filter = new FilterLandPermanent("Plains you control");
static { static {
filter.add(new SubtypePredicate("Plains")); filter.add(new SubtypePredicate(SubType.PLAINS));
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
} }

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.combat.CantAttackUnlessDefenderControllsPer
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
@ -52,7 +53,7 @@ public class ArmoredGalleon extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// Armored Galleon can't attack unless defending player controls an Island. // Armored Galleon can't attack unless defending player controls an Island.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(new FilterLandPermanent("Island","an Island")))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(new FilterLandPermanent(SubType.ISLAND,"an Island"))));
} }
public ArmoredGalleon(final ArmoredGalleon card) { public ArmoredGalleon(final ArmoredGalleon card) {

View file

@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.common.FilterArtifactPermanent; import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
@ -77,7 +78,7 @@ class ArmoryAutomatonEffect extends OneShotEffect {
private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("Equipment"); private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("Equipment");
static { static {
filter.add(new SubtypePredicate("Equipment")); filter.add(new SubtypePredicate(SubType.EQUIPMENT));
} }
public ArmoryAutomatonEffect() { public ArmoryAutomatonEffect() {

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -53,7 +54,7 @@ public class ArmoryGuard extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Gate"); private static final FilterPermanent filter = new FilterPermanent("Gate");
static { static {
filter.add(new SubtypePredicate("Gate")); filter.add(new SubtypePredicate(SubType.GATE));
} }
public ArmoryGuard(UUID ownerId, CardSetInfo setInfo) { public ArmoryGuard(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -52,7 +53,7 @@ public class ArmsDealer extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Goblin"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Goblin");
static { static {
filter.add(new SubtypePredicate("Goblin")); filter.add(new SubtypePredicate(SubType.GOBLIN));
} }
public ArmsDealer(UUID ownerId, CardSetInfo setInfo) { public ArmsDealer(UUID ownerId, CardSetInfo setInfo) {

View file

@ -34,10 +34,7 @@ import mage.abilities.effects.common.AttachEffect;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -56,7 +53,7 @@ public class ArtificersHex extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Equipment"); private static final FilterPermanent filter = new FilterPermanent("Equipment");
static { static {
filter.add(new CardTypePredicate(CardType.ARTIFACT)); filter.add(new CardTypePredicate(CardType.ARTIFACT));
filter.add(new SubtypePredicate("Equipment")); filter.add(new SubtypePredicate(SubType.EQUIPMENT));
} }
public ArtificersHex(UUID ownerId, CardSetInfo setInfo) { public ArtificersHex(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,10 +36,7 @@ import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
@ -85,7 +82,7 @@ class HalfForestsDownCount implements DynamicValue {
private static final FilterLandPermanent filter = new FilterLandPermanent(); private static final FilterLandPermanent filter = new FilterLandPermanent();
static { static {
filter.add(new SubtypePredicate("Forest")); filter.add(new SubtypePredicate(SubType.FOREST));
} }
@Override @Override
@ -115,7 +112,7 @@ class HalfForestsUpCount implements DynamicValue {
private static final FilterLandPermanent filter = new FilterLandPermanent(); private static final FilterLandPermanent filter = new FilterLandPermanent();
static { static {
filter.add(new SubtypePredicate("Forest")); filter.add(new SubtypePredicate(SubType.FOREST));
} }
@Override @Override

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -52,7 +53,7 @@ public class AssemblyWorker extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Assembly-Worker creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Assembly-Worker creature");
static { static {
filter.add(new SubtypePredicate("Assembly-Worker")); filter.add(new SubtypePredicate(SubType.ASSEMBLY_WORKER));
} }
public AssemblyWorker(UUID ownerId, CardSetInfo setInfo) { public AssemblyWorker(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,10 +36,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
@ -88,7 +85,7 @@ class AtarkaWorldRenderEffect extends TriggeredAbilityImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("dragon you control"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("dragon you control");
static { static {
filter.add(new SubtypePredicate("Dragon")); filter.add(new SubtypePredicate(SubType.DRAGON));
} }
public AtarkaWorldRenderEffect() { public AtarkaWorldRenderEffect() {

View file

@ -53,7 +53,7 @@ public class Atogatog extends CardImpl {
static { static {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(new SubtypePredicate("Atog")); filter.add(new SubtypePredicate(SubType.ATOG));
} }
public Atogatog(UUID ownerId, CardSetInfo setInfo) { public Atogatog(UUID ownerId, CardSetInfo setInfo) {
@ -68,7 +68,7 @@ public class Atogatog extends CardImpl {
// Sacrifice an Atog creature: Atogatog gets +X/+X until end of turn, where X is the sacrificed creature's power. // Sacrifice an Atog creature: Atogatog gets +X/+X until end of turn, where X is the sacrificed creature's power.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostSourceEffect(xValue, xValue,Duration.EndOfTurn), new BoostSourceEffect(xValue, xValue,Duration.EndOfTurn),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("Atog", "an Atog creature"), false)))); new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent(SubType.ATOG, "an Atog creature"), false))));
} }

View file

@ -35,6 +35,7 @@ import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInHand;
@ -49,7 +50,7 @@ public class AuntiesHovel extends CardImpl {
private static final FilterCard filter = new FilterCard("a Goblin card from your hand"); private static final FilterCard filter = new FilterCard("a Goblin card from your hand");
static { static {
filter.add(new SubtypePredicate("Goblin")); filter.add(new SubtypePredicate(SubType.GOBLIN));
} }
public AuntiesHovel(UUID ownerId, CardSetInfo setInfo) { public AuntiesHovel(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.abilities.keyword.ProwlAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -86,7 +87,7 @@ class AuntiesSnitchTriggeredAbility extends TriggeredAbilityImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin or Rogue you control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin or Rogue you control");
static { static {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(Predicates.or(new SubtypePredicate("Goblin"), new SubtypePredicate("Rogue"))); filter.add(Predicates.or(new SubtypePredicate(SubType.GOBLIN), new SubtypePredicate(SubType.ROGUE)));
} }
public AuntiesSnitchTriggeredAbility() { public AuntiesSnitchTriggeredAbility() {

View file

@ -33,6 +33,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -91,7 +92,7 @@ public class AuraBarbs extends CardImpl {
} }
} }
filterEnchantments.add(new SubtypePredicate("Aura")); filterEnchantments.add(new SubtypePredicate(SubType.AURA));
for (Permanent auraEnchantment : game.getBattlefield().getActivePermanents(filterEnchantments, source.getControllerId(), source.getSourceId(), game)) { for (Permanent auraEnchantment : game.getBattlefield().getActivePermanents(filterEnchantments, source.getControllerId(), source.getSourceId(), game)) {
if (auraEnchantment.getAttachedTo() != null) { if (auraEnchantment.getAttachedTo() != null) {
Permanent attachedToCreature = game.getPermanent(auraEnchantment.getAttachedTo()); Permanent attachedToCreature = game.getPermanent(auraEnchantment.getAttachedTo());

View file

@ -34,6 +34,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.common.FilterEnchantmentPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -57,7 +58,7 @@ public class AuraFinesse extends CardImpl {
static { static {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(new SubtypePredicate("Aura")); filter.add(new SubtypePredicate(SubType.AURA));
} }
public AuraFinesse(UUID ownerId, CardSetInfo setInfo) { public AuraFinesse(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -51,7 +52,7 @@ public class AuraGnarlid extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Aura on the battlefield"); private static final FilterPermanent filter = new FilterPermanent("Aura on the battlefield");
static { static {
filter.add(new SubtypePredicate("Aura")); filter.add(new SubtypePredicate(SubType.AURA));
} }
public AuraGnarlid(UUID ownerId, CardSetInfo setInfo) { public AuraGnarlid(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,6 +36,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.Filter; import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.ObjectPlayer; import mage.filter.predicate.ObjectPlayer;
@ -61,7 +62,7 @@ public class AuraGraft extends CardImpl {
// Gain control of target Aura that's attached to a permanent. Attach it to another permanent it can enchant. // Gain control of target Aura that's attached to a permanent. Attach it to another permanent it can enchant.
FilterPermanent filter = new FilterPermanent("Aura that's attached to a permanent"); FilterPermanent filter = new FilterPermanent("Aura that's attached to a permanent");
filter.add(new SubtypePredicate("Aura")); filter.add(new SubtypePredicate(SubType.AURA));
filter.add(new AttachedToPermanentPredicate()); filter.add(new AttachedToPermanentPredicate());
this.getSpellAbility().addTarget(new TargetPermanent(filter)); this.getSpellAbility().addTarget(new TargetPermanent(filter));

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.*; import mage.cards.*;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -91,7 +92,7 @@ class AuratouchedMageEffect extends OneShotEffect {
Permanent auratouchedMage = game.getPermanentOrLKIBattlefield(source.getSourceId()); //must be LKI to resolve Permanent auratouchedMage = game.getPermanentOrLKIBattlefield(source.getSourceId()); //must be LKI to resolve
if (controller != null && auratouchedMage != null) { if (controller != null && auratouchedMage != null) {
FilterCard filter = new FilterCard("aura that could enchant " + auratouchedMage.getName()); FilterCard filter = new FilterCard("aura that could enchant " + auratouchedMage.getName());
filter.add(new SubtypePredicate("Aura")); filter.add(new SubtypePredicate(SubType.AURA));
filter.add(new AuraCardCanAttachToLKIPermanentId(auratouchedMage.getId())); filter.add(new AuraCardCanAttachToLKIPermanentId(auratouchedMage.getId()));
TargetCardInLibrary target = new TargetCardInLibrary(filter); TargetCardInLibrary target = new TargetCardInLibrary(filter);
target.setNotTarget(true); target.setNotTarget(true);

View file

@ -38,6 +38,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -56,8 +57,8 @@ public class AuriokSteelshaper extends CardImpl {
static { static {
soldiersOrKnights.add(Predicates.or( soldiersOrKnights.add(Predicates.or(
new SubtypePredicate("Soldier"), new SubtypePredicate(SubType.SOLDIER),
new SubtypePredicate("Knight") new SubtypePredicate(SubType.KNIGHT)
)); ));
} }

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
@ -53,7 +54,7 @@ public class AuriokSurvivors extends CardImpl {
private static final FilterCard filter = new FilterCard("Equipment card from your graveyard"); private static final FilterCard filter = new FilterCard("Equipment card from your graveyard");
static { static {
filter.add(new SubtypePredicate("Equipment")); filter.add(new SubtypePredicate(SubType.EQUIPMENT));
} }
public AuriokSurvivors(UUID ownerId, CardSetInfo setInfo) { public AuriokSurvivors(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -56,7 +57,7 @@ public class AuriokWindwalker extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Equipment you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Equipment you control");
static { static {
filter.add(new SubtypePredicate("Equipment")); filter.add(new SubtypePredicate(SubType.EQUIPMENT));
} }
public AuriokWindwalker(UUID ownerId, CardSetInfo setInfo) { public AuriokWindwalker(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterAttackingCreature; import mage.filter.common.FilterAttackingCreature;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
@ -52,7 +53,7 @@ public class Aurochs extends CardImpl {
private static final FilterAttackingCreature filter1 = new FilterAttackingCreature("other attacking Aurochs"); private static final FilterAttackingCreature filter1 = new FilterAttackingCreature("other attacking Aurochs");
static { static {
filter1.add(new SubtypePredicate("Aurochs")); filter1.add(new SubtypePredicate(SubType.AUROCHS));
filter1.add(new AnotherPredicate()); filter1.add(new AnotherPredicate());
} }

View file

@ -39,6 +39,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterAttackingCreature; import mage.filter.common.FilterAttackingCreature;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -57,8 +58,8 @@ public class AurochsHerd extends CardImpl {
private static final FilterAttackingCreature filter2 = new FilterAttackingCreature("other attacking Aurochs"); private static final FilterAttackingCreature filter2 = new FilterAttackingCreature("other attacking Aurochs");
static { static {
filter1.add(new SubtypePredicate("Aurochs")); filter1.add(new SubtypePredicate(SubType.AUROCHS));
filter2.add(new SubtypePredicate("Aurochs")); filter2.add(new SubtypePredicate(SubType.AUROCHS));
filter2.add(new AnotherPredicate()); filter2.add(new AnotherPredicate());
} }

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -52,7 +53,7 @@ public class AvacynianPriest extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human creature");
static { static {
filter.add(Predicates.not(new SubtypePredicate("Human"))); filter.add(Predicates.not(new SubtypePredicate(SubType.HUMAN)));
} }
public AvacynianPriest(UUID ownerId, CardSetInfo setInfo) { public AvacynianPriest(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -51,8 +52,8 @@ public class AvenBrigadier extends CardImpl {
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Soldier creatures"); private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Soldier creatures");
static { static {
filter1.add(new SubtypePredicate("Bird")); filter1.add(new SubtypePredicate(SubType.BIRD));
filter2.add(new SubtypePredicate("Soldier")); filter2.add(new SubtypePredicate(SubType.SOLDIER));
} }
public AvenBrigadier(UUID ownerId, CardSetInfo setInfo) { public AvenBrigadier(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledLandPermanent;
@ -56,7 +57,7 @@ public class AvengerOfZendikar extends CardImpl {
private static final FilterControlledPermanent filterLand = new FilterControlledLandPermanent(); private static final FilterControlledPermanent filterLand = new FilterControlledLandPermanent();
static { static {
filter.add(new SubtypePredicate("Plant")); filter.add(new SubtypePredicate(SubType.PLANT));
} }
public AvengerOfZendikar (UUID ownerId, CardSetInfo setInfo) { public AvengerOfZendikar (UUID ownerId, CardSetInfo setInfo) {

View file

@ -31,6 +31,7 @@ import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -50,7 +51,7 @@ public class AvoidFate extends CardImpl {
private final static FilterSpell filter = new FilterSpell("instant or Aura spell that targets a permanent you control"); private final static FilterSpell filter = new FilterSpell("instant or Aura spell that targets a permanent you control");
static { static {
filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new SubtypePredicate("Aura"))); filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new SubtypePredicate(SubType.AURA)));
filter.add(new TargetsPermanentPredicate(new FilterControlledPermanent())); filter.add(new TargetsPermanentPredicate(new FilterControlledPermanent()));
} }

View file

@ -36,10 +36,7 @@ import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -53,7 +50,7 @@ import java.util.UUID;
*/ */
public class AwakenTheAncient extends CardImpl { public class AwakenTheAncient extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain", "Mountain"); private static final FilterLandPermanent filter = new FilterLandPermanent(SubType.MOUNTAIN, "Mountain");
public AwakenTheAncient(UUID ownerId, CardSetInfo setInfo) { public AwakenTheAncient(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}{R}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}{R}");

View file

@ -35,10 +35,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.SubLayer;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -53,7 +50,7 @@ import java.util.UUID;
*/ */
public class AwakenerDruid extends CardImpl { public class AwakenerDruid extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest", "Forest"); private static final FilterLandPermanent filter = new FilterLandPermanent(SubType.FOREST, "Forest");
public AwakenerDruid(UUID ownerId, CardSetInfo setInfo) { public AwakenerDruid(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -78,7 +79,7 @@ class AwokenHorrorAbility extends TriggeredAbilityImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Horror creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Horror creatures");
static { static {
filter.add(Predicates.not(new SubtypePredicate("Horror"))); filter.add(Predicates.not(new SubtypePredicate(SubType.HORROR)));
} }
public AwokenHorrorAbility() { public AwokenHorrorAbility() {

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
@ -54,7 +55,7 @@ public class AzamiLadyOfScrolls extends CardImpl {
static { static {
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
filter.add(new SubtypePredicate("Wizard")); filter.add(new SubtypePredicate(SubType.WIZARD));
} }
public AzamiLadyOfScrolls(UUID ownerId, CardSetInfo setInfo) { public AzamiLadyOfScrolls(UUID ownerId, CardSetInfo setInfo) {

View file

@ -32,7 +32,9 @@ import mage.abilities.common.FetchLandActivatedAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import java.util.EnumSet;
import java.util.UUID; import java.util.UUID;
/** /**
@ -47,7 +49,7 @@ public class BadRiver extends CardImpl {
// Bad River enters the battlefield tapped. // Bad River enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldTappedAbility());
// {tap}, Sacrifice Bad River: Search your library for an Island or Swamp card and put it onto the battlefield. Then shuffle your library. // {tap}, Sacrifice Bad River: Search your library for an Island or Swamp card and put it onto the battlefield. Then shuffle your library.
this.addAbility(new FetchLandActivatedAbility(false, new String[]{"Island", "Swamp"})); this.addAbility(new FetchLandActivatedAbility(false, EnumSet.of(SubType.ISLAND, SubType.SWAMP)));
} }

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.*; import mage.cards.*;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
@ -104,7 +105,7 @@ class BalaGedThiefEffect extends OneShotEffect {
Player you = game.getPlayer(source.getControllerId()); Player you = game.getPlayer(source.getControllerId());
FilterControlledPermanent filter = new FilterControlledPermanent(); FilterControlledPermanent filter = new FilterControlledPermanent();
filter.add(new SubtypePredicate("Ally")); filter.add(new SubtypePredicate(SubType.ALLY));
int numberOfAllies = game.getBattlefield().countAll(filter, you.getId(), game); int numberOfAllies = game.getBattlefield().countAll(filter, you.getId(), game);

View file

@ -40,6 +40,7 @@ import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -59,7 +60,7 @@ public class BalduvianTradingPost extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an untapped Mountain"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("an untapped Mountain");
static { static {
filter.add(new SubtypePredicate("Mountain")); filter.add(new SubtypePredicate(SubType.MOUNTAIN));
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
} }

View file

@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
@ -77,7 +78,7 @@ class BalefulStareEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCard("Mountain or red card"); private static final FilterCard filter = new FilterCard("Mountain or red card");
static { static {
filter.add(Predicates.or(new SubtypePredicate("Mountain"), filter.add(Predicates.or(new SubtypePredicate(SubType.MOUNTAIN),
new ColorPredicate(ObjectColor.RED))); new ColorPredicate(ObjectColor.RED)));
} }

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -50,8 +51,8 @@ public class BallyrushBanneret extends CardImpl {
static { static {
filter.add(Predicates.or( filter.add(Predicates.or(
new SubtypePredicate("Kithkin"), new SubtypePredicate(SubType.KITHKIN),
new SubtypePredicate("Soldier"))); new SubtypePredicate(SubType.SOLDIER)));
} }
public BallyrushBanneret(UUID ownerId, CardSetInfo setInfo) { public BallyrushBanneret(UUID ownerId, CardSetInfo setInfo) {

View file

@ -66,7 +66,7 @@ public class BalthorTheDefiled extends CardImpl {
// Minion creatures get +1/+1. // Minion creatures get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield,
new FilterCreaturePermanent("Minion", "Minion creatures"), false))); new FilterCreaturePermanent(SubType.MINION, "Minion creatures"), false)));
// {B}{B}{B}, Exile Balthor the Defiled: Each player returns all black and all red creature cards from his or her graveyard to the battlefield. // {B}{B}{B}, Exile Balthor the Defiled: Each player returns all black and all red creature cards from his or her graveyard to the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BalthorTheDefiledEffect(), new ManaCostsImpl("{B}{B}{B}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BalthorTheDefiledEffect(), new ManaCostsImpl("{B}{B}{B}"));

View file

@ -36,10 +36,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
@ -57,9 +54,9 @@ public class BalthorTheStout extends CardImpl {
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("another target Barbarian"); private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("another target Barbarian");
static { static {
filter1.add(new SubtypePredicate("Barbarian")); filter1.add(new SubtypePredicate(SubType.BARBARIAN));
filter2.add(new AnotherPredicate()); filter2.add(new AnotherPredicate());
filter2.add(new SubtypePredicate("Barbarian")); filter2.add(new SubtypePredicate(SubType.BARBARIAN));
} }
public BalthorTheStout(UUID ownerId, CardSetInfo setInfo) { public BalthorTheStout(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -52,7 +53,7 @@ public class BaneslayerAngel extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("Demons and from Dragons"); private static final FilterPermanent filter = new FilterCreaturePermanent("Demons and from Dragons");
static { static {
filter.add(Predicates.or(new SubtypePredicate("Demon"), new SubtypePredicate("Dragon"))); filter.add(Predicates.or(new SubtypePredicate(SubType.DEMON), new SubtypePredicate(SubType.DRAGON)));
} }
public BaneslayerAngel(UUID ownerId, CardSetInfo setInfo) { public BaneslayerAngel(UUID ownerId, CardSetInfo setInfo) {

View file

@ -36,10 +36,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Outcome;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -60,9 +57,9 @@ public class BantPanorama extends CardImpl {
filter.add(new CardTypePredicate(CardType.LAND)); filter.add(new CardTypePredicate(CardType.LAND));
filter.add(new SupertypePredicate(SuperType.BASIC)); filter.add(new SupertypePredicate(SuperType.BASIC));
filter.add(Predicates.or( filter.add(Predicates.or(
new SubtypePredicate("Forest"), new SubtypePredicate(SubType.FOREST),
new SubtypePredicate("Plains"), new SubtypePredicate(SubType.PLAINS),
new SubtypePredicate("Island"))); new SubtypePredicate(SubType.ISLAND)));
} }
public BantPanorama(UUID ownerId, CardSetInfo setInfo) { public BantPanorama(UUID ownerId, CardSetInfo setInfo) {

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -49,7 +50,7 @@ public class BarbarianOutcast extends CardImpl {
private static final FilterControlledLandPermanent filterControlledLand = new FilterControlledLandPermanent("a Swamp"); private static final FilterControlledLandPermanent filterControlledLand = new FilterControlledLandPermanent("a Swamp");
static { static {
filterControlledLand.add(new SubtypePredicate("Swamp")); filterControlledLand.add(new SubtypePredicate(SubType.SWAMP));
} }
public BarbarianOutcast(UUID ownerId, CardSetInfo setInfo) { public BarbarianOutcast(UUID ownerId, CardSetInfo setInfo) {
@ -62,7 +63,7 @@ public class BarbarianOutcast extends CardImpl {
// When you control no Swamps, sacrifice Barbarian Outcast. // When you control no Swamps, sacrifice Barbarian Outcast.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
new FilterLandPermanent("Swamp", "no Swamps"), ComparisonType.EQUAL_TO, 0, new FilterLandPermanent(SubType.SWAMP, "no Swamps"), ComparisonType.EQUAL_TO, 0,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
@ -57,7 +58,7 @@ public class BaronSengir extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target Vampire"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target Vampire");
static { static {
filter.add(new SubtypePredicate("Vampire")); filter.add(new SubtypePredicate(SubType.VAMPIRE));
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
} }

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.keyword.SweepEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID; import java.util.UUID;
@ -51,7 +52,7 @@ public class BarrelDownSokenzan extends CardImpl {
// Sweep - Return any number of Mountains you control to their owner's hand. Barrel Down Sokenzan deals damage to target creature equal to twice the number of Mountains returned this way. // Sweep - Return any number of Mountains you control to their owner's hand. Barrel Down Sokenzan deals damage to target creature equal to twice the number of Mountains returned this way.
this.getSpellAbility().addEffect(new SweepEffect("Mountain")); this.getSpellAbility().addEffect(new SweepEffect(SubType.MOUNTAIN));
DynamicValue sweepValue = new MultipliedValue(new SweepNumber("Mountain", false), 2); DynamicValue sweepValue = new MultipliedValue(new SweepNumber("Mountain", false), 2);
this.getSpellAbility().addEffect(new DamageTargetEffect(sweepValue)); this.getSpellAbility().addEffect(new DamageTargetEffect(sweepValue));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());

View file

@ -61,7 +61,7 @@ public class BaruFistOfKrosa extends CardImpl {
private static final FilterCreaturePermanent greenCreatureFilter = new FilterCreaturePermanent("green creatures you control"); private static final FilterCreaturePermanent greenCreatureFilter = new FilterCreaturePermanent("green creatures you control");
static { static {
forestFilter.add(new SubtypePredicate("Forest")); forestFilter.add(new SubtypePredicate(SubType.FOREST));
greenCreatureFilter.add(new ControllerPredicate(TargetController.YOU)); greenCreatureFilter.add(new ControllerPredicate(TargetController.YOU));
greenCreatureFilter.add(new ColorPredicate(ObjectColor.GREEN)); greenCreatureFilter.add(new ColorPredicate(ObjectColor.GREEN));
} }

View file

@ -38,6 +38,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -53,7 +54,7 @@ public class BasalSliver extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("All Slivers"); private static final FilterPermanent filter = new FilterPermanent("All Slivers");
static { static {
filter.add(new SubtypePredicate("Sliver")); filter.add(new SubtypePredicate(SubType.SLIVER));
} }
public BasalSliver(UUID ownerId, CardSetInfo setInfo) { public BasalSliver(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -50,7 +51,7 @@ public class BatteringSliver extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all Sliver creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all Sliver creatures");
static { static {
filter.add(new SubtypePredicate("Sliver")); filter.add(new SubtypePredicate(SubType.SLIVER));
} }
public BatteringSliver(UUID ownerId, CardSetInfo setInfo) { public BatteringSliver(UUID ownerId, CardSetInfo setInfo) {

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