This commit is contained in:
igoudt 2017-05-16 22:11:47 +02:00
parent 24ff9f7c5e
commit c44c301f5b
293 changed files with 2291 additions and 550 deletions

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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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.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

@ -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

@ -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

@ -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

@ -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,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

@ -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;
@ -49,7 +50,7 @@ public class BattlegroundGeist extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit creatures");
static { static {
filter.add(new SubtypePredicate("Spirit")); filter.add(new SubtypePredicate(SubType.SPIRIT));
} }
public BattlegroundGeist(UUID ownerId, CardSetInfo setInfo) { public BattlegroundGeist(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 BelltollDragon extends CardImpl {
static { static {
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
filter.add(new SubtypePredicate("Dragon")); filter.add(new SubtypePredicate(SubType.DRAGON));
} }
public BelltollDragon(UUID ownerId, CardSetInfo setInfo) { public BelltollDragon(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.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
@ -59,7 +60,7 @@ public class BenalishCommander extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Soldiers you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Soldiers you control");
static { static {
filter.add(new SubtypePredicate("Soldier")); filter.add(new SubtypePredicate(SubType.SOLDIER));
} }
public BenalishCommander(UUID ownerId, CardSetInfo setInfo) { public BenalishCommander(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.abilities.mana.AnyColorManaAbility;
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.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -53,7 +54,7 @@ public class BirchloreRangers extends CardImpl {
static { static {
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
filter.add(new SubtypePredicate("Elf")); filter.add(new SubtypePredicate(SubType.ELF));
} }
public BirchloreRangers(UUID ownerId, CardSetInfo setInfo) { public BirchloreRangers(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,10 +37,7 @@ import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
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.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -58,8 +55,8 @@ public class BladewingTheRisen extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dragon creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dragon creatures");
private static final FilterPermanentCard filterCard = new FilterPermanentCard("Dragon permanent card from your graveyard"); private static final FilterPermanentCard filterCard = new FilterPermanentCard("Dragon permanent card from your graveyard");
static { static {
filter.add(new SubtypePredicate("Dragon")); filter.add(new SubtypePredicate(SubType.DRAGON));
filterCard.add(new SubtypePredicate("Dragon")); filterCard.add(new SubtypePredicate(SubType.DRAGON));
} }
public BladewingTheRisen(UUID ownerId, CardSetInfo setInfo) { public BladewingTheRisen(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.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
@ -47,7 +48,7 @@ import java.util.UUID;
*/ */
public class BloodChinRager extends CardImpl { public class BloodChinRager extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Warrior","Warrior creatures you control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.WARRIOR,"Warrior creatures you control");
static { static {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));

View file

@ -54,7 +54,7 @@ public class BloodlordOfVaasgoth extends CardImpl {
static { static {
filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new CardTypePredicate(CardType.CREATURE));
filter.add(new SubtypePredicate("Vampire")); filter.add(new SubtypePredicate(SubType.VAMPIRE));
} }
public BloodlordOfVaasgoth(UUID ownerId, CardSetInfo setInfo) { public BloodlordOfVaasgoth(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.ForestwalkAbility;
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.Predicates; import mage.filter.predicate.Predicates;
@ -55,8 +56,8 @@ public class BoggartLoggers extends CardImpl {
static { static {
filter.add(Predicates.or( filter.add(Predicates.or(
new SubtypePredicate("Treefolk"), new SubtypePredicate(SubType.TREEFOLK),
new SubtypePredicate("Forest"))); new SubtypePredicate(SubType.FOREST)));
} }
public BoggartLoggers(UUID ownerId, CardSetInfo setInfo) { public BoggartLoggers(UUID ownerId, CardSetInfo setInfo) {

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 BoilingSeas extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Islands"); private static final FilterPermanent filter = new FilterPermanent("Islands");
static { static {
filter.add(new SubtypePredicate("Island")); filter.add(new SubtypePredicate(SubType.ISLAND));
} }
public BoilingSeas(UUID ownerId, CardSetInfo setInfo) { public BoilingSeas(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.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.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -104,7 +105,7 @@ class BoonweaverGiantEffect extends OneShotEffect {
FilterCard filter = new FilterCard("Aura card"); FilterCard filter = new FilterCard("Aura card");
filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
filter.add(new SubtypePredicate("Aura")); filter.add(new SubtypePredicate(SubType.AURA));
Card card = null; Card card = null;
Zone zone = null; Zone zone = null;

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.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -55,7 +56,7 @@ public class BrassSquire 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 BrassSquire(UUID ownerId, CardSetInfo setInfo) { public BrassSquire(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
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;
@ -75,7 +76,7 @@ class BubblingMuckTriggeredAbility extends DelayedTriggeredManaAbility {
private static final FilterLandPermanent filter = new FilterLandPermanent("Swamp"); private static final FilterLandPermanent filter = new FilterLandPermanent("Swamp");
static { static {
filter.add(new SubtypePredicate("Swamp")); filter.add(new SubtypePredicate(SubType.SWAMP));
} }
public BubblingMuckTriggeredAbility() { public BubblingMuckTriggeredAbility() {

View file

@ -36,6 +36,7 @@ import mage.abilities.mana.DynamicManaAbility;
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;
@ -50,7 +51,7 @@ public class CabalCoffers extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Swamp you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Swamp you control");
static { static {
filter.add(new SubtypePredicate("Swamp")); filter.add(new SubtypePredicate(SubType.SWAMP));
} }
public CabalCoffers(UUID ownerId, CardSetInfo setInfo) { public CabalCoffers(UUID ownerId, CardSetInfo setInfo) {

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.SetTargetPointer; import mage.constants.SetTargetPointer;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -48,7 +49,7 @@ public class CabalSlaver extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("a Goblin"); private static final FilterPermanent filter = new FilterPermanent("a Goblin");
static { static {
filter.add(new SubtypePredicate("Goblin")); filter.add(new SubtypePredicate(SubType.GOBLIN));
} }
public CabalSlaver(UUID ownerId, CardSetInfo setInfo) { public CabalSlaver(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,6 +38,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.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;
@ -56,7 +57,7 @@ public class CallToTheGrave extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Zombie creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Zombie creature");
static { static {
filter.add(Predicates.not(new SubtypePredicate("Zombie"))); filter.add(Predicates.not(new SubtypePredicate(SubType.ZOMBIE)));
} }
public CallToTheGrave(UUID ownerId, CardSetInfo setInfo) { public CallToTheGrave(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.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -54,7 +55,7 @@ public class CaptainOfTheWatch extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creatures");
static { static {
filter.add(new SubtypePredicate("Soldier")); filter.add(new SubtypePredicate(SubType.SOLDIER));
} }
public CaptainOfTheWatch(UUID ownerId, CardSetInfo setInfo) { public CaptainOfTheWatch(UUID ownerId, CardSetInfo setInfo) {

View file

@ -55,7 +55,7 @@ public class CateranBrute extends CardImpl {
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 2 or less"); private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 2 or less");
static { static {
filter.add(new SubtypePredicate("Mercenary")); filter.add(new SubtypePredicate());
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
} }

View file

@ -32,6 +32,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -48,7 +49,7 @@ public class CateranSummons extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("Mercenary card"); private static final FilterCard filter = new FilterCreatureCard("Mercenary card");
static { static {
filter.add(new SubtypePredicate("Mercenary")); filter.add(new SubtypePredicate(SubType.MERCENARY));
} }
public CateranSummons(UUID ownerId, CardSetInfo setInfo) { public CateranSummons(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.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
@ -52,8 +53,8 @@ public class CaterwaulingBoggart extends CardImpl {
private static final FilterPermanent filterElemental = new FilterControlledCreaturePermanent("Elemental"); private static final FilterPermanent filterElemental = new FilterControlledCreaturePermanent("Elemental");
static { static {
filterGoblin.add(new SubtypePredicate("Goblin")); filterGoblin.add(new SubtypePredicate(SubType.GOBLIN));
filterElemental.add(new SubtypePredicate("Elemental")); filterElemental.add(new SubtypePredicate(SubType.ELEMENTAL));
} }
public CaterwaulingBoggart(UUID ownerId, CardSetInfo setInfo) { public CaterwaulingBoggart(UUID ownerId, CardSetInfo setInfo) {

View file

@ -55,7 +55,7 @@ public class CaughtInTheBrights extends CardImpl {
static { static {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(new SubtypePredicate("Vehicle")); filter.add(new SubtypePredicate(SubType.VEHICLE));
} }
public CaughtInTheBrights(UUID ownerId, CardSetInfo setInfo) { public CaughtInTheBrights(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.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;
@ -50,7 +51,7 @@ public class CennsHeir extends CardImpl {
private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Kithkin"); private static final FilterAttackingCreature filter = new FilterAttackingCreature("other attacking Kithkin");
static { static {
filter.add(new SubtypePredicate("Kithkin")); filter.add(new SubtypePredicate(SubType.KITHKIN));
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
} }

View file

@ -50,9 +50,9 @@ public class ChangelingTitan extends CardImpl {
// Changeling // Changeling
this.addAbility(ChangelingAbility.getInstance()); this.addAbility(ChangelingAbility.getInstance());
// Champion a creature // Champion a creature
this.addAbility(new ChampionAbility(this, "", true)); this.addAbility(new ChampionAbility(this, true));
} }
public ChangelingTitan(final ChangelingTitan card) { public ChangelingTitan(final ChangelingTitan card) {

View file

@ -38,6 +38,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.cards.m.MarkovsServant; import mage.cards.m.MarkovsServant;
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;
@ -56,7 +57,7 @@ public class ChosenOfMarkov extends CardImpl {
static { static {
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
filter.add(new SubtypePredicate("Vampire")); filter.add(new SubtypePredicate(SubType.VAMPIRE));
} }
public ChosenOfMarkov(UUID ownerId, CardSetInfo setInfo) { public ChosenOfMarkov(UUID ownerId, CardSetInfo setInfo) {

View file

@ -55,7 +55,7 @@ public class ClawsOfValakut extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain you control"); private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain you control");
static { static {
filter.add(new SubtypePredicate("Mountain")); filter.add(new SubtypePredicate(SubType.MOUNTAIN));
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
} }

View file

@ -53,7 +53,7 @@ public class CommanderCody extends CardImpl {
static { static {
filter.add(Predicates.not(new TokenPredicate())); filter.add(Predicates.not(new TokenPredicate()));
filter.add(new SubtypePredicate("Trooper")); filter.add(new SubtypePredicate(SubType.TROOPER));
} }
public CommanderCody(UUID ownerId, CardSetInfo setInfo) { public CommanderCody(UUID ownerId, CardSetInfo setInfo) {

View file

@ -32,6 +32,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.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;
@ -52,9 +53,9 @@ public class ConsumingBonfire extends CardImpl {
static { static {
filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new CardTypePredicate(CardType.CREATURE));
filter.add(Predicates.not(new SubtypePredicate("Elemental"))); filter.add(Predicates.not(new SubtypePredicate(SubType.ELEMENTAL)));
filter2.add(new CardTypePredicate(CardType.CREATURE)); filter2.add(new CardTypePredicate(CardType.CREATURE));
filter2.add(new SubtypePredicate("Treefolk")); filter2.add(new SubtypePredicate(SubType.TREEFOLK));
} }
public ConsumingBonfire(UUID ownerId, CardSetInfo setInfo) { public ConsumingBonfire(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.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -53,8 +54,8 @@ public class CorruptedRoots extends CardImpl {
static { static {
filter.add(Predicates.or( filter.add(Predicates.or(
new SubtypePredicate("Forest"), new SubtypePredicate(SubType.FOREST),
new SubtypePredicate("Plains"))); new SubtypePredicate(SubType.PLAINS)));
} }
public CorruptedRoots(UUID ownerId, CardSetInfo setInfo) { public CorruptedRoots(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.FilterPermanent; import mage.filter.FilterPermanent;
@ -54,7 +55,7 @@ public class CrystallineSliver extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// All Slivers have shroud. // All Slivers have shroud.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, new FilterPermanent("Sliver", "All Slivers")))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, new FilterPermanent(SubType.SLIVER, "All Slivers"))));
} }
public CrystallineSliver(final CrystallineSliver card) { public CrystallineSliver(final CrystallineSliver card) {

View file

@ -71,7 +71,7 @@ public class CyclopeanTomb extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent(); private static final FilterLandPermanent filter = new FilterLandPermanent();
static { static {
filter.add(Predicates.not(new SubtypePredicate("Swamp"))); filter.add(Predicates.not(new SubtypePredicate(SubType.SWAMP)));
} }
public CyclopeanTomb(UUID ownerId, CardSetInfo setInfo) { public CyclopeanTomb(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.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 DaruEncampment extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature");
static { static {
filter.add(new SubtypePredicate("Soldier")); filter.add(new SubtypePredicate(SubType.SOLDIER));
} }
public DaruEncampment(UUID ownerId, CardSetInfo setInfo) { public DaruEncampment(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.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,8 +54,8 @@ public class DeathBaron extends CardImpl {
private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent("Zombie creatures"); private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent("Zombie creatures");
static { static {
filterSkeletons.add(new SubtypePredicate("Skeleton")); filterSkeletons.add(new SubtypePredicate(SubType.SKELETON));
filterZombie.add(new SubtypePredicate("Zombie")); filterZombie.add(new SubtypePredicate(SubType.ZOMBIE));
} }
public DeathBaron(UUID ownerId, CardSetInfo setInfo) { public DeathBaron(UUID ownerId, CardSetInfo setInfo) {

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;
@ -51,7 +52,7 @@ public class DeepSeaSerpent extends CardImpl {
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
// Deep-Sea Serpent can't attack unless defending player controls an Island. // Deep-Sea Serpent 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 DeepSeaSerpent(final DeepSeaSerpent card) { public DeepSeaSerpent(final DeepSeaSerpent card) {

View file

@ -37,6 +37,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.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
@ -54,7 +55,7 @@ public class DefiantFalcon 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

@ -37,6 +37,7 @@ import mage.abilities.mana.AnyColorManaAbility;
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 DiamondKaleidoscope extends CardImpl {
static { static {
filter.add(new TokenPredicate()); filter.add(new TokenPredicate());
filter.add(new SubtypePredicate("Prism")); filter.add(new SubtypePredicate(SubType.PRISM));
} }
public DiamondKaleidoscope(UUID ownerId, CardSetInfo setInfo) { public DiamondKaleidoscope(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.cards.CardSetInfo;
import mage.constants.AbilityType; import mage.constants.AbilityType;
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;
@ -57,7 +58,7 @@ public class DraconicRoar extends CardImpl {
private static final FilterCard filter = new FilterCard("a Dragon card from your hand (you don't have to)"); private static final FilterCard filter = new FilterCard("a Dragon card from your hand (you don't have to)");
static { static {
filter.add(new SubtypePredicate("Dragon")); filter.add(new SubtypePredicate(SubType.DRAGON));
} }
public DraconicRoar(UUID ownerId, CardSetInfo setInfo) { public DraconicRoar(UUID ownerId, CardSetInfo setInfo) {

View file

@ -54,7 +54,7 @@ public class DragonHunter extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Protection from Dragons // Protection from Dragons
this.addAbility(new ProtectionAbility(new FilterPermanent("Dragon", "Dragons"))); this.addAbility(new ProtectionAbility(new FilterPermanent(SubType.DRAGON, "Dragons")));
// Dragon Hunter can block Dragons as though it had reach. // Dragon Hunter can block Dragons as though it had reach.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockDragonsAsThoughtIthadReachEffect(Duration.WhileOnBattlefield))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockDragonsAsThoughtIthadReachEffect(Duration.WhileOnBattlefield)));

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.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -48,7 +49,7 @@ public class DragonlordsServant extends CardImpl {
private static final FilterCard filter = new FilterCard("Dragon spells"); private static final FilterCard filter = new FilterCard("Dragon spells");
static { static {
filter.add(new SubtypePredicate("Dragon")); filter.add(new SubtypePredicate(SubType.DRAGON));
} }
public DragonlordsServant(UUID ownerId, CardSetInfo setInfo) { public DragonlordsServant(UUID ownerId, CardSetInfo setInfo) {

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.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -48,7 +49,7 @@ public class DragonspeakerShaman extends CardImpl {
private static final FilterCard filter = new FilterCard("Dragon spells"); private static final FilterCard filter = new FilterCard("Dragon spells");
static { static {
filter.add(new SubtypePredicate("Dragon")); filter.add(new SubtypePredicate(SubType.DRAGON));
} }
public DragonspeakerShaman(UUID ownerId, CardSetInfo setInfo) { public DragonspeakerShaman(UUID ownerId, CardSetInfo setInfo) {

View file

@ -33,6 +33,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 java.util.UUID; import java.util.UUID;
@ -53,7 +54,7 @@ public class Dragonstalker extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// protection from Dragons // protection from Dragons
this.addAbility(new ProtectionAbility(new FilterPermanent("Dragon", "Dragons"))); this.addAbility(new ProtectionAbility(new FilterPermanent(SubType.DRAGON, "Dragons")));
} }
public Dragonstalker(final Dragonstalker card) { public Dragonstalker(final Dragonstalker card) {

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.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
@ -63,13 +64,13 @@ public class Dreamwinder extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Dreamwinder can't attack unless defending player controls an Island. // Dreamwinder 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"))));
// {U}, Sacrifice an Island: Target land becomes an Island until end of turn. // {U}, Sacrifice an Island: Target land becomes an Island until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Island"), new ManaCostsImpl("{U}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Island"), new ManaCostsImpl("{U}"));
Target target = new TargetLandPermanent(); Target target = new TargetLandPermanent();
ability.addTarget(target); ability.addTarget(target);
FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an Island"); FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an Island");
filter.add(new SubtypePredicate("Island")); filter.add(new SubtypePredicate(SubType.ISLAND));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true)));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -37,6 +37,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.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -55,7 +56,7 @@ public class DrogskolCavalry extends CardImpl {
static { static {
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
filter.add(new SubtypePredicate("Spirit")); filter.add(new SubtypePredicate(SubType.SPIRIT));
} }
public DrogskolCavalry(UUID ownerId, CardSetInfo setInfo) { public DrogskolCavalry(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.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.ZombieToken; import mage.game.permanent.token.ZombieToken;
@ -63,7 +64,7 @@ public class DrunauCorpseTrawler extends CardImpl {
// {2}{B}: Target Zombie gains deathtouch until end of turn. // {2}{B}: Target Zombie gains deathtouch until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{2}{B}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{2}{B}"));
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("Zombie", "Zombie"))); ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent(SubType.ZOMBIE, "Zombie")));
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.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -56,7 +57,7 @@ public class DwarvenBloodboiler extends CardImpl {
static { static {
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
filter.add(new SubtypePredicate("Dwarf")); filter.add(new SubtypePredicate(SubType.DWARF));
} }
public DwarvenBloodboiler(UUID ownerId, CardSetInfo setInfo) { public DwarvenBloodboiler(UUID ownerId, CardSetInfo setInfo) {

View file

@ -34,10 +34,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
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.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
@ -53,7 +50,7 @@ public class EarthServant extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain you control"); private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain you control");
static { static {
filter.add(new SubtypePredicate("Mountain")); filter.add(new SubtypePredicate(SubType.MOUNTAIN));
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
} }

View file

@ -34,6 +34,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.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;
@ -49,9 +50,9 @@ public class EliteInquisitor extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("Vampires, from Werewolves, and from Zombies"); private static final FilterPermanent filter = new FilterCreaturePermanent("Vampires, from Werewolves, and from Zombies");
static {filter.add(Predicates.or( static {filter.add(Predicates.or(
new SubtypePredicate("Vampire"), new SubtypePredicate(SubType.VAMPIRE),
new SubtypePredicate("Werewolf"), new SubtypePredicate(SubType.WEREWOLF),
new SubtypePredicate("Zombie") new SubtypePredicate(SubType.ZOMBIE)
)); ));
} }

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.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
@ -51,7 +52,7 @@ public class ElvenRiders extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("except by Walls and/or creatures with flying"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("except by Walls and/or creatures with flying");
static { static {
filter.add(Predicates.not(Predicates.or(new SubtypePredicate("Wall"), new AbilityPredicate(FlyingAbility.class)))); filter.add(Predicates.not(Predicates.or(new SubtypePredicate(SubType.WALL), new AbilityPredicate(FlyingAbility.class))));
} }
public ElvenRiders(UUID ownerId, CardSetInfo setInfo) { public ElvenRiders(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.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -55,8 +56,8 @@ public class ElvishArchdruid extends CardImpl {
private static final FilterControlledCreaturePermanent filterCount = new FilterControlledCreaturePermanent("Elf you control"); private static final FilterControlledCreaturePermanent filterCount = new FilterControlledCreaturePermanent("Elf you control");
static { static {
filter.add(new SubtypePredicate("Elf")); filter.add(new SubtypePredicate(SubType.ELF));
filterCount.add(new SubtypePredicate("Elf")); filterCount.add(new SubtypePredicate(SubType.ELF));
} }
public ElvishArchdruid(UUID ownerId, CardSetInfo setInfo) { public ElvishArchdruid(UUID ownerId, CardSetInfo setInfo) {

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
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.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -49,7 +50,7 @@ public class ElvishVanguard extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("another Elf"); private static final FilterPermanent filter = new FilterPermanent("another Elf");
static { static {
filter.add(new SubtypePredicate("Elf")); filter.add(new SubtypePredicate(SubType.ELF));
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
} }

View file

@ -39,13 +39,7 @@ import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.CostModificationType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -68,7 +62,7 @@ public class EmbalmersTools extends CardImpl {
static { static {
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
filter.add(new SubtypePredicate("Zombie")); filter.add(new SubtypePredicate(SubType.ZOMBIE));
} }
public EmbalmersTools(UUID ownerId, CardSetInfo setInfo) { public EmbalmersTools(UUID ownerId, CardSetInfo setInfo) {

View file

@ -29,7 +29,7 @@ package mage.cards.e;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.constants.ComparisonType; import mage.constants.*;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -37,10 +37,6 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
@ -68,7 +64,7 @@ public class EndrekSahrMasterBreeder extends CardImpl {
this.addAbility(new SpellCastControllerTriggeredAbility(new EndrekSahrMasterBreederEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false, true)); this.addAbility(new SpellCastControllerTriggeredAbility(new EndrekSahrMasterBreederEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false, true));
// When you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder. // When you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
new FilterCreaturePermanent("Thrull", "seven or more Thrulls"), ComparisonType.MORE_THAN, 6, new FilterCreaturePermanent(SubType.THRULL, "seven or more Thrulls"), ComparisonType.MORE_THAN, 6,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -40,6 +40,7 @@ import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
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;
@ -58,7 +59,7 @@ public class EraOfInnovation extends CardImpl {
static { static {
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
new SubtypePredicate("Artificer"))); new SubtypePredicate(SubType.ARTIFICER)));
} }
public EraOfInnovation(UUID ownerId, CardSetInfo setInfo) { public EraOfInnovation(UUID ownerId, CardSetInfo setInfo) {

View file

@ -38,6 +38,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
@ -59,7 +60,7 @@ public class EyeOfUgin extends CardImpl {
static { static {
filter.add(new ColorlessPredicate()); filter.add(new ColorlessPredicate());
filterSpells.add(new ColorlessPredicate()); filterSpells.add(new ColorlessPredicate());
filterSpells.add(new SubtypePredicate("Eldrazi")); filterSpells.add(new SubtypePredicate(SubType.ELDRAZI));
} }
public EyeOfUgin(UUID ownerId, CardSetInfo setInfo) { public EyeOfUgin(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,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.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;
@ -50,7 +51,7 @@ public class FathomSeer extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands");
static { static {
filter.add(new SubtypePredicate("Island")); filter.add(new SubtypePredicate(SubType.ISLAND));
} }
public FathomSeer(UUID ownerId, CardSetInfo setInfo) { public FathomSeer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");

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.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -50,7 +51,7 @@ public class FeedingFrenzy extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent(); private static final FilterPermanent filter = new FilterPermanent();
static { static {
filter.add(new SubtypePredicate("Zombie")); filter.add(new SubtypePredicate(SubType.ZOMBIE));
} }
public FeedingFrenzy(UUID ownerId, CardSetInfo setInfo) { public FeedingFrenzy(UUID ownerId, CardSetInfo setInfo) {

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.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;
@ -50,7 +51,7 @@ public class Fireblast extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Mountains"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Mountains");
static { static {
filter.add(new SubtypePredicate("Mountain")); filter.add(new SubtypePredicate(SubType.MOUNTAIN));
} }
public Fireblast(UUID ownerId, CardSetInfo setInfo) { public Fireblast(UUID ownerId, CardSetInfo setInfo) {

View file

@ -40,6 +40,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;
@ -57,8 +58,8 @@ public class FirewakeSliver extends CardImpl {
private static final FilterCreaturePermanent targetSliverFilter = new FilterCreaturePermanent("Sliver"); private static final FilterCreaturePermanent targetSliverFilter = new FilterCreaturePermanent("Sliver");
static { static {
filter.add(new SubtypePredicate("Sliver")); filter.add(new SubtypePredicate(SubType.SLIVER));
targetSliverFilter.add(new SubtypePredicate("Sliver")); targetSliverFilter.add(new SubtypePredicate(SubType.SLIVER));
} }
public FirewakeSliver(UUID ownerId, CardSetInfo setInfo) { public FirewakeSliver(UUID ownerId, CardSetInfo setInfo) {

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect;
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.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
@ -48,7 +49,7 @@ public class FlamekinHarbinger extends CardImpl {
private static final FilterCard filter = new FilterCard("Elemental card"); private static final FilterCard filter = new FilterCard("Elemental card");
static { static {
filter.add(new SubtypePredicate("Elemental")); filter.add(new SubtypePredicate(SubType.ELEMENTAL));
} }
public FlamekinHarbinger(UUID ownerId, CardSetInfo setInfo) { public FlamekinHarbinger(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.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.Filter; import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
@ -91,7 +92,7 @@ class FlickerformEffect extends OneShotEffect {
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent(); private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent();
static { static {
filter.add(new SubtypePredicate("Aura")); filter.add(new SubtypePredicate(SubType.AURA));
} }
public FlickerformEffect() { public FlickerformEffect() {
@ -147,7 +148,7 @@ class FlickerformReturnEffect extends OneShotEffect {
static { static {
filterAura.add(new CardTypePredicate(CardType.ENCHANTMENT)); filterAura.add(new CardTypePredicate(CardType.ENCHANTMENT));
filterAura.add(new SubtypePredicate("Aura")); filterAura.add(new SubtypePredicate(SubType.AURA));
} }
private final UUID enchantedCardId; private final UUID enchantedCardId;

View file

@ -34,6 +34,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.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetSpell; import mage.target.TargetSpell;
@ -49,7 +50,7 @@ public class Foil extends CardImpl {
private static final FilterCard filter = new FilterCard("an Island card"); private static final FilterCard filter = new FilterCard("an Island card");
static { static {
filter.add(new SubtypePredicate("Island")); filter.add(new SubtypePredicate(SubType.ISLAND));
} }
public Foil(UUID ownerId, CardSetInfo setInfo) { public Foil(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.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -52,7 +53,7 @@ public class Foratog extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("a Forest"); private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("a Forest");
static{ static{
filter.add(new SubtypePredicate("Forest")); filter.add(new SubtypePredicate(SubType.FOREST));
} }
public Foratog(UUID ownerId, CardSetInfo setInfo) { public Foratog(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");

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.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -51,8 +52,8 @@ public class FortifiedVillage extends CardImpl {
private static final FilterCard filter = new FilterCard("a Forest or Plains card from your hand"); private static final FilterCard filter = new FilterCard("a Forest or Plains card from your hand");
static { static {
filter.add(Predicates.or(new SubtypePredicate("Forest"), filter.add(Predicates.or(new SubtypePredicate(SubType.FOREST),
new SubtypePredicate("Plains"))); new SubtypePredicate(SubType.PLAINS)));
} }
public FortifiedVillage(UUID ownerId, CardSetInfo setInfo) { public FortifiedVillage(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.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -58,8 +59,8 @@ public class FrenzySliver extends CardImpl {
private static final FilterCreaturePermanent targetSliverFilter = new FilterCreaturePermanent("Sliver"); private static final FilterCreaturePermanent targetSliverFilter = new FilterCreaturePermanent("Sliver");
static { static {
filter.add(new SubtypePredicate("Sliver")); filter.add(new SubtypePredicate(SubType.SLIVER));
targetSliverFilter.add(new SubtypePredicate("Sliver")); targetSliverFilter.add(new SubtypePredicate(SubType.SLIVER));
} }
public FrenzySliver(UUID ownerId, CardSetInfo setInfo) { public FrenzySliver(UUID ownerId, CardSetInfo setInfo) {

View file

@ -40,10 +40,7 @@ import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
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.Outcome;
import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -61,7 +58,7 @@ public class FullMoonsRise extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf creatures");
static { static {
filter.add(new SubtypePredicate("Werewolf")); filter.add(new SubtypePredicate(SubType.WEREWOLF));
} }
public FullMoonsRise(UUID ownerId, CardSetInfo setInfo) { public FullMoonsRise(UUID ownerId, CardSetInfo setInfo) {

View file

@ -31,6 +31,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterLandCard; import mage.filter.common.FilterLandCard;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
@ -46,7 +47,7 @@ public class GaeasBounty extends CardImpl {
private static final FilterLandCard filter = new FilterLandCard("Forest"); private static final FilterLandCard filter = new FilterLandCard("Forest");
static { static {
filter.add(new SubtypePredicate("Forest")); filter.add(new SubtypePredicate(SubType.FOREST));
} }
public GaeasBounty(UUID ownerId, CardSetInfo setInfo) { public GaeasBounty(UUID ownerId, CardSetInfo setInfo) {

View file

@ -55,7 +55,7 @@ public class GauntletOfMight extends CardImpl {
static { static {
filter.add(new ColorPredicate(ObjectColor.RED)); filter.add(new ColorPredicate(ObjectColor.RED));
filterMountain.add(new SubtypePredicate("Mountain")); filterMountain.add(new SubtypePredicate(SubType.MOUNTAIN));
} }
public GauntletOfMight(UUID ownerId, CardSetInfo setInfo) { public GauntletOfMight(UUID ownerId, CardSetInfo setInfo) {

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.CyclingAbility;
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.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -51,7 +52,7 @@ public class GempalmIncinerator extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Goblins on the battlefield"); private static final FilterPermanent filter = new FilterPermanent("Goblins on the battlefield");
static { static {
filter.add(new SubtypePredicate("Goblin")); filter.add(new SubtypePredicate(SubType.GOBLIN));
} }
public GempalmIncinerator(UUID ownerId, CardSetInfo setInfo) { public GempalmIncinerator(UUID ownerId, CardSetInfo setInfo) {

View file

@ -39,10 +39,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -61,7 +58,7 @@ public class GeneralTazri extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("an Ally creature card"); private static final FilterCreatureCard filter = new FilterCreatureCard("an Ally creature card");
static { static {
filter.add(new SubtypePredicate("Ally")); filter.add(new SubtypePredicate(SubType.ALLY));
} }
public GeneralTazri(UUID ownerId, CardSetInfo setInfo) { public GeneralTazri(UUID ownerId, CardSetInfo setInfo) {
@ -79,7 +76,7 @@ public class GeneralTazri extends CardImpl {
DynamicValue xValue = new GeneralTazriColorCount(); DynamicValue xValue = new GeneralTazriColorCount();
this.addAbility(new SimpleActivatedAbility( this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new BoostControlledEffect(xValue, xValue, Duration.EndOfTurn, new FilterCreaturePermanent("Ally", "Ally creatures"), false), new BoostControlledEffect(xValue, xValue, Duration.EndOfTurn, new FilterCreaturePermanent(SubType.ALLY, "Ally creatures"), false),
new ManaCostsImpl("{W}{U}{B}{R}{G}"))); new ManaCostsImpl("{W}{U}{B}{R}{G}")));
} }
@ -99,7 +96,7 @@ class GeneralTazriColorCount implements DynamicValue {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent(); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent();
static { static {
filter.add(new SubtypePredicate(("Ally"))); filter.add(new SubtypePredicate((SubType.ALLY)));
} }
@Override @Override

View file

@ -37,10 +37,7 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect;
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.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -55,7 +52,7 @@ import mage.abilities.effects.common.continuous.BecomesCreatureAttachedWithActiv
*/ */
public class GenjuOfTheSpires extends CardImpl { public class GenjuOfTheSpires extends CardImpl {
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Mountain", "Mountain"); private static final FilterLandPermanent FILTER = new FilterLandPermanent(SubType.MOUNTAIN, "Mountain");
public GenjuOfTheSpires(UUID ownerId, CardSetInfo setInfo) { public GenjuOfTheSpires(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}");

View file

@ -34,10 +34,7 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
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.FilterControlledLandPermanent; import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate;
@ -54,7 +51,7 @@ public class GlacialCrevasses extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("a snow Mountain"); private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("a snow Mountain");
static { static {
filter.add(new SubtypePredicate("Mountain")); filter.add(new SubtypePredicate(SubType.MOUNTAIN));
filter.add(new SupertypePredicate(SuperType.SNOW)); filter.add(new SupertypePredicate(SuperType.SNOW));
} }

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.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
@ -75,7 +76,7 @@ class GlimmerpostEffect extends OneShotEffect {
private static final FilterPermanent filter = new FilterPermanent(); private static final FilterPermanent filter = new FilterPermanent();
static { static {
filter.add(new SubtypePredicate("Locus")); filter.add(new SubtypePredicate(SubType.LOCUS));
} }
public GlimmerpostEffect() { public GlimmerpostEffect() {

View file

@ -33,6 +33,8 @@ 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.SubTypeSet;
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;
@ -42,18 +44,19 @@ import mage.players.Player;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors;
/** /**
*
* @author Markedagain * @author Markedagain
*/ */
public class GlobalRuin extends CardImpl { public class GlobalRuin extends CardImpl {
public GlobalRuin(UUID ownerId, CardSetInfo setInfo) { public GlobalRuin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}");
// Each player chooses from the lands he or she controls a land of each basic land type, then sacrifices the rest. // Each player chooses from the lands he or she controls a land of each basic land type, then sacrifices the rest.
this.getSpellAbility().addEffect(new GlobalRuinDestroyLandEffect()); this.getSpellAbility().addEffect(new GlobalRuinDestroyLandEffect());
@ -88,21 +91,21 @@ class GlobalRuinDestroyLandEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Set<UUID> lands = new HashSet<>(); Set<UUID> lands = new HashSet<>();
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
Player player = game.getPlayer(playerId); Player player = game.getPlayer(playerId);
for (String landName : new String[]{"Forest", "Island", "Mountain", "Plains", "Swamp"}) { for (SubType landName : Arrays.stream(SubType.values()).filter(p -> p.getSubTypeSet() == SubTypeSet.BasicLandType).collect(Collectors.toSet())) {
FilterControlledLandPermanent filter = new FilterControlledLandPermanent(landName + " you control"); FilterControlledLandPermanent filter = new FilterControlledLandPermanent(landName + " you control");
filter.add(new SubtypePredicate(landName)); filter.add(new SubtypePredicate(landName));
Target target = new TargetControlledPermanent(1, 1, filter, true); Target target = new TargetControlledPermanent(1, 1, filter, true);
if (target.canChoose(player.getId(), game)) { if (target.canChoose(player.getId(), game)) {
player.chooseTarget(outcome, target, source, game); player.chooseTarget(outcome, target, source, game);
lands.add(target.getFirstTarget()); lands.add(target.getFirstTarget());
} }
} }
} }
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), game)){ for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), game)) {
if (!lands.contains(permanent.getId())){ if (!lands.contains(permanent.getId())) {
permanent.sacrifice(permanent.getId(), game); permanent.sacrifice(permanent.getId(), game);
} }
} }

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.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;
@ -53,7 +54,7 @@ public class Goatnapper extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("Goat"); private static final FilterPermanent filter = new FilterPermanent("Goat");
static { static {
filter.add(new SubtypePredicate("Goat")); filter.add(new SubtypePredicate(SubType.GOAT));
} }
public Goatnapper(UUID ownerId, CardSetInfo setInfo) { public Goatnapper(UUID ownerId, CardSetInfo setInfo) {

View file

@ -32,6 +32,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.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;
@ -47,7 +48,7 @@ public class GoblinGrenade extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin");
static { static {
filter.add(new SubtypePredicate("Goblin")); filter.add(new SubtypePredicate(SubType.GOBLIN));
} }
public GoblinGrenade(UUID ownerId, CardSetInfo setInfo) { public GoblinGrenade(UUID ownerId, CardSetInfo setInfo) {

View file

@ -33,6 +33,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.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.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
@ -48,7 +49,7 @@ public class GoblinMatron extends CardImpl {
private static final FilterCard filter = new FilterCard("Goblin card"); private static final FilterCard filter = new FilterCard("Goblin card");
static { static {
filter.add(new SubtypePredicate("Goblin")); filter.add(new SubtypePredicate(SubType.GOBLIN));
} }
public GoblinMatron(UUID ownerId, CardSetInfo setInfo) { public GoblinMatron(UUID ownerId, CardSetInfo setInfo) {

View file

@ -39,10 +39,7 @@ import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
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.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.AttackingPredicate;
@ -58,8 +55,8 @@ import java.util.UUID;
*/ */
public class GoblinRabblemaster extends CardImpl { public class GoblinRabblemaster extends CardImpl {
private static final FilterCreaturePermanent otherGoblinFilter = new FilterCreaturePermanent("Goblin", "Other Goblin creatures you control"); private static final FilterCreaturePermanent otherGoblinFilter = new FilterCreaturePermanent(SubType.GOBLIN, "Other Goblin creatures you control");
private static final FilterCreaturePermanent attackingFilter = new FilterCreaturePermanent("Goblin", "other attacking Goblin"); private static final FilterCreaturePermanent attackingFilter = new FilterCreaturePermanent(SubType.GOBLIN, "other attacking Goblin");
static { static {
otherGoblinFilter.add(new AnotherPredicate()); otherGoblinFilter.add(new AnotherPredicate());

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect;
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;
@ -51,7 +52,7 @@ public class GoblinTurncoat extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Goblin"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Goblin");
static { static {
filter.add(new SubtypePredicate("Goblin")); filter.add(new SubtypePredicate(SubType.GOBLIN));
} }
public GoblinTurncoat(UUID ownerId, CardSetInfo setInfo) { public GoblinTurncoat(UUID ownerId, CardSetInfo setInfo) {

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect;
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.game.permanent.token.GoblinToken; import mage.game.permanent.token.GoblinToken;
@ -48,7 +49,7 @@ import java.util.UUID;
*/ */
public class GoblinWarrens extends CardImpl { public class GoblinWarrens extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Goblin", "Goblins"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.GOBLIN, "Goblins");
public GoblinWarrens(UUID ownerId, CardSetInfo setInfo) { public GoblinWarrens(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}");

View file

@ -40,6 +40,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.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
@ -58,7 +59,7 @@ public class GrafHarvest extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control");
static { static {
filter.add(new SubtypePredicate("Zombie")); filter.add(new SubtypePredicate(SubType.ZOMBIE));
} }
public GrafHarvest(UUID ownerId, CardSetInfo setInfo) { public GrafHarvest(UUID ownerId, CardSetInfo setInfo) {

View file

@ -32,22 +32,23 @@ 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;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public class Grasslands extends CardImpl { public class Grasslands extends CardImpl {
public Grasslands(UUID ownerId, CardSetInfo setInfo) { public Grasslands(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},""); super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Grasslands enters the battlefield tapped. // Grasslands enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldTappedAbility());
// {tap}, Sacrifice Grasslands: Search your library for a Forest or Plains card and put it onto the battlefield. Then shuffle your library. // {tap}, Sacrifice Grasslands: Search your library for a Forest or Plains card and put it onto the battlefield. Then shuffle your library.
this.addAbility(new FetchLandActivatedAbility(false, new String[]{"Forest", "Plains"})); this.addAbility(new FetchLandActivatedAbility(false, EnumSet.of(SubType.FOREST, SubType.PLAINS)));
} }
public Grasslands(final Grasslands card) { public Grasslands(final Grasslands card) {

View file

@ -39,10 +39,7 @@ import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.IndestructibleAbility; 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.*;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterObject; import mage.filter.FilterObject;
import mage.filter.FilterStackObject; import mage.filter.FilterStackObject;
import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterControlledArtifactPermanent;
@ -69,7 +66,7 @@ public class GuardianBeast extends CardImpl {
static { static {
filterAura.add(new CardTypePredicate(CardType.ENCHANTMENT)); filterAura.add(new CardTypePredicate(CardType.ENCHANTMENT));
filterAura.add(new SubtypePredicate("Aura")); filterAura.add(new SubtypePredicate(SubType.AURA));
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
} }

View file

@ -35,6 +35,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;
@ -51,7 +52,7 @@ public class HeritageDruid extends CardImpl {
static { static {
filter.add(Predicates.not(new TappedPredicate())); filter.add(Predicates.not(new TappedPredicate()));
filter.add(new SubtypePredicate("Elf")); filter.add(new SubtypePredicate(SubType.ELF));
} }
public HeritageDruid(UUID ownerId, CardSetInfo setInfo) { public HeritageDruid(UUID ownerId, CardSetInfo setInfo) {

View file

@ -40,6 +40,7 @@ import mage.abilities.keyword.NinjutsuAbility;
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.FilterCard; import mage.filter.FilterCard;
@ -58,8 +59,8 @@ public class HigureTheStillWind extends CardImpl {
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("Ninja creature"); private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("Ninja creature");
static { static {
filter.add(new SubtypePredicate("Ninja")); filter.add(new SubtypePredicate(SubType.NINJA));
filterCreature.add((new SubtypePredicate("Ninja"))); filterCreature.add((new SubtypePredicate(SubType.NINJA)));
} }
public HigureTheStillWind(UUID ownerId, CardSetInfo setInfo) { public HigureTheStillWind(UUID ownerId, CardSetInfo setInfo) {

View file

@ -34,6 +34,7 @@ import mage.constants.CardType;
import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.SubType;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -47,7 +48,7 @@ public class HisokasDefiance extends CardImpl {
private static final FilterSpell filter = new FilterSpell("Spirit or Arcane spell"); private static final FilterSpell filter = new FilterSpell("Spirit or Arcane spell");
static { static {
filter.add(Predicates.or(new SubtypePredicate("Spirit"), new SubtypePredicate("Arcane"))); filter.add(Predicates.or(new SubtypePredicate(SubType.SPIRIT), new SubtypePredicate(SubType.ARCANE)));
} }
public HisokasDefiance(UUID ownerId, CardSetInfo setInfo) { public HisokasDefiance(UUID ownerId, CardSetInfo setInfo) {

View file

@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
@ -55,7 +56,7 @@ public class HoldTheGates extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(); private static final FilterPermanent filter = new FilterControlledPermanent();
static { static {
filter.add(new SubtypePredicate("Gate")); filter.add(new SubtypePredicate(SubType.GATE));
} }
public HoldTheGates(UUID ownerId, CardSetInfo setInfo) { public HoldTheGates(UUID ownerId, CardSetInfo setInfo) {

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