mirror of
https://github.com/correl/mage.git
synced 2024-11-22 03:00:11 +00:00
Refactor: replaced duplicated ability - CreatureEntersBattlefieldTriggeredAbility by EntersBattlefieldControlledTriggeredAbility;
This commit is contained in:
parent
8b0393cb96
commit
26913923fa
11 changed files with 134 additions and 177 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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<br>
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
*
|
||||
* <p>
|
||||
* 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 {
|
||||
|
|
Loading…
Reference in a new issue