[filters] Replaced Subtype condition with Predicate

This commit is contained in:
North 2012-07-11 23:59:41 +03:00
parent 91d320eed2
commit 2198cae333
345 changed files with 874 additions and 1032 deletions

View file

@ -43,8 +43,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
@ -56,8 +56,7 @@ public class LichLordOfUnx extends CardImpl<LichLordOfUnx> {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control");
static { static {
filter.getSubtype().add("Zombie"); filter.add(new SubtypePredicate("Zombie"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public LichLordOfUnx (UUID ownerId) { public LichLordOfUnx (UUID ownerId) {

View file

@ -36,12 +36,12 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.players.Player; import mage.players.Player;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -83,10 +83,8 @@ class AngelOfGlorysRiseEffect extends OneShotEffect<AngelOfGlorysRiseEffect> {
private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent(); private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent();
static { static {
filterZombie.getSubtype().add("Zombie"); filterZombie.add(new SubtypePredicate("Zombie"));
filterZombie.setScopeSubtype(Filter.ComparisonScope.Any); filterHuman.add(new SubtypePredicate("Human"));
filterHuman.getSubtype().add("Human");
filterHuman.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public AngelOfGlorysRiseEffect() { public AngelOfGlorysRiseEffect() {

View file

@ -40,6 +40,7 @@ import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterAura; import mage.filter.common.FilterAura;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
@ -89,7 +90,7 @@ class BrunaLightOfAlabasterEffect extends OneShotEffect<BrunaLightOfAlabasterEff
private static final FilterCard filterAuraCard = new FilterCard("Aura card"); private static final FilterCard filterAuraCard = new FilterCard("Aura card");
static { static {
filterAuraCard.getSubtype().add("Aura"); filterAuraCard.add(new SubtypePredicate("Aura"));
filterAuraCard.getCardType().add(CardType.ENCHANTMENT); filterAuraCard.getCardType().add(CardType.ENCHANTMENT);
} }

View file

@ -27,22 +27,26 @@
*/ */
package mage.sets.avacynrestored; package mage.sets.avacynrestored;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.Constants; import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardsImpl; import mage.cards.CardsImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicate;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
* *
* @author noxx * @author noxx
@ -96,8 +100,13 @@ class DescendantsPathEffect extends OneShotEffect<DescendantsPathEffect> {
player.revealCards("DescendantsPath", new CardsImpl(card), game); player.revealCards("DescendantsPath", new CardsImpl(card), game);
if (card.getCardType().contains(CardType.CREATURE)) { if (card.getCardType().contains(CardType.CREATURE)) {
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
filter.getSubtype().addAll(card.getSubtype());
filter.setScopeSubtype(Filter.ComparisonScope.Any); ArrayList<Predicate<MageObject>> subtypes = new ArrayList<Predicate<MageObject>>();
for (String subtype: card.getSubtype()) {
subtypes.add(new SubtypePredicate(subtype));
}
filter.add(Predicates.or(subtypes));
int count = game.getBattlefield().getAllActivePermanents(filter, player.getId(), game).size(); int count = game.getBattlefield().getAllActivePermanents(filter, player.getId(), game).size();
if (count > 0) { if (count > 0) {
game.informPlayers("DescendantsPath: Found a creature that shares a creature type with the revealed card."); game.informPlayers("DescendantsPath: Found a creature that shares a creature type with the revealed card.");

View file

@ -40,6 +40,7 @@ import mage.cards.CardImpl;
import mage.filter.Filter; import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
@ -63,8 +64,7 @@ public class DevoutChaplain extends CardImpl<DevoutChaplain> {
static { static {
humanFilter.setTapped(false); humanFilter.setTapped(false);
humanFilter.setUseTapped(true); humanFilter.setUseTapped(true);
humanFilter.getSubtype().add("Human"); humanFilter.add(new SubtypePredicate("Human"));
humanFilter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public DevoutChaplain(UUID ownerId) { public DevoutChaplain(UUID ownerId) {

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.SoulbondAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
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 java.util.UUID; import java.util.UUID;
@ -51,7 +52,7 @@ public class DiregrafEscort extends CardImpl<DiregrafEscort> {
private static final FilterPermanent filter = new FilterCreaturePermanent("Zombies"); private static final FilterPermanent filter = new FilterCreaturePermanent("Zombies");
static { static {
filter.getSubtype().add("Zombie"); filter.add(new SubtypePredicate("Zombie"));
} }
public DiregrafEscort(UUID ownerId) { public DiregrafEscort(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.SpiritWhiteToken; import mage.game.permanent.token.SpiritWhiteToken;
@ -59,8 +59,7 @@ public class GallowsAtWillowHill extends CardImpl<GallowsAtWillowHill> {
static { static {
humanFilter.setTapped(false); humanFilter.setTapped(false);
humanFilter.setUseTapped(true); humanFilter.setUseTapped(true);
humanFilter.getSubtype().add("Human"); humanFilter.add(new SubtypePredicate("Human"));
humanFilter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public GallowsAtWillowHill(UUID ownerId) { public GallowsAtWillowHill(UUID ownerId) {

View file

@ -32,6 +32,7 @@ import mage.Constants.Rarity;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID; import java.util.UUID;
@ -44,7 +45,7 @@ public class HumanFrailty extends CardImpl<HumanFrailty> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
} }
public HumanFrailty(UUID ownerId) { public HumanFrailty(UUID ownerId) {

View file

@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import java.util.UUID; import java.util.UUID;
@ -48,7 +49,7 @@ public class KessigMalcontents extends CardImpl<KessigMalcontents> {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Humans you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Humans you control");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
} }
public KessigMalcontents(UUID ownerId) { public KessigMalcontents(UUID ownerId) {

View file

@ -33,6 +33,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID; import java.util.UUID;
@ -45,7 +46,7 @@ public class MassAppeal extends CardImpl<MassAppeal> {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human you control");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
} }
public MassAppeal(UUID ownerId) { public MassAppeal(UUID ownerId) {

View file

@ -32,9 +32,9 @@ import mage.Constants.Rarity;
import mage.MageInt; import mage.MageInt;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID; import java.util.UUID;
@ -48,8 +48,7 @@ public class MidnightDuelist extends CardImpl<MidnightDuelist> {
private static final FilterPermanent filter = new FilterCreaturePermanent("Vampires"); private static final FilterPermanent filter = new FilterCreaturePermanent("Vampires");
static { static {
filter.getSubtype().add("Vampire"); filter.add(new SubtypePredicate("Vampire"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public MidnightDuelist(UUID ownerId) { public MidnightDuelist(UUID ownerId) {

View file

@ -38,6 +38,8 @@ import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID; import java.util.UUID;
@ -52,8 +54,7 @@ public class RestorationAngel extends CardImpl<RestorationAngel> {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Angel"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Angel");
static { static {
filter.getSubtype().add("Angel"); filter.add(Predicates.not(new SubtypePredicate("Angel")));
filter.setNotSubtype(true);
} }
public RestorationAngel(UUID ownerId) { public RestorationAngel(UUID ownerId) {

View file

@ -43,6 +43,7 @@ import mage.choices.Choice;
import mage.choices.ChoiceImpl; import mage.choices.ChoiceImpl;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
@ -124,7 +125,7 @@ class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl<Rid
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human creatures you control"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human creatures you control");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
} }
protected FilterPermanent protectionFilter; protected FilterPermanent protectionFilter;
@ -152,7 +153,7 @@ class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl<Rid
String subtype = (String) game.getState().getValue(permanent.getId() + "_type"); String subtype = (String) game.getState().getValue(permanent.getId() + "_type");
if (subtype != null) { if (subtype != null) {
protectionFilter = new FilterPermanent(subtype+"s"); protectionFilter = new FilterPermanent(subtype+"s");
protectionFilter.getSubtype().add(subtype); protectionFilter.add(new SubtypePredicate(subtype));
} }
} }
} }

View file

@ -36,6 +36,7 @@ import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -46,7 +47,7 @@ public class RiotRingleader extends CardImpl<RiotRingleader> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creatures");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
} }
public RiotRingleader(UUID ownerId) { public RiotRingleader(UUID ownerId) {

View file

@ -41,19 +41,18 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
* @author Loki * @author Loki
*/ */
public class ScrollOfAvacyn extends CardImpl<ScrollOfAvacyn> { public class ScrollOfAvacyn extends CardImpl<ScrollOfAvacyn> {
private static FilterPermanent filter = new FilterPermanent("an Angel"); private static final FilterPermanent filter = new FilterPermanent();
static { static {
filter.getSubtype().add("Angel"); filter.add(new SubtypePredicate("Angel"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public ScrollOfAvacyn(UUID ownerId) { public ScrollOfAvacyn(UUID ownerId) {

View file

@ -41,8 +41,8 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DiscardTargetEffect; import mage.abilities.effects.common.DiscardTargetEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
/** /**
@ -50,11 +50,10 @@ import mage.target.common.TargetOpponent;
* @author Loki * @author Loki
*/ */
public class ScrollOfGriselbrand extends CardImpl<ScrollOfGriselbrand> { public class ScrollOfGriselbrand extends CardImpl<ScrollOfGriselbrand> {
private static FilterPermanent filter = new FilterPermanent("a Demon"); private static final FilterPermanent filter = new FilterPermanent();
static { static {
filter.getSubtype().add("Demon"); filter.add(new SubtypePredicate("Demon"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public ScrollOfGriselbrand(UUID ownerId) { public ScrollOfGriselbrand(UUID ownerId) {

View file

@ -33,8 +33,8 @@ import mage.Constants.Rarity;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetCreatureOrPlayer;
/** /**
@ -46,8 +46,7 @@ public class IreOfKaminari extends CardImpl<IreOfKaminari> {
private final static FilterCard filter = new FilterCard("Arcane"); private final static FilterCard filter = new FilterCard("Arcane");
static { static {
filter.getSubtype().add("Arcane"); filter.add(new SubtypePredicate("Arcane"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public IreOfKaminari(UUID ownerId) { public IreOfKaminari(UUID ownerId) {

View file

@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.RegenerateTargetEffect; import mage.abilities.effects.common.RegenerateTargetEffect;
import mage.abilities.keyword.BushidoAbility; import mage.abilities.keyword.BushidoAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
/** /**
@ -53,8 +53,7 @@ public class IsaoEnlightenedBushi extends CardImpl<IsaoEnlightenedBushi> {
private final static FilterPermanent filter = new FilterPermanent("Samurai"); private final static FilterPermanent filter = new FilterPermanent("Samurai");
static { static {
filter.getSubtype().add("Samurai"); filter.add(new SubtypePredicate("Samurai"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public IsaoEnlightenedBushi(UUID ownerId) { public IsaoEnlightenedBushi(UUID ownerId) {
@ -66,6 +65,7 @@ public class IsaoEnlightenedBushi extends CardImpl<IsaoEnlightenedBushi> {
this.color.setGreen(true); this.color.setGreen(true);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Isao, Enlightened Bushi can't be countered. // Isao, Enlightened Bushi can't be countered.
this.addAbility(new CantCounterAbility()); this.addAbility(new CantCounterAbility());
this.addAbility(new BushidoAbility(2)); this.addAbility(new BushidoAbility(2));

View file

@ -38,8 +38,8 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
/** /**
@ -51,8 +51,7 @@ public class NezumiShadowWatcher extends CardImpl<NezumiShadowWatcher> {
private final static FilterPermanent filter = new FilterPermanent("Ninja"); private final static FilterPermanent filter = new FilterPermanent("Ninja");
static { static {
filter.getSubtype().add("Ninja"); filter.add(new SubtypePredicate("Ninja"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public NezumiShadowWatcher(UUID ownerId) { public NezumiShadowWatcher(UUID ownerId) {

View file

@ -33,8 +33,8 @@ import mage.Constants.Rarity;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -45,8 +45,7 @@ public class RibbonsOfTheReikai extends CardImpl<RibbonsOfTheReikai> {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Spirit you control"); private final static FilterControlledPermanent filter = new FilterControlledPermanent("Spirit you control");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public RibbonsOfTheReikai(UUID ownerId) { public RibbonsOfTheReikai(UUID ownerId) {
@ -54,6 +53,7 @@ public class RibbonsOfTheReikai extends CardImpl<RibbonsOfTheReikai> {
this.expansionSetCode = "BOK"; this.expansionSetCode = "BOK";
this.subtype.add("Arcane"); this.subtype.add("Arcane");
this.color.setBlue(true); this.color.setBlue(true);
// Draw a card for each Spirit you control. // Draw a card for each Spirit you control.
this.getSpellAbility().addEffect(new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter))); this.getSpellAbility().addEffect(new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter)));
} }

View file

@ -39,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.BushidoAbility; import mage.abilities.keyword.BushidoAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterAttackingOrBlockingCreature; import mage.filter.common.FilterAttackingOrBlockingCreature;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetAttackingOrBlockingCreature; import mage.target.common.TargetAttackingOrBlockingCreature;
/** /**
@ -52,8 +52,7 @@ public class TakenosCavalry extends CardImpl<TakenosCavalry> {
private final static FilterAttackingOrBlockingCreature filter = new FilterAttackingOrBlockingCreature("attacking or blocking Spirit"); private final static FilterAttackingOrBlockingCreature filter = new FilterAttackingOrBlockingCreature("attacking or blocking Spirit");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public TakenosCavalry(UUID ownerId) { public TakenosCavalry(UUID ownerId) {

View file

@ -40,8 +40,8 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.DefenderAbility;
import mage.abilities.keyword.ReachAbility; import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -52,8 +52,7 @@ public class TraprootKami extends CardImpl<TraprootKami> {
private final static FilterPermanent filter = new FilterPermanent("Forest"); private final static FilterPermanent filter = new FilterPermanent("Forest");
static { static {
filter.getSubtype().add("Forest"); filter.add(new SubtypePredicate("Forest"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public TraprootKami(UUID ownerId) { public TraprootKami(UUID ownerId) {

View file

@ -38,8 +38,8 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapTargetCost; import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
/** /**
@ -52,9 +52,7 @@ public class AzamiLadyOfScrolls extends CardImpl<AzamiLadyOfScrolls> {
static { static {
filter.setTapped(false); filter.setTapped(false);
filter.setUseTapped(true); filter.setUseTapped(true);
filter.getSubtype().add("Wizard"); filter.add(new SubtypePredicate("Wizard"));
filter.setScopeCardType(Filter.ComparisonScope.Any);
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public AzamiLadyOfScrolls(UUID ownerId) { public AzamiLadyOfScrolls(UUID ownerId) {

View file

@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetAttackingCreature; import mage.target.common.TargetAttackingCreature;
/** /**
@ -55,8 +55,7 @@ public class BenBenAkkiHermit extends CardImpl<BenBenAkkiHermit> {
static { static {
filter.setTapped(false); filter.setTapped(false);
filter.setUseTapped(true); filter.setUseTapped(true);
filter.getSubtype().add("Mountain"); filter.add(new SubtypePredicate("Mountain"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public BenBenAkkiHermit (UUID ownerId) { public BenBenAkkiHermit (UUID ownerId) {

View file

@ -45,8 +45,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.counters.common.DevotionCounter; import mage.counters.common.DevotionCounter;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
/** /**
@ -57,8 +57,7 @@ public class BloodthirstyOgre extends CardImpl<BloodthirstyOgre> {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
static { static {
filter.getSubtype().add("Demon"); filter.add(new SubtypePredicate("Demon"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public BloodthirstyOgre(UUID ownerId) { public BloodthirstyOgre(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
@ -52,8 +52,7 @@ public class CallToGlory extends CardImpl<CallToGlory> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai");
static { static {
filter.getSubtype().add("Samurai"); filter.add(new SubtypePredicate("Samurai"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public CallToGlory(UUID ownerId) { public CallToGlory(UUID ownerId) {

View file

@ -34,8 +34,8 @@ import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect; import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
/** /**
@ -46,8 +46,7 @@ public class EerieProcession extends CardImpl<EerieProcession> {
private final static FilterCard filter = new FilterCard("Arcane card"); private final static FilterCard filter = new FilterCard("Arcane card");
static { static {
filter.getSubtype().add("Arcane"); filter.add(new SubtypePredicate("Arcane"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public EerieProcession(UUID ownerId) { public EerieProcession(UUID ownerId) {

View file

@ -40,8 +40,8 @@ import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
/** /**
@ -52,8 +52,7 @@ public class HanaKami extends CardImpl<HanaKami> {
private final static FilterCard filter = new FilterCard("Arcane card from your graveyard"); private final static FilterCard filter = new FilterCard("Arcane card from your graveyard");
static { static {
filter.getSubtype().add("Arcane"); filter.add(new SubtypePredicate("Arcane"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public HanaKami(UUID ownerId) { public HanaKami(UUID ownerId) {

View file

@ -45,8 +45,8 @@ import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetOpponentE
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.SoulshiftAbility; import mage.abilities.keyword.SoulshiftAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
@ -60,8 +60,7 @@ public class HeWhoHungers extends CardImpl<HeWhoHungers> {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a Spirit"); private final static FilterControlledPermanent filter = new FilterControlledPermanent("a Spirit");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public HeWhoHungers(UUID ownerId) { public HeWhoHungers(UUID ownerId) {

View file

@ -34,8 +34,9 @@ import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetSpell; import mage.target.TargetSpell;
/** /**
@ -46,9 +47,7 @@ public class HisokasDefiance extends CardImpl<HisokasDefiance> {
private final static FilterSpell filter = new FilterSpell("Spirit or Arcane spell"); private final static FilterSpell filter = new FilterSpell("Spirit or Arcane spell");
static { static {
filter.getSubtype().add("Spirit"); filter.add(Predicates.or(new SubtypePredicate("Spirit"), new SubtypePredicate("Arcane")));
filter.getSubtype().add("Arcane");
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public HisokasDefiance(UUID ownerId) { public HisokasDefiance(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* @author Loki * @author Loki
@ -48,8 +48,7 @@ public class HondenOfCleansingFire extends CardImpl<HondenOfCleansingFire> {
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine"); final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
static { static {
filter.getSubtype().add("Shrine"); filter.add(new SubtypePredicate("Shrine"));
filter.setScopeCardType(Filter.ComparisonScope.Any);
} }
public HondenOfCleansingFire(UUID ownerId) { public HondenOfCleansingFire(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetCreatureOrPlayer;
/** /**
@ -50,8 +50,7 @@ public class HondenOfInfiniteRage extends CardImpl<HondenOfInfiniteRage> {
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine"); final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
static { static {
filter.getSubtype().add("Shrine"); filter.add(new SubtypePredicate("Shrine"));
filter.setScopeCardType(Filter.ComparisonScope.Any);
} }
public HondenOfInfiniteRage (UUID ownerId) { public HondenOfInfiniteRage (UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.SpiritToken; import mage.game.permanent.token.SpiritToken;
/** /**
@ -49,8 +49,7 @@ public class HondenOfLifesWeb extends CardImpl<HondenOfLifesWeb> {
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine"); final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
static { static {
filter.getSubtype().add("Shrine"); filter.add(new SubtypePredicate("Shrine"));
filter.setScopeCardType(Filter.ComparisonScope.Any);
} }
public HondenOfLifesWeb(UUID ownerId) { public HondenOfLifesWeb(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DiscardTargetEffect; import mage.abilities.effects.common.DiscardTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
/** /**
@ -49,8 +49,7 @@ public class HondenOfNightsReach extends CardImpl<HondenOfNightsReach> {
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine"); final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
static { static {
filter.getSubtype().add("Shrine"); filter.add(new SubtypePredicate("Shrine"));
filter.setScopeCardType(Filter.ComparisonScope.Any);
} }
public HondenOfNightsReach(UUID ownerId) { public HondenOfNightsReach(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* @author Loki * @author Loki
@ -48,8 +48,7 @@ public class HondenOfSeeingWinds extends CardImpl<HondenOfSeeingWinds> {
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine"); final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
static { static {
filter.getSubtype().add("Shrine"); filter.add(new SubtypePredicate("Shrine"));
filter.setScopeCardType(Filter.ComparisonScope.Any);
} }
public HondenOfSeeingWinds(UUID ownerId) { public HondenOfSeeingWinds(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
@ -53,8 +53,7 @@ public class HorobiDeathsWail extends CardImpl<HorobiDeathsWail> {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
static { static {
filter.getSubtype().add("Demon"); filter.add(new SubtypePredicate("Demon"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public HorobiDeathsWail(UUID ownerId) { public HorobiDeathsWail(UUID ownerId) {

View file

@ -38,8 +38,8 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.SearchEffect; import mage.abilities.effects.SearchEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
@ -76,8 +76,7 @@ class InameDeathAspectEffect extends SearchEffect<InameDeathAspectEffect> {
private final static FilterCreatureCard filter = new FilterCreatureCard(); private final static FilterCreatureCard filter = new FilterCreatureCard();
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public InameDeathAspectEffect() { public InameDeathAspectEffect() {

View file

@ -36,8 +36,8 @@ import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.effects.common.ExileSourceEffect; import mage.abilities.effects.common.ExileSourceEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
/** /**
@ -49,8 +49,7 @@ public class InameLifeAspect extends CardImpl<InameLifeAspect> {
private final static FilterCard filter = new FilterCard("Spirit cards from your graveyard"); private final static FilterCard filter = new FilterCard("Spirit cards from your graveyard");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public InameLifeAspect(UUID ownerId) { public InameLifeAspect(UUID ownerId) {

View file

@ -39,8 +39,8 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
/** /**
@ -52,8 +52,7 @@ public class KitsuneDiviner extends CardImpl<KitsuneDiviner> {
private final static FilterPermanent filter = new FilterPermanent("Spirit"); private final static FilterPermanent filter = new FilterPermanent("Spirit");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public KitsuneDiviner (UUID ownerId) { public KitsuneDiviner (UUID ownerId) {

View file

@ -33,8 +33,9 @@ import mage.Constants.Rarity;
import mage.MageInt; import mage.MageInt;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -45,9 +46,7 @@ public class KitsuneRiftwalker extends CardImpl<KitsuneRiftwalker> {
private final static FilterCard filter = new FilterCard("Spirits and from Arcane"); private final static FilterCard filter = new FilterCard("Spirits and from Arcane");
static { static {
filter.getSubtype().add("Arcane"); filter.add(Predicates.or(new SubtypePredicate("Arcane"), new SubtypePredicate("Spirit")));
filter.getSubtype().add("Spirit");
filter.setScopeSubtype(ComparisonScope.Any);
} }
public KitsuneRiftwalker(UUID ownerId) { public KitsuneRiftwalker(UUID ownerId) {

View file

@ -41,8 +41,8 @@ import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.BushidoAbility; import mage.abilities.keyword.BushidoAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate;
/** /**
@ -57,8 +57,7 @@ public class KondasHatamoto extends CardImpl<KondasHatamoto>{
static { static {
filter.add(new SupertypePredicate("Legendary")); filter.add(new SupertypePredicate("Legendary"));
filter.getSubtype().add("Samurai"); filter.add(new SubtypePredicate("Samurai"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public KondasHatamoto (UUID ownerId) { public KondasHatamoto (UUID ownerId) {

View file

@ -44,6 +44,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.util.CardUtil; import mage.util.CardUtil;
@ -56,7 +57,7 @@ public class LongForgottenGohei extends CardImpl<LongForgottenGohei> {
private final static FilterCreaturePermanent spiritFilter = new FilterCreaturePermanent("Spirits"); private final static FilterCreaturePermanent spiritFilter = new FilterCreaturePermanent("Spirits");
static { static {
spiritFilter.getSubtype().add("Spirit"); spiritFilter.add(new SubtypePredicate("Spirit"));
} }
public LongForgottenGohei(UUID ownerId) { public LongForgottenGohei(UUID ownerId) {

View file

@ -47,6 +47,7 @@ import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
@ -60,10 +61,11 @@ public class MarrowGnawer extends CardImpl<MarrowGnawer> {
private static final FilterControlledCreaturePermanent filterSacrifice = new FilterControlledCreaturePermanent("a Rat"); private static final FilterControlledCreaturePermanent filterSacrifice = new FilterControlledCreaturePermanent("a Rat");
private static final FilterControlledCreaturePermanent filter3 = new FilterControlledCreaturePermanent("Rats you control"); private static final FilterControlledCreaturePermanent filter3 = new FilterControlledCreaturePermanent("Rats you control");
static { {
filterFear.getSubtype().add("Rat"); SubtypePredicate ratPredicate = new SubtypePredicate("Rat");
filterSacrifice.getSubtype().add("Rat"); filterFear.add(ratPredicate);
filter3.getSubtype().add("Rat"); filterSacrifice.add(ratPredicate);
filter3.add(ratPredicate);
} }
public MarrowGnawer (UUID ownerId) { public MarrowGnawer (UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.keyword.BushidoAbility; import mage.abilities.keyword.BushidoAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -49,8 +49,7 @@ public class NagaoBoundByHonor extends CardImpl<NagaoBoundByHonor> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai creatures"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai creatures");
static { static {
filter.getSubtype().add("Samurai"); filter.add(new SubtypePredicate("Samurai"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public NagaoBoundByHonor(UUID ownerId) { public NagaoBoundByHonor(UUID ownerId) {

View file

@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
@ -59,8 +59,7 @@ public class NineRingedBo extends CardImpl<NineRingedBo> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("spirit"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("spirit");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(ComparisonScope.Any);
} }
public NineRingedBo(UUID ownerId) { public NineRingedBo(UUID ownerId) {

View file

@ -40,6 +40,7 @@ import mage.abilities.effects.common.SacrificeTargetEffect;
import mage.abilities.keyword.FearAbility; import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
@ -56,7 +57,7 @@ public class PainwrackerOni extends CardImpl<PainwrackerOni> {
this.expansionSetCode = "CHK"; this.expansionSetCode = "CHK";
this.subtype.add("Demon"); this.subtype.add("Demon");
this.subtype.add("Spirit"); this.subtype.add("Spirit");
this.color.setBlack(true); this.color.setBlack(true);
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
@ -84,7 +85,7 @@ class PainwrackerOniTriggeredAbility1 extends TriggeredAbilityImpl<PainwrackerOn
private final static FilterPermanent filter = new FilterPermanent(); private final static FilterPermanent filter = new FilterPermanent();
static { static {
filter.getSubtype().add("Ogre"); filter.add(new SubtypePredicate("Ogre"));
} }
public PainwrackerOniTriggeredAbility1(Effect effect) { public PainwrackerOniTriggeredAbility1(Effect effect) {

View file

@ -34,8 +34,9 @@ import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -47,9 +48,7 @@ public class RendFlesh extends CardImpl<RendFlesh> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Non-Spirit"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Non-Spirit");
static { static {
filter.getSubtype().add("Spirit"); filter.add(Predicates.not(new SubtypePredicate("Spirit")));
filter.setNotSubtype(true);
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public RendFlesh(UUID ownerId) { public RendFlesh(UUID ownerId) {

View file

@ -34,8 +34,8 @@ import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
/** /**
@ -46,8 +46,7 @@ public class RendSpirit extends CardImpl<RendSpirit> {
private static final FilterPermanent filter = new FilterPermanent("Spirit"); private static final FilterPermanent filter = new FilterPermanent("Spirit");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public RendSpirit(UUID ownerId) { public RendSpirit(UUID ownerId) {

View file

@ -43,6 +43,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* @author Loki * @author Loki
@ -54,8 +55,8 @@ public class SachiDaughterOfSeshiro extends CardImpl<SachiDaughterOfSeshiro> {
private final static FilterCreaturePermanent shamanFilter = new FilterCreaturePermanent("Shamans"); private final static FilterCreaturePermanent shamanFilter = new FilterCreaturePermanent("Shamans");
static { static {
snakeFilter.getSubtype().add("Snake"); snakeFilter.add(new SubtypePredicate("Snake"));
shamanFilter.getSubtype().add("Shaman"); shamanFilter.add(new SubtypePredicate("Shaman"));
} }
public SachiDaughterOfSeshiro(UUID ownerId) { public SachiDaughterOfSeshiro(UUID ownerId) {

View file

@ -40,6 +40,7 @@ import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.DamagedPlayerEvent; import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
@ -53,7 +54,7 @@ public class SeshiroTheAnointed extends CardImpl<SeshiroTheAnointed> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Snakes"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Snakes");
static { static {
filter.getSubtype().add("Snake"); filter.add(new SubtypePredicate("Snake"));
} }
public SeshiroTheAnointed(UUID ownerId) { public SeshiroTheAnointed(UUID ownerId) {

View file

@ -31,7 +31,6 @@ import java.util.UUID;
import mage.Constants; import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.TargetController;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
@ -39,6 +38,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect;
import mage.abilities.effects.common.SkipNextPlayerUntapStepEffect; import mage.abilities.effects.common.SkipNextPlayerUntapStepEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -50,8 +50,7 @@ public class ShisatoWhisperingHunter extends CardImpl<ShisatoWhisperingHunter> {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Snake"); private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Snake");
static { static {
filter.getSubtype().add("Snake"); filter.add(new SubtypePredicate("Snake"));
filter.setTargetController(TargetController.YOU);
} }
public ShisatoWhisperingHunter(UUID ownerId) { public ShisatoWhisperingHunter(UUID ownerId) {

View file

@ -41,8 +41,8 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.DamagedCreatureEvent; import mage.game.events.DamagedCreatureEvent;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
@ -58,8 +58,7 @@ public class SosukeSonOfSeshiro extends CardImpl<SosukeSonOfSeshiro> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Snake creatures"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Snake creatures");
static { static {
filter.getSubtype().add("Snake"); filter.add(new SubtypePredicate("Snake"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public SosukeSonOfSeshiro(UUID ownerId) { public SosukeSonOfSeshiro(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.keyword.BushidoAbility; import mage.abilities.keyword.BushidoAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -74,11 +74,10 @@ public class TakenoSamuraiGeneral extends CardImpl<TakenoSamuraiGeneral> {
} }
class TakenoSamuraiGeneralEffect extends ContinuousEffectImpl<TakenoSamuraiGeneralEffect> { class TakenoSamuraiGeneralEffect extends ContinuousEffectImpl<TakenoSamuraiGeneralEffect> {
private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
static { static {
filter.getSubtype().add("Samurai"); filter.add(new SubtypePredicate("Samurai"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public TakenoSamuraiGeneralEffect() { public TakenoSamuraiGeneralEffect() {

View file

@ -37,8 +37,8 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
/** /**
@ -50,8 +50,7 @@ public class TheUnspeakable extends CardImpl<TheUnspeakable> {
private final static FilterCard filter = new FilterCard("Arcane card from your graveyard"); private final static FilterCard filter = new FilterCard("Arcane card from your graveyard");
static { static {
filter.getSubtype().add("Arcane"); filter.add(new SubtypePredicate("Arcane"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public TheUnspeakable(UUID ownerId) { public TheUnspeakable(UUID ownerId) {

View file

@ -39,8 +39,8 @@ import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.RegenerateSourceEffect; import mage.abilities.effects.common.RegenerateSourceEffect;
//import mage.abilities.effects.common.continious.GainAbilitySourceEffect; //import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -51,8 +51,7 @@ public class VillainousOgre extends CardImpl<VillainousOgre> {
private static final String rule = "As long as you control a Demon, {this} has {B}: Regenerate Villainous Ogre"; private static final String rule = "As long as you control a Demon, {this} has {B}: Regenerate Villainous Ogre";
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
static { static {
filter.getSubtype().add("Demon"); filter.add(new SubtypePredicate("Demon"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public VillainousOgre(UUID ownerId) { public VillainousOgre(UUID ownerId) {

View file

@ -47,7 +47,8 @@ import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope; import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterLandCard; import mage.filter.common.FilterLandCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
@ -62,9 +63,7 @@ public class KnightOfTheReliquary extends CardImpl<KnightOfTheReliquary> {
static { static {
filter.getCardType().add(CardType.LAND); filter.getCardType().add(CardType.LAND);
filter.setScopeCardType(ComparisonScope.Any); filter.setScopeCardType(ComparisonScope.Any);
filter.getSubtype().add("Forest"); filter.add(Predicates.or(new SubtypePredicate("Forest"), new SubtypePredicate("Plains")));
filter.getSubtype().add("Plains");
filter.setScopeSubtype(ComparisonScope.Any);
} }
public KnightOfTheReliquary(UUID ownerId) { public KnightOfTheReliquary(UUID ownerId) {

View file

@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -54,7 +55,7 @@ public class ArchdemonOfGreed extends CardImpl<ArchdemonOfGreed> {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
filter.setTargetController(Constants.TargetController.YOU); filter.setTargetController(Constants.TargetController.YOU);
} }

View file

@ -27,11 +27,13 @@
*/ */
package mage.sets.darkascension; package mage.sets.darkascension;
import java.util.ArrayList;
import java.util.UUID; import java.util.UUID;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Outcome; import mage.Constants.Outcome;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.Constants.Zone; import mage.Constants.Zone;
import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -44,6 +46,9 @@ import mage.cards.CardsImpl;
import mage.filter.Filter.ComparisonScope; import mage.filter.Filter.ComparisonScope;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.Predicate;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -129,11 +134,12 @@ class CallToTheKindredEffect extends OneShotEffect<CallToTheKindredEffect> {
FilterCreatureCard filter = new FilterCreatureCard(); FilterCreatureCard filter = new FilterCreatureCard();
StringBuilder sb = new StringBuilder("creature card with at least one subtype from: "); StringBuilder sb = new StringBuilder("creature card with at least one subtype from: ");
for (String subType : creature.getSubtype()) { ArrayList<Predicate<MageObject>> subtypes = new ArrayList<Predicate<MageObject>>();
filter.getSubtype().add(subType); for (String subtype : creature.getSubtype()) {
sb.append(subType).append(", "); subtypes.add(new SubtypePredicate(subtype));
sb.append(subtype).append(", ");
} }
filter.setScopeSubtype(ComparisonScope.Any); filter.add(Predicates.or(subtypes));
sb.delete(sb.length() - 2, sb.length()); sb.delete(sb.length() - 2, sb.length());
filter.setMessage(sb.toString()); filter.setMessage(sb.toString());

View file

@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
/** /**
@ -54,8 +54,7 @@ public class ChosenOfMarkov extends CardImpl<ChosenOfMarkov> {
static { static {
filter.setUseTapped(true); filter.setUseTapped(true);
filter.setTapped(false); filter.setTapped(false);
filter.getSubtype().add("Vampire"); filter.add(new SubtypePredicate("Vampire"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public ChosenOfMarkov(UUID ownerId) { public ChosenOfMarkov(UUID ownerId) {

View file

@ -41,6 +41,7 @@ import mage.cards.CardImpl;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -97,7 +98,7 @@ class CurseOfMisfortunesEffect extends OneShotEffect<CurseOfMisfortunesEffect> {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
FilterCard filter = new FilterCard("Curse card that doesn't have the same name as a Curse attached to enchanted player"); FilterCard filter = new FilterCard("Curse card that doesn't have the same name as a Curse attached to enchanted player");
filter.getSubtype().add("Curse"); filter.add(new SubtypePredicate("Curse"));
Permanent enchantment = game.getPermanent(source.getSourceId()); Permanent enchantment = game.getPermanent(source.getSourceId());
if (enchantment != null && enchantment.getAttachedTo() != null) { if (enchantment != null && enchantment.getAttachedTo() != null) {
Player targetPlayer = game.getPlayer(enchantment.getAttachedTo()); Player targetPlayer = game.getPlayer(enchantment.getAttachedTo());

View file

@ -40,8 +40,8 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -53,8 +53,7 @@ public class DerangedOutcast extends CardImpl<DerangedOutcast> {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a Human"); private final static FilterControlledPermanent filter = new FilterControlledPermanent("a Human");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public DerangedOutcast(UUID ownerId) { public DerangedOutcast(UUID ownerId) {

View file

@ -37,8 +37,8 @@ import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent; import mage.game.events.ZoneChangeEvent;
@ -56,8 +56,7 @@ public class DiregrafCaptain extends CardImpl<DiregrafCaptain> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie");
static { static {
filter.getSubtype().add("Zombie"); filter.add(new SubtypePredicate("Zombie"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public DiregrafCaptain(UUID ownerId) { public DiregrafCaptain(UUID ownerId) {
@ -93,8 +92,7 @@ class DiregrafCaptainTriggeredAbility extends TriggeredAbilityImpl<DiregrafCapta
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie");
static { static {
filter.getSubtype().add("Zombie"); filter.add(new SubtypePredicate("Zombie"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public DiregrafCaptainTriggeredAbility() { public DiregrafCaptainTriggeredAbility() {

View file

@ -39,8 +39,8 @@ import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HexproofAbility; import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -50,8 +50,7 @@ public class DrogskolCaptain extends CardImpl<DrogskolCaptain> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public DrogskolCaptain(UUID ownerId) { public DrogskolCaptain(UUID ownerId) {

View file

@ -43,9 +43,9 @@ import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.ExileZone; import mage.game.ExileZone;
import mage.game.Game; import mage.game.Game;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
@ -61,8 +61,7 @@ public class FiendOfTheShadows extends CardImpl<FiendOfTheShadows> {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a human"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a human");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public FiendOfTheShadows(UUID ownerId) { public FiendOfTheShadows(UUID ownerId) {

View file

@ -38,8 +38,8 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import java.util.UUID; import java.util.UUID;
@ -82,8 +82,7 @@ class GravecrawlerPlayEffect extends AsThoughEffectImpl<GravecrawlerPlayEffect>
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("zombie"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("zombie");
static { static {
filter.getSubtype().add("Zombie"); filter.add(new SubtypePredicate("Zombie"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public GravecrawlerPlayEffect() { public GravecrawlerPlayEffect() {

View file

@ -40,9 +40,9 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.ZombieToken; import mage.game.permanent.token.ZombieToken;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
@ -56,8 +56,7 @@ public class HavengulRunebinder extends CardImpl<HavengulRunebinder> {
private static final FilterControlledCreaturePermanent filterPermanent = new FilterControlledCreaturePermanent("Zombie creature you control"); private static final FilterControlledCreaturePermanent filterPermanent = new FilterControlledCreaturePermanent("Zombie creature you control");
static { static {
filterPermanent.getSubtype().add("Zombie"); filterPermanent.add(new SubtypePredicate("Zombie"));
filterPermanent.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public HavengulRunebinder(UUID ownerId) { public HavengulRunebinder(UUID ownerId) {

View file

@ -37,8 +37,9 @@ import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.keyword.IntimidateAbility; import mage.abilities.keyword.IntimidateAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -54,9 +55,7 @@ public class Immerwolf extends CardImpl<Immerwolf> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Wolf and Werewolf creatures"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Wolf and Werewolf creatures");
static { static {
filter.getSubtype().add("Wolf"); filter.add(Predicates.or(new SubtypePredicate("Wolf"), new SubtypePredicate("Werewolf")));
filter.getSubtype().add("Werewolf");
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public Immerwolf(UUID ownerId) { public Immerwolf(UUID ownerId) {
@ -95,11 +94,8 @@ class ImmerwolfEffect extends ReplacementEffectImpl<ImmerwolfEffect> {
private final static FilterCreaturePermanent filterNonhuman = new FilterCreaturePermanent("Non-human creature"); private final static FilterCreaturePermanent filterNonhuman = new FilterCreaturePermanent("Non-human creature");
static { static {
filterWerewolf.getSubtype().add("Werewolf"); filterWerewolf.add(new SubtypePredicate("Werewolf"));
filterWerewolf.setScopeSubtype(Filter.ComparisonScope.Any); filterNonhuman.add(Predicates.not(new SubtypePredicate("Human")));
filterNonhuman.getSubtype().add("Human");
filterNonhuman.setScopeSubtype(Filter.ComparisonScope.Any);
filterNonhuman.setNotFilter(true);
} }
public ImmerwolfEffect() { public ImmerwolfEffect() {

View file

@ -42,6 +42,8 @@ import mage.abilities.keyword.IntimidateAbility;
import mage.abilities.keyword.UndyingAbility; import mage.abilities.keyword.UndyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -56,8 +58,7 @@ public class MikaeusTheUnhallowed extends CardImpl<MikaeusTheUnhallowed> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human creatures");
static { static {
filter.getSubtype().add("Human"); filter.add(Predicates.not(new SubtypePredicate("Human")));
filter.setNotSubtype(true);
} }
public MikaeusTheUnhallowed(UUID ownerId) { public MikaeusTheUnhallowed(UUID ownerId) {

View file

@ -35,22 +35,21 @@ import mage.MageInt;
import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.cards.CardImpl;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.filter.Filter; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
/** /**
* *
* @author anonymous * @author intimidatingant
*/ */
public class RavenousDemon extends CardImpl<RavenousDemon> { public class RavenousDemon extends CardImpl<RavenousDemon> {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Human"); private final static FilterControlledPermanent filter = new FilterControlledPermanent("Human");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public RavenousDemon(UUID ownerId) { public RavenousDemon(UUID ownerId) {

View file

@ -35,19 +35,20 @@ import mage.abilities.common.DiesAnotherCreatureYouControlTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.permanent.token.SpiritWhiteToken;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.SpiritWhiteToken;
/** /**
* *
* @author intimidatingant * @author intimidatingant
*/ */
public class RequiemAngel extends CardImpl<RequiemAngel> { public class RequiemAngel extends CardImpl<RequiemAngel> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Spirit creature");
static { static {
filter.getSubtype().add("Spirit"); filter.add(Predicates.not(new SubtypePredicate("Spirit")));
filter.setNotSubtype(true);
} }
public RequiemAngel(UUID ownerId) { public RequiemAngel(UUID ownerId) {

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetLandPermanent; import mage.target.common.TargetLandPermanent;
/** /**
@ -45,7 +46,7 @@ public class ScorchTheFields extends CardImpl<ScorchTheFields> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
} }
public ScorchTheFields(UUID ownerId) { public ScorchTheFields(UUID ownerId) {

View file

@ -40,6 +40,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -52,7 +53,7 @@ public class SkirsdagFlayer extends CardImpl<SkirsdagFlayer> {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
} }
public SkirsdagFlayer(UUID ownerId) { public SkirsdagFlayer(UUID ownerId) {

View file

@ -38,8 +38,8 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -49,8 +49,7 @@ public class StromkirkCaptain extends CardImpl<StromkirkCaptain> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Vampire creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Vampire creatures");
static { static {
filter.getSubtype().add("Vampire"); filter.add(new SubtypePredicate("Vampire"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public StromkirkCaptain(UUID ownerId) { public StromkirkCaptain(UUID ownerId) {

View file

@ -42,6 +42,7 @@ import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -55,7 +56,7 @@ public class WolfhuntersQuiver extends CardImpl<WolfhuntersQuiver> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf creature");
static { static {
filter.getSubtype().add("Werewolf"); filter.add(new SubtypePredicate("Werewolf"));
} }
public WolfhuntersQuiver(UUID ownerId) { public WolfhuntersQuiver(UUID ownerId) {

View file

@ -35,9 +35,9 @@ import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
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.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
@ -74,10 +74,8 @@ class ZombieApocalypseEffect extends OneShotEffect<ZombieApocalypseEffect> {
private static final FilterCreaturePermanent filterHuman = new FilterCreaturePermanent(); private static final FilterCreaturePermanent filterHuman = new FilterCreaturePermanent();
static { static {
filterZombie.getSubtype().add("Zombie"); filterZombie.add(new SubtypePredicate("Zombie"));
filterZombie.setScopeSubtype(Filter.ComparisonScope.Any); filterHuman.add(new SubtypePredicate("Human"));
filterHuman.getSubtype().add("Human");
filterHuman.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public ZombieApocalypseEffect() { public ZombieApocalypseEffect() {

View file

@ -44,8 +44,8 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -57,8 +57,7 @@ public class BlinkmothNexus extends CardImpl<BlinkmothNexus> {
private final static FilterPermanent filter = new FilterPermanent("Blinkmoth"); private final static FilterPermanent filter = new FilterPermanent("Blinkmoth");
static { static {
filter.getSubtype().add("Blinkmoth"); filter.add(new SubtypePredicate("Blinkmoth"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public BlinkmothNexus(UUID ownerId) { public BlinkmothNexus(UUID ownerId) {

View file

@ -40,8 +40,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continious.BoostAllEffect; import mage.abilities.effects.common.continious.BoostAllEffect;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.MyrToken; import mage.game.permanent.token.MyrToken;
/** /**
@ -53,8 +53,7 @@ public class MyrMatrix extends CardImpl<MyrMatrix> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Myr"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Myr");
static { static {
filter.getSubtype().add("Myr"); filter.add(new SubtypePredicate("Myr"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public MyrMatrix (UUID ownerId) { public MyrMatrix (UUID ownerId) {

View file

@ -42,6 +42,7 @@ import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect; import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
/** /**
@ -53,7 +54,7 @@ public class SteelshaperApprentice extends CardImpl<SteelshaperApprentice> {
static { static {
filter.getCardType().add(CardType.ARTIFACT); filter.getCardType().add(CardType.ARTIFACT);
filter.getSubtype().add("Equipment"); filter.add(new SubtypePredicate("Equipment"));
} }
public SteelshaperApprentice(UUID ownerId) { public SteelshaperApprentice(UUID ownerId) {

View file

@ -41,8 +41,8 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
@ -55,10 +55,8 @@ public class WandOfTheElements extends CardImpl<WandOfTheElements> {
private static final FilterControlledPermanent mountainFilter = new FilterControlledPermanent("a Mountain"); private static final FilterControlledPermanent mountainFilter = new FilterControlledPermanent("a Mountain");
static { static {
islandFilter.getSubtype().add("Island"); islandFilter.add(new SubtypePredicate("Island"));
islandFilter.setScopeSubtype(Filter.ComparisonScope.Any); mountainFilter.add(new SubtypePredicate("Mountain"));
mountainFilter.getSubtype().add("Mountain");
mountainFilter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public WandOfTheElements(UUID ownerId) { public WandOfTheElements(UUID ownerId) {

View file

@ -39,8 +39,8 @@ import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
/** /**
@ -52,8 +52,7 @@ public class HaazdaExonerator extends CardImpl<HaazdaExonerator> {
private final static FilterPermanent filter = new FilterPermanent("Aura"); private final static FilterPermanent filter = new FilterPermanent("Aura");
static { static {
filter.getSubtype().add("Aura"); filter.add(new SubtypePredicate("Aura"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public HaazdaExonerator(UUID ownerId) { public HaazdaExonerator(UUID ownerId) {

View file

@ -39,6 +39,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
/** /**
@ -50,7 +51,7 @@ public class DaruEncampment extends CardImpl<DaruEncampment> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature");
static { static {
filter.getSubtype().add("Soldier"); filter.add(new SubtypePredicate("Soldier"));
} }
public DaruEncampment(UUID ownerId) { public DaruEncampment(UUID ownerId) {

View file

@ -41,6 +41,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -53,7 +54,7 @@ public class MishrasFactory extends CardImpl<MishrasFactory> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Assembly-Worker creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Assembly-Worker creature");
static { static {
filter.getSubtype().add("Assembly-Worker"); filter.add(new SubtypePredicate("Assembly-Worker"));
} }
public MishrasFactory(UUID ownerId) { public MishrasFactory(UUID ownerId) {

View file

@ -44,8 +44,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
@ -58,8 +58,7 @@ public class Pentavus extends CardImpl<Pentavus> {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Pentavite"); private final static FilterControlledPermanent filter = new FilterControlledPermanent("Pentavite");
static { static {
filter.getSubtype().add("Pentavite"); filter.add(new SubtypePredicate("Pentavite"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public Pentavus(UUID ownerId) { public Pentavus(UUID ownerId) {

View file

@ -34,8 +34,8 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ShuffleSpellEffect; import mage.abilities.effects.common.ShuffleSpellEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.InsectToken; import mage.game.permanent.token.InsectToken;
/** /**
@ -47,8 +47,7 @@ public class BeaconOfCreation extends CardImpl<BeaconOfCreation> {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest you control");
static { static {
filter.getSubtype().add("Forest"); filter.add(new SubtypePredicate("Forest"));
filter.setScopeSubtype(ComparisonScope.Any);
} }
public BeaconOfCreation(UUID ownerId) { public BeaconOfCreation(UUID ownerId) {

View file

@ -42,8 +42,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.RegenerateSourceEffect; import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
@ -56,8 +56,7 @@ public class SkeletalVampire extends CardImpl<SkeletalVampire> {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Bat"); private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Bat");
static { static {
filter.getSubtype().add("Bat"); filter.add(new SubtypePredicate("Bat"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public SkeletalVampire(UUID ownerId) { public SkeletalVampire(UUID ownerId) {

View file

@ -7,8 +7,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
@ -18,8 +18,7 @@ public class AngelOfFlightAlabaster extends CardImpl<AngelOfFlightAlabaster> {
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.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public AngelOfFlightAlabaster(UUID ownerId) { public AngelOfFlightAlabaster(UUID ownerId) {

View file

@ -38,8 +38,8 @@ import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect; import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.*; import mage.abilities.keyword.*;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/** /**
* *
@ -52,8 +52,7 @@ public class AngelicOverseer extends CardImpl<AngelicOverseer> {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human");
static { static {
filter.getSubtype().add("Human"); filter.add(new SubtypePredicate("Human"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public AngelicOverseer(UUID ownerId) { public AngelicOverseer(UUID ownerId) {

View file

@ -39,6 +39,8 @@ import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID; import java.util.UUID;
@ -50,8 +52,7 @@ public class AvacynianPriest extends CardImpl<AvacynianPriest> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human creature");
static { static {
filter.getSubtype().add("Human"); filter.add(Predicates.not(new SubtypePredicate("Human")));
filter.setNotSubtype(true);
} }
public AvacynianPriest(UUID ownerId) { public AvacynianPriest(UUID ownerId) {

View file

@ -35,8 +35,8 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID; import java.util.UUID;
@ -48,8 +48,7 @@ public class BattlegroundGeist extends CardImpl<BattlegroundGeist> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit creatures"); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit creatures");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public BattlegroundGeist(UUID ownerId) { public BattlegroundGeist(UUID ownerId) {

View file

@ -41,6 +41,7 @@ import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
@ -86,7 +87,7 @@ class BitterheartWitchEffect extends OneShotEffect<BitterheartWitchEffect> {
private final static FilterCard filter = new FilterCard("Curse card in your library"); private final static FilterCard filter = new FilterCard("Curse card in your library");
static { static {
filter.getSubtype().add("Curse"); filter.add(new SubtypePredicate("Curse"));
} }
public BitterheartWitchEffect() { public BitterheartWitchEffect() {

View file

@ -43,8 +43,8 @@ import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
@ -102,8 +102,7 @@ class ControlFiveVampiresCost extends CostImpl<ControlFiveVampiresCost> {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
static { static {
filter.getSubtype().add("Vampire"); filter.add(new SubtypePredicate("Vampire"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public ControlFiveVampiresCost() { public ControlFiveVampiresCost() {

View file

@ -60,7 +60,6 @@ public class CharmbreakerDevils extends CardImpl<CharmbreakerDevils> {
static { static {
filter.getCardType().add(CardType.INSTANT); filter.getCardType().add(CardType.INSTANT);
filter.getCardType().add(CardType.SORCERY); filter.getCardType().add(CardType.SORCERY);
filter.setScopeSubtype(ComparisonScope.Any);
} }
public CharmbreakerDevils(UUID ownerId) { public CharmbreakerDevils(UUID ownerId) {
@ -111,7 +110,6 @@ class CharmbreakerDevilsEffect extends OneShotEffect<CharmbreakerDevilsEffect> {
FilterCard filter = new FilterCard("instant or sorcery card"); FilterCard filter = new FilterCard("instant or sorcery card");
filter.getCardType().add(CardType.INSTANT); filter.getCardType().add(CardType.INSTANT);
filter.getCardType().add(CardType.SORCERY); filter.getCardType().add(CardType.SORCERY);
filter.setScopeSubtype(ComparisonScope.Any);
Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]); Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]);
if (cards.length > 0) { if (cards.length > 0) {
Random rnd = new Random(); Random rnd = new Random();

View file

@ -39,8 +39,9 @@ import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.RedManaAbility; import mage.abilities.mana.RedManaAbility;
import mage.abilities.mana.WhiteManaAbility; import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID; import java.util.UUID;
@ -52,10 +53,7 @@ public class ClifftopRetreat extends CardImpl<ClifftopRetreat> {
private static final FilterLandPermanent filter = new FilterLandPermanent(); private static final FilterLandPermanent filter = new FilterLandPermanent();
static { static {
filter.getSubtype().add("Mountain"); filter.add(Predicates.or(new SubtypePredicate("Mountain"), new SubtypePredicate("Plains")));
filter.getSubtype().add("Plains");
filter.setScopeSubtype(ComparisonScope.Any);
filter.setMessage("Mountain or a Plains");
} }
public ClifftopRetreat(UUID ownerId) { public ClifftopRetreat(UUID ownerId) {
@ -63,7 +61,7 @@ public class ClifftopRetreat extends CardImpl<ClifftopRetreat> {
this.expansionSetCode = "ISD"; this.expansionSetCode = "ISD";
Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0)); Condition controls = new UnlessCondition(new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0));
String abilityText = "tap it unless you control a " + filter.getMessage(); String abilityText = "tap it unless you control a Mountain or a Plains";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());
this.addAbility(new WhiteManaAbility()); this.addAbility(new WhiteManaAbility());

View file

@ -41,8 +41,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID; import java.util.UUID;
@ -56,8 +56,7 @@ public class DearlyDeparted extends CardImpl<DearlyDeparted> {
private static final String ruleText = "As long as Dearly Departed is in your graveyard, each Human creature you control enters the battlefield with an additional +1/+1 counter on it"; private static final String ruleText = "As long as Dearly Departed is in your graveyard, each Human creature you control enters the battlefield with an additional +1/+1 counter on it";
static { static {
filterHuman.getSubtype().add("Human"); filterHuman.add(new SubtypePredicate("Human"));
filterHuman.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public DearlyDeparted(UUID ownerId) { public DearlyDeparted(UUID ownerId) {

View file

@ -34,9 +34,9 @@ import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID; import java.util.UUID;
@ -50,12 +50,9 @@ public class EliteInquisitor extends CardImpl<EliteInquisitor> {
private static final FilterPermanent filter3 = new FilterCreaturePermanent("Zombies"); private static final FilterPermanent filter3 = new FilterCreaturePermanent("Zombies");
static { static {
filter1.getSubtype().add("Vampire"); filter1.add(new SubtypePredicate("Vampire"));
filter2.getSubtype().add("Werewolf"); filter2.add(new SubtypePredicate("Werewolf"));
filter3.getSubtype().add("Zombie"); filter3.add(new SubtypePredicate("Zombie"));
filter1.setScopeSubtype(Filter.ComparisonScope.Any);
filter2.setScopeSubtype(Filter.ComparisonScope.Any);
filter3.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public EliteInquisitor(UUID ownerId) { public EliteInquisitor(UUID ownerId) {

View file

@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
import mage.game.permanent.token.ZombieToken; import mage.game.permanent.token.ZombieToken;
@ -73,7 +74,7 @@ class HalfZombiesCount implements DynamicValue {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static { static {
filter.getSubtype().add("Zombie"); filter.add(new SubtypePredicate("Zombie"));
} }
public static HalfZombiesCount getInstance() { public static HalfZombiesCount getInstance() {

View file

@ -41,9 +41,9 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
@ -58,8 +58,7 @@ public class FullMoonsRise extends CardImpl<FullMoonsRise> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf creatures");
static { static {
filter.getSubtype().add("Werewolf"); filter.add(new SubtypePredicate("Werewolf"));
filter.setScopeSubtype(Filter.ComparisonScope.Any);
} }
public FullMoonsRise(UUID ownerId) { public FullMoonsRise(UUID ownerId) {

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID; import java.util.UUID;
@ -47,7 +48,7 @@ public class GallowsWarden extends CardImpl<GallowsWarden> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit creatures");
static { static {
filter.getSubtype().add("Spirit"); filter.add(new SubtypePredicate("Spirit"));
} }
public GallowsWarden(UUID ownerId) { public GallowsWarden(UUID ownerId) {

View file

@ -33,9 +33,9 @@ import mage.Constants.Rarity;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
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.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
/** /**
@ -47,8 +47,7 @@ public class GhoulcallersChant extends CardImpl<GhoulcallersChant> {
private static final FilterCard filter = new FilterCard("Zombie cards from your graveyard"); private static final FilterCard filter = new FilterCard("Zombie cards from your graveyard");
static { static {
filter.getSubtype().add("Zombie"); filter.add(new SubtypePredicate("Zombie"));
filter.setScopeSubtype(ComparisonScope.Any);
} }
public GhoulcallersChant(UUID ownerId) { public GhoulcallersChant(UUID ownerId) {

View file

@ -39,8 +39,8 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
@ -94,8 +94,7 @@ class GhoulraiserEffect extends OneShotEffect<GhoulraiserEffect> {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
if (player != null) { if (player != null) {
FilterCard filter = new FilterCard("Zombie card"); FilterCard filter = new FilterCard("Zombie card");
filter.getSubtype().add("Zombie"); filter.add(new SubtypePredicate("Zombie"));
filter.setScopeSubtype(ComparisonScope.Any);
Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]); Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]);
if (cards.length > 0) { if (cards.length > 0) {
Random rnd = new Random(); Random rnd = new Random();

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