diff --git a/.gitignore b/.gitignore index 39a0d76c168..d60de4860ca 100644 --- a/.gitignore +++ b/.gitignore @@ -91,6 +91,7 @@ Mage.Verify/AllCards.json.zip Mage.Verify/AllSets.json.zip Mage.Verify/AllCards.json Mage.Verify/AllSets.json +/db releases Utils/author.txt diff --git a/Mage.Sets/src/mage/cards/a/AngelsTomb.java b/Mage.Sets/src/mage/cards/a/AngelsTomb.java index 6cd8c0e5ad9..0f3b20d28cf 100644 --- a/Mage.Sets/src/mage/cards/a/AngelsTomb.java +++ b/Mage.Sets/src/mage/cards/a/AngelsTomb.java @@ -1,10 +1,8 @@ package mage.cards.a; -import java.util.UUID; - -import mage.MageInt; -import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -12,10 +10,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; +import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.game.permanent.token.custom.CreatureToken; +import java.util.UUID; + /** * @author Loki */ @@ -25,12 +25,13 @@ public final class AngelsTomb extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Whenever a creature enters the battlefield under your control, you may have Angel's Tomb become a 3/3 white Angel artifact creature with flying until end of turn. - this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new BecomesCreatureSourceEffect( - new CreatureToken(3, 3, "3/3 white Angel artifact creature with flying") - .withColor("W") - .withSubType(SubType.ANGEL) - .withAbility(FlyingAbility.getInstance()), - "", Duration.EndOfTurn), true)); + Effect effect = new BecomesCreatureSourceEffect(new CreatureToken(3, 3, "3/3 white Angel artifact creature with flying") + .withColor("W") + .withSubType(SubType.ANGEL) + .withAbility(FlyingAbility.getInstance()), + "", Duration.EndOfTurn) + .setText("have {this} become a 3/3 white Angel artifact creature with flying until end of turn"); + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_PERMANENT_CREATURE, true)); } public AngelsTomb(final AngelsTomb card) { diff --git a/Mage.Sets/src/mage/cards/c/CatharsCrusade.java b/Mage.Sets/src/mage/cards/c/CatharsCrusade.java index bfb4f678fbd..59a6ce427ef 100644 --- a/Mage.Sets/src/mage/cards/c/CatharsCrusade.java +++ b/Mage.Sets/src/mage/cards/c/CatharsCrusade.java @@ -1,27 +1,34 @@ package mage.cards.c; -import java.util.UUID; -import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Zone; import mage.counters.CounterType; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; +import java.util.UUID; + /** - * * @author Loki */ public final class CatharsCrusade extends CardImpl { public CatharsCrusade(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}"); // Whenever a creature enters the battlefield under your control, put a +1/+1 counter on each creature you control. - this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()))); + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + Zone.BATTLEFIELD, + new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()), + StaticFilters.FILTER_PERMANENT_CREATURE_A, + false) + ); } public CatharsCrusade(final CatharsCrusade card) { diff --git a/Mage.Sets/src/mage/cards/d/DecoctionModule.java b/Mage.Sets/src/mage/cards/d/DecoctionModule.java index 95b4a39c128..c870592f426 100644 --- a/Mage.Sets/src/mage/cards/d/DecoctionModule.java +++ b/Mage.Sets/src/mage/cards/d/DecoctionModule.java @@ -1,9 +1,8 @@ package mage.cards.d; -import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -13,19 +12,26 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** - * * @author emerald000 */ public final class DecoctionModule extends CardImpl { public DecoctionModule(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // Whenever a creature enters the battlefield under your control, you get {E}. - this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(1))); + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + Zone.BATTLEFIELD, + new GetEnergyCountersControllerEffect(1), + StaticFilters.FILTER_PERMANENT_CREATURE_A, + false) + ); // {4}, {T}: Return target creature you control to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(4)); diff --git a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheEmpire.java b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheEmpire.java index a2789bf5555..a33e5bfc1bb 100644 --- a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheEmpire.java +++ b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheEmpire.java @@ -1,23 +1,26 @@ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.DamageAllEffect; import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.filter.common.FilterBySubtypeCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** - * * @author JayDi85 */ public final class ForerunnerOfTheEmpire extends CardImpl { @@ -49,12 +52,11 @@ public final class ForerunnerOfTheEmpire extends CardImpl { ); // Whenever a Dinosaur enters the battlefield under your control, you may have Forerunner of the Empire deal 1 damage to each creature. - Ability ability = new CreatureEntersBattlefieldTriggeredAbility( + Ability ability = new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new DamageAllEffect(1, new FilterCreaturePermanent()).setText("have {this} deal 1 damage to each creature"), filterAnyDinosaur, - true, - false); + true); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LeylineOfVitality.java b/Mage.Sets/src/mage/cards/l/LeylineOfVitality.java index 42be613481e..8808969cecd 100644 --- a/Mage.Sets/src/mage/cards/l/LeylineOfVitality.java +++ b/Mage.Sets/src/mage/cards/l/LeylineOfVitality.java @@ -1,8 +1,7 @@ package mage.cards.l; -import java.util.UUID; -import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; @@ -14,8 +13,9 @@ import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; +import java.util.UUID; + /** - * * @author BetaSteward_at_googlemail.com */ public final class LeylineOfVitality extends CardImpl { @@ -23,10 +23,19 @@ public final class LeylineOfVitality extends CardImpl { public LeylineOfVitality(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}"); + // If Leyline of Vitality is in your opening hand, you may begin the game with it on the battlefield. this.addAbility(LeylineAbility.getInstance()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, false))); - this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new GainLifeEffect(1), true)); + // Creatures you control get +0/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES, false))); + + // Whenever a creature enters the battlefield under your control, you may gain 1 life. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + Zone.BATTLEFIELD, + new GainLifeEffect(1), + StaticFilters.FILTER_PERMANENT_CREATURE_A, + true) + ); } public LeylineOfVitality(final LeylineOfVitality card) { diff --git a/Mage.Sets/src/mage/cards/s/SosukesSummons.java b/Mage.Sets/src/mage/cards/s/SosukesSummons.java index e5ea61eb3b7..f24676ab3ac 100644 --- a/Mage.Sets/src/mage/cards/s/SosukesSummons.java +++ b/Mage.Sets/src/mage/cards/s/SosukesSummons.java @@ -1,8 +1,7 @@ package mage.cards.s; -import java.util.UUID; -import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; @@ -16,8 +15,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TokenPredicate; import mage.game.permanent.token.SnakeToken; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class SosukesSummons extends CardImpl { @@ -25,19 +25,24 @@ public final class SosukesSummons extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken Snake"); static { - filter.add(new SubtypePredicate(SubType.SNAKE)); - filter.add(Predicates.not(new TokenPredicate())); + filter.add(new SubtypePredicate(SubType.SNAKE)); + filter.add(Predicates.not(new TokenPredicate())); } public SosukesSummons(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); // Create two 1/1 green Snake creature tokens. this.getSpellAbility().addEffect(new CreateTokenEffect(new SnakeToken(), 2)); // Whenever a nontoken Snake enters the battlefield under your control, you may return Sosuke's Summons from your graveyard to your hand. - this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), filter, true, false)); + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + Zone.GRAVEYARD, + new ReturnSourceFromGraveyardToHandEffect(), + filter, + true) + ); } diff --git a/Mage.Sets/src/mage/cards/v/ValorInAkros.java b/Mage.Sets/src/mage/cards/v/ValorInAkros.java index 851ff2e66ab..3f778cba22b 100644 --- a/Mage.Sets/src/mage/cards/v/ValorInAkros.java +++ b/Mage.Sets/src/mage/cards/v/ValorInAkros.java @@ -1,25 +1,32 @@ package mage.cards.v; -import java.util.UUID; -import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.StaticFilters; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class ValorInAkros extends CardImpl { public ValorInAkros(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); // Whenever a creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn. - this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new BoostControlledEffect(1,1,Duration.EndOfTurn))); + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + Zone.BATTLEFIELD, + new BoostControlledEffect(1, 1, Duration.EndOfTurn), + StaticFilters.FILTER_PERMANENT_CREATURE_A, + false) + ); } public ValorInAkros(final ValorInAkros card) { diff --git a/Mage.Sets/src/mage/cards/v/VigilanteJustice.java b/Mage.Sets/src/mage/cards/v/VigilanteJustice.java index e99e223b5f0..791642147ba 100644 --- a/Mage.Sets/src/mage/cards/v/VigilanteJustice.java +++ b/Mage.Sets/src/mage/cards/v/VigilanteJustice.java @@ -1,9 +1,8 @@ package mage.cards.v; -import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -14,24 +13,30 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetAnyTarget; +import java.util.UUID; + /** - * * @author Loki */ public final class VigilanteJustice extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a Human"); static { - filter.add(new SubtypePredicate(SubType.HUMAN)); + filter.add(new SubtypePredicate(SubType.HUMAN)); } public VigilanteJustice(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); // Whenever a Human enters the battlefield under your control, Vigilante Justice deals 1 damage to any target. - Ability ability = new CreatureEntersBattlefieldTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), filter, false, false); + Ability ability = new EntersBattlefieldControlledTriggeredAbility( + Zone.BATTLEFIELD, + new DamageTargetEffect(1), + filter, + false + ); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage/src/main/java/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java deleted file mode 100644 index ba3e9555d74..00000000000 --- a/Mage/src/main/java/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java +++ /dev/null @@ -1,123 +0,0 @@ - -package mage.abilities.common; - -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.Effect; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; -import mage.game.events.EntersTheBattlefieldEvent; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; -import mage.target.Target; -import mage.target.TargetPlayer; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author North - */ -public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityImpl { - - private boolean opponentController; - protected FilterCreaturePermanent filter = new FilterCreaturePermanent(); - - /** - * optional = false
- * opponentController = false - * - * @param effect - */ - public CreatureEntersBattlefieldTriggeredAbility(Effect effect) { - this(effect, false, false); - } - - /** - * opponentController = false - * - * @param effect - * @param optional - */ - public CreatureEntersBattlefieldTriggeredAbility(Effect effect, boolean optional) { - this(effect, optional, false); - } - - /** - * - * @param effect - * @param optional - * @param opponentController - */ - public CreatureEntersBattlefieldTriggeredAbility(Effect effect, boolean optional, boolean opponentController) { - this(Zone.BATTLEFIELD, effect, optional, opponentController); - - } - - /** - * @param zone - * @param effect - * @param optional - * @param opponentController - */ - public CreatureEntersBattlefieldTriggeredAbility(Zone zone, Effect effect, boolean optional, boolean opponentController) { - this(zone, effect, null, optional, opponentController); - } - - /** - * @param zone - * @param effect - * @param filter filter the triggering creatures - * @param optional - * @param opponentController - */ - public CreatureEntersBattlefieldTriggeredAbility(Zone zone, Effect effect, FilterCreaturePermanent filter, boolean optional, boolean opponentController) { - super(zone, effect, optional); - this.opponentController = opponentController; - if (filter != null) { - this.filter = filter; - } - } - - public CreatureEntersBattlefieldTriggeredAbility(CreatureEntersBattlefieldTriggeredAbility ability) { - super(ability); - this.opponentController = ability.opponentController; - this.filter = ability.filter; - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.ENTERS_THE_BATTLEFIELD; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); - if (filter.match(permanent, sourceId, controllerId, game) - && (permanent.isControlledBy(this.controllerId) ^ opponentController)) { - if (!this.getTargets().isEmpty()) { - Target target = this.getTargets().get(0); - if (target instanceof TargetPlayer) { - target.add(permanent.getControllerId(), game); - } - if (target instanceof TargetCreaturePermanent) { - target.add(event.getTargetId(), game); - } - } - return true; - } - return false; - } - - @Override - public String getRule() { - return "Whenever a " + filter.getMessage() + " enters the battlefield under " - + (opponentController ? "an opponent's control, " : "your control, ") - + super.getRule(); - } - - @Override - public CreatureEntersBattlefieldTriggeredAbility copy() { - return new CreatureEntersBattlefieldTriggeredAbility(this); - } -} diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 0fcf903c4c3..4226afe8767 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -23,7 +23,7 @@ import mage.filter.predicate.permanent.TokenPredicate; /** * A class that holds Filter objects that may not be modified without copying * before. This prevents the creation of thousands of filter objects. - * + *

* Because the filters are used application wide they may not be modified. * NEVER!!!!! But it's possible, so be careful! * @@ -42,6 +42,7 @@ public final class StaticFilters { static { FILTER_ENCHANTMENT_PERMANENT.setLockedFilter(true); } + public static final FilterCard FILTER_CARD = new FilterCard("card"); static { @@ -119,6 +120,7 @@ public final class StaticFilters { static { FILTER_CARD_NON_LAND.setLockedFilter(true); } + public static final FilterNonlandCard FILTER_CARD_A_NON_LAND = new FilterNonlandCard("a nonland card"); static { @@ -154,11 +156,13 @@ public final class StaticFilters { static { FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_ARTIFACT_CREATURE_PERMANENT = new FilterArtifactCreaturePermanent(); static { FILTER_ARTIFACT_CREATURE_PERMANENT.setLockedFilter(true); } + public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_OR_CREATURE = new FilterPermanent("artifact or creature"); static { @@ -168,6 +172,7 @@ public final class StaticFilters { )); FILTER_PERMANENT_ARTIFACT_OR_CREATURE.setLockedFilter(true); } + public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_CREATURE_OR_ENCHANTMENT = new FilterPermanent("artifact, creature, or enchantment"); static { @@ -178,6 +183,7 @@ public final class StaticFilters { )); FILTER_PERMANENT_ARTIFACT_CREATURE_OR_ENCHANTMENT.setLockedFilter(true); } + public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_CREATURE_ENCHANTMENT_OR_LAND = new FilterPermanent("artifact, creature, enchantment, or land"); static { @@ -195,16 +201,19 @@ public final class StaticFilters { static { FILTER_CONTROLLED_PERMANENT.setLockedFilter(true); } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT = new FilterControlledArtifactPermanent(); static { FILTER_CONTROLLED_PERMANENT_ARTIFACT.setLockedFilter(true); } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN = new FilterControlledArtifactPermanent("an artifact"); static { FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN.setLockedFilter(true); } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE = new FilterControlledPermanent("artifact or creature you control"); static { @@ -214,6 +223,7 @@ public final class StaticFilters { )); FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE.setLockedFilter(true); } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_LAND = new FilterControlledLandPermanent(); static { @@ -232,12 +242,14 @@ public final class StaticFilters { FILTER_OPPONENTS_PERMANENT.add(new ControllerPredicate(TargetController.OPPONENT)); FILTER_OPPONENTS_PERMANENT.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_OPPONENTS_PERMANENT_CREATURE = new FilterCreaturePermanent("creature an opponent controls"); static { FILTER_OPPONENTS_PERMANENT_CREATURE.add(new ControllerPredicate(TargetController.OPPONENT)); FILTER_OPPONENTS_PERMANENT_CREATURE.setLockedFilter(true); } + public static final FilterPermanent FILTER_OPPONENTS_PERMANENT_ARTIFACT = new FilterPermanent("artifact an opponent controls"); static { @@ -245,6 +257,7 @@ public final class StaticFilters { FILTER_OPPONENTS_PERMANENT_ARTIFACT.add(new CardTypePredicate(CardType.ARTIFACT)); FILTER_OPPONENTS_PERMANENT_ARTIFACT.setLockedFilter(true); } + public static final FilterPermanent FILTER_OPPONENTS_PERMANENT_ARTIFACT_OR_CREATURE = new FilterPermanent("artifact or creature an opponent controls"); static { @@ -280,12 +293,14 @@ public final class StaticFilters { static { FILTER_CONTROLLED_A_CREATURE.setLockedFilter(true); } + public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_ANOTHER_CREATURE = new FilterControlledCreaturePermanent("another creature"); static { FILTER_CONTROLLED_ANOTHER_CREATURE.add(new AnotherPredicate()); FILTER_CONTROLLED_ANOTHER_CREATURE.setLockedFilter(true); } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_NON_LAND = new FilterControlledPermanent("nonland permanent"); static { @@ -294,6 +309,7 @@ public final class StaticFilters { ); FILTER_CONTROLLED_PERMANENT_NON_LAND.setLockedFilter(true); } + public static final FilterLandPermanent FILTER_LAND = new FilterLandPermanent(); static { @@ -331,6 +347,12 @@ public final class StaticFilters { FILTER_PERMANENT_CREATURE.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_A = new FilterCreaturePermanent("a creature"); + + static { + FILTER_PERMANENT_CREATURE_A.setLockedFilter(true); + } + public static final FilterPermanent FILTER_PERMANENT_CREATURE_OR_PLANESWALKER_A = new FilterPermanent("a creature or planeswalker"); static { @@ -344,33 +366,39 @@ public final class StaticFilters { static { FILTER_PERMANENT_A_CREATURE.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_CONTROLLED = new FilterCreaturePermanent("creature you control"); static { FILTER_PERMANENT_CREATURE_CONTROLLED.add(new ControllerPredicate(TargetController.YOU)); FILTER_PERMANENT_CREATURE_CONTROLLED.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES = new FilterCreaturePermanent("creatures"); static { FILTER_PERMANENT_CREATURES.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES_CONTROLLED = new FilterCreaturePermanent("creatures you control"); static { FILTER_PERMANENT_CREATURES_CONTROLLED.add(new ControllerPredicate(TargetController.YOU)); FILTER_PERMANENT_CREATURES_CONTROLLED.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent(SubType.GOBLIN, "Goblin creatures"); static { FILTER_PERMANENT_CREATURE_GOBLINS.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "all Sliver creatures"); static { FILTER_PERMANENT_CREATURE_SLIVERS.setLockedFilter(true); } + public static final FilterPlaneswalkerPermanent FILTER_PERMANENT_PLANESWALKER = new FilterPlaneswalkerPermanent(); static { @@ -388,12 +416,14 @@ public final class StaticFilters { static { FILTER_PERMANENTS_NON_LAND.setLockedFilter(true); } + public static final FilterStackObject FILTER_SPELL_OR_ABILITY_OPPONENTS = new FilterStackObject("spell or ability and opponent controls"); static { FILTER_SPELL_OR_ABILITY_OPPONENTS.add(new ControllerPredicate(TargetController.OPPONENT)); FILTER_SPELL_OR_ABILITY_OPPONENTS.setLockedFilter(true); } + public static final FilterStackObject FILTER_SPELL_OR_ABILITY = new FilterStackObject(); static { @@ -405,11 +435,13 @@ public final class StaticFilters { static { FILTER_SPELL_A_CREATURE.setLockedFilter(true); } + public static final FilterCreatureSpell FILTER_SPELL_CREATURE = new FilterCreatureSpell("creature spell"); static { FILTER_SPELL_CREATURE.setLockedFilter(true); } + public static final FilterSpell FILTER_SPELL_NON_CREATURE = (FilterSpell) new FilterSpell("noncreature spell").add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); static { @@ -444,6 +476,7 @@ public final class StaticFilters { )); FILTER_SPELL_AN_INSTANT_OR_SORCERY.setLockedFilter(true); } + public static final FilterSpell FILTER_SPELL_INSTANT_OR_SORCERY = new FilterSpell("instant or sorcery spell"); static { @@ -463,6 +496,7 @@ public final class StaticFilters { )); FILTER_SPELLS_INSTANT_OR_SORCERY.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_CREATURE_TOKENS = new FilterCreaturePermanent("creature tokens"); static { @@ -484,6 +518,7 @@ public final class StaticFilters { FILTER_PERMANENT_AURA.add(new SubtypePredicate(SubType.AURA)); FILTER_PERMANENT_AURA.setLockedFilter(true); } + public static final FilterPermanent FILTER_PERMANENT_EQUIPMENT = new FilterPermanent(); static { @@ -491,6 +526,7 @@ public final class StaticFilters { FILTER_PERMANENT_EQUIPMENT.add(new SubtypePredicate(SubType.EQUIPMENT)); FILTER_PERMANENT_EQUIPMENT.setLockedFilter(true); } + public static final FilterPermanent FILTER_PERMANENT_FORTIFICATION = new FilterPermanent(); static { @@ -498,6 +534,7 @@ public final class StaticFilters { FILTER_PERMANENT_FORTIFICATION.add(new SubtypePredicate(SubType.FORTIFICATION)); FILTER_PERMANENT_FORTIFICATION.setLockedFilter(true); } + public static final FilterPermanent FILTER_PERMANENT_LEGENDARY = new FilterPermanent(); static {