mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[filters] Replaced Subtype condition with Predicate
This commit is contained in:
parent
91d320eed2
commit
2198cae333
345 changed files with 874 additions and 1032 deletions
|
@ -43,8 +43,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
|
@ -56,8 +56,7 @@ public class LichLordOfUnx extends CardImpl<LichLordOfUnx> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public LichLordOfUnx (UUID ownerId) {
|
||||
|
|
|
@ -36,12 +36,12 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.players.Player;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -83,10 +83,8 @@ class AngelOfGlorysRiseEffect extends OneShotEffect<AngelOfGlorysRiseEffect> {
|
|||
private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filterZombie.getSubtype().add("Zombie");
|
||||
filterZombie.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterHuman.getSubtype().add("Human");
|
||||
filterHuman.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterZombie.add(new SubtypePredicate("Zombie"));
|
||||
filterHuman.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public AngelOfGlorysRiseEffect() {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterAura;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -89,7 +90,7 @@ class BrunaLightOfAlabasterEffect extends OneShotEffect<BrunaLightOfAlabasterEff
|
|||
private static final FilterCard filterAuraCard = new FilterCard("Aura card");
|
||||
|
||||
static {
|
||||
filterAuraCard.getSubtype().add("Aura");
|
||||
filterAuraCard.add(new SubtypePredicate("Aura"));
|
||||
filterAuraCard.getCardType().add(CardType.ENCHANTMENT);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,22 +27,26 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.Filter;
|
||||
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.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
|
@ -96,8 +100,13 @@ class DescendantsPathEffect extends OneShotEffect<DescendantsPathEffect> {
|
|||
player.revealCards("DescendantsPath", new CardsImpl(card), game);
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
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();
|
||||
if (count > 0) {
|
||||
game.informPlayers("DescendantsPath: Found a creature that shares a creature type with the revealed card.");
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -63,8 +64,7 @@ public class DevoutChaplain extends CardImpl<DevoutChaplain> {
|
|||
static {
|
||||
humanFilter.setTapped(false);
|
||||
humanFilter.setUseTapped(true);
|
||||
humanFilter.getSubtype().add("Human");
|
||||
humanFilter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
humanFilter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public DevoutChaplain(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.keyword.SoulbondAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -51,7 +52,7 @@ public class DiregrafEscort extends CardImpl<DiregrafEscort> {
|
|||
private static final FilterPermanent filter = new FilterCreaturePermanent("Zombies");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public DiregrafEscort(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.costs.common.TapTargetCost;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SpiritWhiteToken;
|
||||
|
@ -59,8 +59,7 @@ public class GallowsAtWillowHill extends CardImpl<GallowsAtWillowHill> {
|
|||
static {
|
||||
humanFilter.setTapped(false);
|
||||
humanFilter.setUseTapped(true);
|
||||
humanFilter.getSubtype().add("Human");
|
||||
humanFilter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
humanFilter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public GallowsAtWillowHill(UUID ownerId) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -44,7 +45,7 @@ public class HumanFrailty extends CardImpl<HumanFrailty> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public HumanFrailty(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -48,7 +49,7 @@ public class KessigMalcontents extends CardImpl<KessigMalcontents> {
|
|||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Humans you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public KessigMalcontents(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -45,7 +46,7 @@ public class MassAppeal extends CardImpl<MassAppeal> {
|
|||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public MassAppeal(UUID ownerId) {
|
||||
|
|
|
@ -32,9 +32,9 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -48,8 +48,7 @@ public class MidnightDuelist extends CardImpl<MidnightDuelist> {
|
|||
private static final FilterPermanent filter = new FilterCreaturePermanent("Vampires");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Vampire");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Vampire"));
|
||||
}
|
||||
|
||||
public MidnightDuelist(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,8 @@ import mage.abilities.keyword.FlashAbility;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -52,8 +54,7 @@ public class RestorationAngel extends CardImpl<RestorationAngel> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Angel");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Angel");
|
||||
filter.setNotSubtype(true);
|
||||
filter.add(Predicates.not(new SubtypePredicate("Angel")));
|
||||
}
|
||||
|
||||
public RestorationAngel(UUID ownerId) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.choices.Choice;
|
|||
import mage.choices.ChoiceImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -124,7 +125,7 @@ class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl<Rid
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human creatures you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
protected FilterPermanent protectionFilter;
|
||||
|
@ -152,7 +153,7 @@ class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl<Rid
|
|||
String subtype = (String) game.getState().getValue(permanent.getId() + "_type");
|
||||
if (subtype != null) {
|
||||
protectionFilter = new FilterPermanent(subtype+"s");
|
||||
protectionFilter.getSubtype().add(subtype);
|
||||
protectionFilter.add(new SubtypePredicate(subtype));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.common.AttacksTriggeredAbility;
|
|||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public RiotRingleader(UUID ownerId) {
|
||||
|
|
|
@ -41,19 +41,18 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
|
|||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class ScrollOfAvacyn extends CardImpl<ScrollOfAvacyn> {
|
||||
private static FilterPermanent filter = new FilterPermanent("an Angel");
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Angel");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Angel"));
|
||||
}
|
||||
|
||||
public ScrollOfAvacyn(UUID ownerId) {
|
||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
|
|||
import mage.abilities.effects.common.DiscardTargetEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
|
@ -50,11 +50,10 @@ import mage.target.common.TargetOpponent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class ScrollOfGriselbrand extends CardImpl<ScrollOfGriselbrand> {
|
||||
private static FilterPermanent filter = new FilterPermanent("a Demon");
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Demon");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Demon"));
|
||||
}
|
||||
|
||||
public ScrollOfGriselbrand(UUID ownerId) {
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +46,7 @@ public class IreOfKaminari extends CardImpl<IreOfKaminari> {
|
|||
private final static FilterCard filter = new FilterCard("Arcane");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Arcane"));
|
||||
}
|
||||
|
||||
public IreOfKaminari(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.RegenerateTargetEffect;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -53,8 +53,7 @@ public class IsaoEnlightenedBushi extends CardImpl<IsaoEnlightenedBushi> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Samurai");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Samurai");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Samurai"));
|
||||
}
|
||||
|
||||
public IsaoEnlightenedBushi(UUID ownerId) {
|
||||
|
@ -66,6 +65,7 @@ public class IsaoEnlightenedBushi extends CardImpl<IsaoEnlightenedBushi> {
|
|||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Isao, Enlightened Bushi can't be countered.
|
||||
this.addAbility(new CantCounterAbility());
|
||||
this.addAbility(new BushidoAbility(2));
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +51,7 @@ public class NezumiShadowWatcher extends CardImpl<NezumiShadowWatcher> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Ninja");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Ninja");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Ninja"));
|
||||
}
|
||||
|
||||
public NezumiShadowWatcher(UUID ownerId) {
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public RibbonsOfTheReikai(UUID ownerId) {
|
||||
|
@ -54,6 +53,7 @@ public class RibbonsOfTheReikai extends CardImpl<RibbonsOfTheReikai> {
|
|||
this.expansionSetCode = "BOK";
|
||||
this.subtype.add("Arcane");
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Draw a card for each Spirit you control.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter)));
|
||||
}
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterAttackingOrBlockingCreature;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public TakenosCavalry(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
|
|||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Forest");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
|
||||
public TraprootKami(UUID ownerId) {
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,9 +52,7 @@ public class AzamiLadyOfScrolls extends CardImpl<AzamiLadyOfScrolls> {
|
|||
static {
|
||||
filter.setTapped(false);
|
||||
filter.setUseTapped(true);
|
||||
filter.getSubtype().add("Wizard");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Wizard"));
|
||||
}
|
||||
|
||||
public AzamiLadyOfScrolls(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
|
||||
/**
|
||||
|
@ -55,8 +55,7 @@ public class BenBenAkkiHermit extends CardImpl<BenBenAkkiHermit> {
|
|||
static {
|
||||
filter.setTapped(false);
|
||||
filter.setUseTapped(true);
|
||||
filter.getSubtype().add("Mountain");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
}
|
||||
|
||||
public BenBenAkkiHermit (UUID ownerId) {
|
||||
|
|
|
@ -45,8 +45,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.common.DevotionCounter;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -57,8 +57,7 @@ public class BloodthirstyOgre extends CardImpl<BloodthirstyOgre> {
|
|||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
|
||||
static {
|
||||
filter.getSubtype().add("Demon");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Demon"));
|
||||
}
|
||||
|
||||
public BloodthirstyOgre(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -52,8 +52,7 @@ public class CallToGlory extends CardImpl<CallToGlory> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Samurai");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Samurai"));
|
||||
}
|
||||
|
||||
public CallToGlory(UUID ownerId) {
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +46,7 @@ public class EerieProcession extends CardImpl<EerieProcession> {
|
|||
private final static FilterCard filter = new FilterCard("Arcane card");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Arcane"));
|
||||
}
|
||||
|
||||
public EerieProcession(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Arcane"));
|
||||
}
|
||||
|
||||
public HanaKami(UUID ownerId) {
|
||||
|
|
|
@ -45,8 +45,8 @@ import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetOpponentE
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.SoulshiftAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
|
@ -60,8 +60,7 @@ public class HeWhoHungers extends CardImpl<HeWhoHungers> {
|
|||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a Spirit");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public HeWhoHungers(UUID ownerId) {
|
||||
|
|
|
@ -34,8 +34,9 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(new SubtypePredicate("Spirit"), new SubtypePredicate("Arcane")));
|
||||
}
|
||||
|
||||
public HisokasDefiance(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -48,8 +48,7 @@ public class HondenOfCleansingFire extends CardImpl<HondenOfCleansingFire> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfCleansingFire(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
@ -50,8 +50,7 @@ public class HondenOfInfiniteRage extends CardImpl<HondenOfInfiniteRage> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfInfiniteRage (UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.SpiritToken;
|
||||
|
||||
/**
|
||||
|
@ -49,8 +49,7 @@ public class HondenOfLifesWeb extends CardImpl<HondenOfLifesWeb> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfLifesWeb(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DiscardTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
|
@ -49,8 +49,7 @@ public class HondenOfNightsReach extends CardImpl<HondenOfNightsReach> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfNightsReach(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -48,8 +48,7 @@ public class HondenOfSeeingWinds extends CardImpl<HondenOfSeeingWinds> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfSeeingWinds(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.effects.Effect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -53,8 +53,7 @@ public class HorobiDeathsWail extends CardImpl<HorobiDeathsWail> {
|
|||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
|
||||
static {
|
||||
filter.getSubtype().add("Demon");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Demon"));
|
||||
}
|
||||
|
||||
public HorobiDeathsWail(UUID ownerId) {
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.SearchEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
@ -76,8 +76,7 @@ class InameDeathAspectEffect extends SearchEffect<InameDeathAspectEffect> {
|
|||
private final static FilterCreatureCard filter = new FilterCreatureCard();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public InameDeathAspectEffect() {
|
||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.common.DiesTriggeredAbility;
|
|||
import mage.abilities.effects.common.ExileSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public InameLifeAspect(UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,8 +52,7 @@ public class KitsuneDiviner extends CardImpl<KitsuneDiviner> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Spirit");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public KitsuneDiviner (UUID ownerId) {
|
||||
|
|
|
@ -33,8 +33,9 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
filter.add(Predicates.or(new SubtypePredicate("Arcane"), new SubtypePredicate("Spirit")));
|
||||
}
|
||||
|
||||
public KitsuneRiftwalker(UUID ownerId) {
|
||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
|||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
|
||||
/**
|
||||
|
@ -57,8 +57,7 @@ public class KondasHatamoto extends CardImpl<KondasHatamoto>{
|
|||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
filter.getSubtype().add("Samurai");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Samurai"));
|
||||
}
|
||||
|
||||
public KondasHatamoto (UUID ownerId) {
|
||||
|
|
|
@ -44,6 +44,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
|
@ -56,7 +57,7 @@ public class LongForgottenGohei extends CardImpl<LongForgottenGohei> {
|
|||
|
||||
private final static FilterCreaturePermanent spiritFilter = new FilterCreaturePermanent("Spirits");
|
||||
static {
|
||||
spiritFilter.getSubtype().add("Spirit");
|
||||
spiritFilter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public LongForgottenGohei(UUID ownerId) {
|
||||
|
|
|
@ -47,6 +47,7 @@ import mage.abilities.keyword.FearAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
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 filter3 = new FilterControlledCreaturePermanent("Rats you control");
|
||||
|
||||
static {
|
||||
filterFear.getSubtype().add("Rat");
|
||||
filterSacrifice.getSubtype().add("Rat");
|
||||
filter3.getSubtype().add("Rat");
|
||||
{
|
||||
SubtypePredicate ratPredicate = new SubtypePredicate("Rat");
|
||||
filterFear.add(ratPredicate);
|
||||
filterSacrifice.add(ratPredicate);
|
||||
filter3.add(ratPredicate);
|
||||
}
|
||||
|
||||
public MarrowGnawer (UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.AttacksTriggeredAbility;
|
|||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Samurai");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Samurai"));
|
||||
}
|
||||
|
||||
public NagaoBoundByHonor(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -59,8 +59,7 @@ public class NineRingedBo extends CardImpl<NineRingedBo> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("spirit");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public NineRingedBo(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.SacrificeTargetEffect;
|
|||
import mage.abilities.keyword.FearAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -84,7 +85,7 @@ class PainwrackerOniTriggeredAbility1 extends TriggeredAbilityImpl<PainwrackerOn
|
|||
private final static FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Ogre");
|
||||
filter.add(new SubtypePredicate("Ogre"));
|
||||
}
|
||||
|
||||
public PainwrackerOniTriggeredAbility1(Effect effect) {
|
||||
|
|
|
@ -34,8 +34,9 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -47,9 +48,7 @@ public class RendFlesh extends CardImpl<RendFlesh> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Non-Spirit");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setNotSubtype(true);
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.not(new SubtypePredicate("Spirit")));
|
||||
}
|
||||
|
||||
public RendFlesh(UUID ownerId) {
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +46,7 @@ public class RendSpirit extends CardImpl<RendSpirit> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("Spirit");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public RendSpirit(UUID ownerId) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -54,8 +55,8 @@ public class SachiDaughterOfSeshiro extends CardImpl<SachiDaughterOfSeshiro> {
|
|||
private final static FilterCreaturePermanent shamanFilter = new FilterCreaturePermanent("Shamans");
|
||||
|
||||
static {
|
||||
snakeFilter.getSubtype().add("Snake");
|
||||
shamanFilter.getSubtype().add("Shaman");
|
||||
snakeFilter.add(new SubtypePredicate("Snake"));
|
||||
shamanFilter.add(new SubtypePredicate("Shaman"));
|
||||
}
|
||||
|
||||
public SachiDaughterOfSeshiro(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.DrawCardControllerEffect;
|
|||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -53,7 +54,7 @@ public class SeshiroTheAnointed extends CardImpl<SeshiroTheAnointed> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Snakes");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Snake");
|
||||
filter.add(new SubtypePredicate("Snake"));
|
||||
}
|
||||
|
||||
public SeshiroTheAnointed(UUID ownerId) {
|
||||
|
|
|
@ -31,7 +31,6 @@ import java.util.UUID;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
|
@ -39,6 +38,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect;
|
|||
import mage.abilities.effects.common.SkipNextPlayerUntapStepEffect;
|
||||
import mage.cards.CardImpl;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Snake");
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new SubtypePredicate("Snake"));
|
||||
}
|
||||
|
||||
public ShisatoWhisperingHunter(UUID ownerId) {
|
||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedCreatureEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -58,8 +58,7 @@ public class SosukeSonOfSeshiro extends CardImpl<SosukeSonOfSeshiro> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Snake creatures");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Snake");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Snake"));
|
||||
}
|
||||
|
||||
public SosukeSonOfSeshiro(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -74,11 +74,10 @@ public class TakenoSamuraiGeneral extends CardImpl<TakenoSamuraiGeneral> {
|
|||
}
|
||||
|
||||
class TakenoSamuraiGeneralEffect extends ContinuousEffectImpl<TakenoSamuraiGeneralEffect> {
|
||||
private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Samurai");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Samurai"));
|
||||
}
|
||||
|
||||
public TakenoSamuraiGeneralEffect() {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Arcane"));
|
||||
}
|
||||
|
||||
public TheUnspeakable(UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.decorator.ConditionalActivatedAbility;
|
|||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
//import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
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 FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
|
||||
static {
|
||||
filter.getSubtype().add("Demon");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Demon"));
|
||||
}
|
||||
|
||||
public VillainousOgre(UUID ownerId) {
|
||||
|
|
|
@ -47,7 +47,8 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
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.TargetControlledPermanent;
|
||||
|
||||
|
@ -62,9 +63,7 @@ public class KnightOfTheReliquary extends CardImpl<KnightOfTheReliquary> {
|
|||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(ComparisonScope.Any);
|
||||
filter.getSubtype().add("Forest");
|
||||
filter.getSubtype().add("Plains");
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
filter.add(Predicates.or(new SubtypePredicate("Forest"), new SubtypePredicate("Plains")));
|
||||
}
|
||||
|
||||
public KnightOfTheReliquary(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -54,7 +55,7 @@ public class ArchdemonOfGreed extends CardImpl<ArchdemonOfGreed> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,13 @@
|
|||
*/
|
||||
package mage.sets.darkascension;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.OnEventTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -44,6 +46,9 @@ import mage.cards.CardsImpl;
|
|||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
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.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -129,11 +134,12 @@ class CallToTheKindredEffect extends OneShotEffect<CallToTheKindredEffect> {
|
|||
|
||||
FilterCreatureCard filter = new FilterCreatureCard();
|
||||
StringBuilder sb = new StringBuilder("creature card with at least one subtype from: ");
|
||||
for (String subType : creature.getSubtype()) {
|
||||
filter.getSubtype().add(subType);
|
||||
sb.append(subType).append(", ");
|
||||
ArrayList<Predicate<MageObject>> subtypes = new ArrayList<Predicate<MageObject>>();
|
||||
for (String subtype : creature.getSubtype()) {
|
||||
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());
|
||||
filter.setMessage(sb.toString());
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapTargetCost;
|
|||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -54,8 +54,7 @@ public class ChosenOfMarkov extends CardImpl<ChosenOfMarkov> {
|
|||
static {
|
||||
filter.setUseTapped(true);
|
||||
filter.setTapped(false);
|
||||
filter.getSubtype().add("Vampire");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Vampire"));
|
||||
}
|
||||
|
||||
public ChosenOfMarkov(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -97,7 +98,7 @@ class CurseOfMisfortunesEffect extends OneShotEffect<CurseOfMisfortunesEffect> {
|
|||
@Override
|
||||
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");
|
||||
filter.getSubtype().add("Curse");
|
||||
filter.add(new SubtypePredicate("Curse"));
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
Player targetPlayer = game.getPlayer(enchantment.getAttachedTo());
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -53,8 +53,7 @@ public class DerangedOutcast extends CardImpl<DerangedOutcast> {
|
|||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a Human");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public DerangedOutcast(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.effects.common.LoseLifeTargetEffect;
|
|||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
|
@ -56,8 +56,7 @@ public class DiregrafCaptain extends CardImpl<DiregrafCaptain> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public DiregrafCaptain(UUID ownerId) {
|
||||
|
@ -93,8 +92,7 @@ class DiregrafCaptainTriggeredAbility extends TriggeredAbilityImpl<DiregrafCapta
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public DiregrafCaptainTriggeredAbility() {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public DrogskolCaptain(UUID ownerId) {
|
||||
|
|
|
@ -43,9 +43,9 @@ import mage.abilities.effects.common.RegenerateSourceEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
@ -61,8 +61,7 @@ public class FiendOfTheShadows extends CardImpl<FiendOfTheShadows> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a human");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public FiendOfTheShadows(UUID ownerId) {
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -82,8 +82,7 @@ class GravecrawlerPlayEffect extends AsThoughEffectImpl<GravecrawlerPlayEffect>
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("zombie");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public GravecrawlerPlayEffect() {
|
||||
|
|
|
@ -40,9 +40,9 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
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");
|
||||
|
||||
static {
|
||||
filterPermanent.getSubtype().add("Zombie");
|
||||
filterPermanent.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterPermanent.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public HavengulRunebinder(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,9 @@ import mage.abilities.effects.ReplacementEffectImpl;
|
|||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.keyword.IntimidateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Wolf");
|
||||
filter.getSubtype().add("Werewolf");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(new SubtypePredicate("Wolf"), new SubtypePredicate("Werewolf")));
|
||||
}
|
||||
|
||||
public Immerwolf(UUID ownerId) {
|
||||
|
@ -95,11 +94,8 @@ class ImmerwolfEffect extends ReplacementEffectImpl<ImmerwolfEffect> {
|
|||
private final static FilterCreaturePermanent filterNonhuman = new FilterCreaturePermanent("Non-human creature");
|
||||
|
||||
static {
|
||||
filterWerewolf.getSubtype().add("Werewolf");
|
||||
filterWerewolf.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterNonhuman.getSubtype().add("Human");
|
||||
filterNonhuman.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterNonhuman.setNotFilter(true);
|
||||
filterWerewolf.add(new SubtypePredicate("Werewolf"));
|
||||
filterNonhuman.add(Predicates.not(new SubtypePredicate("Human")));
|
||||
}
|
||||
|
||||
public ImmerwolfEffect() {
|
||||
|
|
|
@ -42,6 +42,8 @@ import mage.abilities.keyword.IntimidateAbility;
|
|||
import mage.abilities.keyword.UndyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.setNotSubtype(true);
|
||||
filter.add(Predicates.not(new SubtypePredicate("Human")));
|
||||
}
|
||||
|
||||
public MikaeusTheUnhallowed(UUID ownerId) {
|
||||
|
|
|
@ -35,22 +35,21 @@ import mage.MageInt;
|
|||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.filter.Filter;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
* @author intimidatingant
|
||||
*/
|
||||
public class RavenousDemon extends CardImpl<RavenousDemon> {
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Human");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public RavenousDemon(UUID ownerId) {
|
||||
|
|
|
@ -35,19 +35,20 @@ import mage.abilities.common.DiesAnotherCreatureYouControlTriggeredAbility;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.SpiritWhiteToken;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.SpiritWhiteToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author intimidatingant
|
||||
*/
|
||||
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 {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setNotSubtype(true);
|
||||
filter.add(Predicates.not(new SubtypePredicate("Spirit")));
|
||||
}
|
||||
|
||||
public RequiemAngel(UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.effects.common.DamageAllEffect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,7 +46,7 @@ public class ScorchTheFields extends CardImpl<ScorchTheFields> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public ScorchTheFields(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -52,7 +53,7 @@ public class SkirsdagFlayer extends CardImpl<SkirsdagFlayer> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public SkirsdagFlayer(UUID ownerId) {
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Vampire");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Vampire"));
|
||||
}
|
||||
|
||||
public StromkirkCaptain(UUID ownerId) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -55,7 +56,7 @@ public class WolfhuntersQuiver extends CardImpl<WolfhuntersQuiver> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf creature");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Werewolf");
|
||||
filter.add(new SubtypePredicate("Werewolf"));
|
||||
}
|
||||
|
||||
public WolfhuntersQuiver(UUID ownerId) {
|
||||
|
|
|
@ -35,9 +35,9 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -74,10 +74,8 @@ class ZombieApocalypseEffect extends OneShotEffect<ZombieApocalypseEffect> {
|
|||
private static final FilterCreaturePermanent filterHuman = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filterZombie.getSubtype().add("Zombie");
|
||||
filterZombie.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterHuman.getSubtype().add("Human");
|
||||
filterHuman.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterZombie.add(new SubtypePredicate("Zombie"));
|
||||
filterHuman.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public ZombieApocalypseEffect() {
|
||||
|
|
|
@ -44,8 +44,8 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -57,8 +57,7 @@ public class BlinkmothNexus extends CardImpl<BlinkmothNexus> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Blinkmoth");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Blinkmoth");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Blinkmoth"));
|
||||
}
|
||||
|
||||
public BlinkmothNexus(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.MyrToken;
|
||||
|
||||
/**
|
||||
|
@ -53,8 +53,7 @@ public class MyrMatrix extends CardImpl<MyrMatrix> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Myr");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Myr");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Myr"));
|
||||
}
|
||||
|
||||
public MyrMatrix (UUID ownerId) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.costs.mana.ColoredManaCost;
|
|||
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
|
@ -53,7 +54,7 @@ public class SteelshaperApprentice extends CardImpl<SteelshaperApprentice> {
|
|||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.getSubtype().add("Equipment");
|
||||
filter.add(new SubtypePredicate("Equipment"));
|
||||
}
|
||||
|
||||
public SteelshaperApprentice(UUID ownerId) {
|
||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -55,10 +55,8 @@ public class WandOfTheElements extends CardImpl<WandOfTheElements> {
|
|||
private static final FilterControlledPermanent mountainFilter = new FilterControlledPermanent("a Mountain");
|
||||
|
||||
static {
|
||||
islandFilter.getSubtype().add("Island");
|
||||
islandFilter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
mountainFilter.getSubtype().add("Mountain");
|
||||
mountainFilter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
islandFilter.add(new SubtypePredicate("Island"));
|
||||
mountainFilter.add(new SubtypePredicate("Mountain"));
|
||||
}
|
||||
|
||||
public WandOfTheElements(UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,8 +52,7 @@ public class HaazdaExonerator extends CardImpl<HaazdaExonerator> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Aura");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Aura");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Aura"));
|
||||
}
|
||||
|
||||
public HaazdaExonerator(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
|
|||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,7 +51,7 @@ public class DaruEncampment extends CardImpl<DaruEncampment> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creature");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Soldier");
|
||||
filter.add(new SubtypePredicate("Soldier"));
|
||||
}
|
||||
|
||||
public DaruEncampment(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
|
|||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Assembly-Worker");
|
||||
filter.add(new SubtypePredicate("Assembly-Worker"));
|
||||
}
|
||||
|
||||
public MishrasFactory(UUID ownerId) {
|
||||
|
|
|
@ -44,8 +44,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -58,8 +58,7 @@ public class Pentavus extends CardImpl<Pentavus> {
|
|||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Pentavite");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Pentavite");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Pentavite"));
|
||||
}
|
||||
|
||||
public Pentavus(UUID ownerId) {
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.ShuffleSpellEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Forest");
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
|
||||
public BeaconOfCreation(UUID ownerId) {
|
||||
|
|
|
@ -42,8 +42,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
|
@ -56,8 +56,7 @@ public class SkeletalVampire extends CardImpl<SkeletalVampire> {
|
|||
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Bat");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Bat");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Bat"));
|
||||
}
|
||||
|
||||
public SkeletalVampire(UUID ownerId) {
|
||||
|
|
|
@ -7,8 +7,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.Target;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public AngelOfFlightAlabaster(UUID ownerId) {
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.decorator.ConditionalContinousEffect;
|
|||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public AngelicOverseer(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,8 @@ import mage.abilities.effects.common.TapTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -50,8 +52,7 @@ public class AvacynianPriest extends CardImpl<AvacynianPriest> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human creature");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.setNotSubtype(true);
|
||||
filter.add(Predicates.not(new SubtypePredicate("Human")));
|
||||
}
|
||||
|
||||
public AvacynianPriest(UUID ownerId) {
|
||||
|
|
|
@ -35,8 +35,8 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -48,8 +48,7 @@ public class BattlegroundGeist extends CardImpl<BattlegroundGeist> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit creatures");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public BattlegroundGeist(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.keyword.DeathtouchAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Curse");
|
||||
filter.add(new SubtypePredicate("Curse"));
|
||||
}
|
||||
|
||||
public BitterheartWitchEffect() {
|
||||
|
|
|
@ -43,8 +43,8 @@ import mage.abilities.effects.common.TransformSourceEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
|
@ -102,8 +102,7 @@ class ControlFiveVampiresCost extends CostImpl<ControlFiveVampiresCost> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Vampire");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Vampire"));
|
||||
}
|
||||
|
||||
public ControlFiveVampiresCost() {
|
||||
|
|
|
@ -60,7 +60,6 @@ public class CharmbreakerDevils extends CardImpl<CharmbreakerDevils> {
|
|||
static {
|
||||
filter.getCardType().add(CardType.INSTANT);
|
||||
filter.getCardType().add(CardType.SORCERY);
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public CharmbreakerDevils(UUID ownerId) {
|
||||
|
@ -111,7 +110,6 @@ class CharmbreakerDevilsEffect extends OneShotEffect<CharmbreakerDevilsEffect> {
|
|||
FilterCard filter = new FilterCard("instant or sorcery card");
|
||||
filter.getCardType().add(CardType.INSTANT);
|
||||
filter.getCardType().add(CardType.SORCERY);
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
|
|
|
@ -39,8 +39,9 @@ import mage.abilities.effects.common.TapSourceEffect;
|
|||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -52,10 +53,7 @@ public class ClifftopRetreat extends CardImpl<ClifftopRetreat> {
|
|||
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Mountain");
|
||||
filter.getSubtype().add("Plains");
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
filter.setMessage("Mountain or a Plains");
|
||||
filter.add(Predicates.or(new SubtypePredicate("Mountain"), new SubtypePredicate("Plains")));
|
||||
}
|
||||
|
||||
public ClifftopRetreat(UUID ownerId) {
|
||||
|
@ -63,7 +61,7 @@ public class ClifftopRetreat extends CardImpl<ClifftopRetreat> {
|
|||
this.expansionSetCode = "ISD";
|
||||
|
||||
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 RedManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
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";
|
||||
|
||||
static {
|
||||
filterHuman.getSubtype().add("Human");
|
||||
filterHuman.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterHuman.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public DearlyDeparted(UUID ownerId) {
|
||||
|
|
|
@ -34,9 +34,9 @@ import mage.abilities.keyword.FirstStrikeAbility;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -50,12 +50,9 @@ public class EliteInquisitor extends CardImpl<EliteInquisitor> {
|
|||
private static final FilterPermanent filter3 = new FilterCreaturePermanent("Zombies");
|
||||
|
||||
static {
|
||||
filter1.getSubtype().add("Vampire");
|
||||
filter2.getSubtype().add("Werewolf");
|
||||
filter3.getSubtype().add("Zombie");
|
||||
filter1.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter2.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter3.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter1.add(new SubtypePredicate("Vampire"));
|
||||
filter2.add(new SubtypePredicate("Werewolf"));
|
||||
filter3.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public EliteInquisitor(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
|
@ -73,7 +74,7 @@ class HalfZombiesCount implements DynamicValue {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public static HalfZombiesCount getInstance() {
|
||||
|
|
|
@ -41,9 +41,9 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
@ -58,8 +58,7 @@ public class FullMoonsRise extends CardImpl<FullMoonsRise> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Werewolf creatures");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Werewolf");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Werewolf"));
|
||||
}
|
||||
|
||||
public FullMoonsRise(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -47,7 +48,7 @@ public class GallowsWarden extends CardImpl<GallowsWarden> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Spirit creatures");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public GallowsWarden(UUID ownerId) {
|
||||
|
|
|
@ -33,9 +33,9 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public GhoulcallersChant(UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
@ -94,8 +94,7 @@ class GhoulraiserEffect extends OneShotEffect<GhoulraiserEffect> {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
FilterCard filter = new FilterCard("Zombie card");
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.setScopeSubtype(ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
Card[] cards = player.getGraveyard().getCards(filter, game).toArray(new Card[0]);
|
||||
if (cards.length > 0) {
|
||||
Random rnd = new Random();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue