mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Replaced several created filters inside card classes with pre-built static filters and simplified 3 cards (#8612)
This commit is contained in:
parent
140be70fb8
commit
d24dc008a8
213 changed files with 604 additions and 1668 deletions
|
@ -10,8 +10,7 @@ import mage.abilities.keyword.OutlastAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -20,14 +19,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class AbzanBattlePriest extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public AbzanBattlePriest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
@ -44,7 +35,8 @@ public final class AbzanBattlePriest extends CardImpl {
|
|||
Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(
|
||||
LifelinkAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||
filter, "Each creature you control with a +1/+1 counter on it has lifelink"
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1,
|
||||
"Each creature you control with a +1/+1 counter on it has lifelink"
|
||||
)
|
||||
));
|
||||
}
|
||||
|
|
|
@ -11,21 +11,13 @@ import mage.abilities.keyword.OutlastAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public final class AbzanFalconer extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public AbzanFalconer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
|
||||
|
@ -39,7 +31,11 @@ public final class AbzanFalconer extends CardImpl {
|
|||
this.addAbility(new OutlastAbility(new ColoredManaCost(ColoredManaSymbol.W)));
|
||||
|
||||
// Each creature you control with a +1/+1 counter on it has flying.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter, "Each creature you control with a +1/+1 counter on it has flying")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
|
||||
FlyingAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1)
|
||||
));
|
||||
}
|
||||
|
||||
private AbzanFalconer(final AbzanFalconer card) {
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,15 +19,9 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class ActOfAggression extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ActOfAggression(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R/P}{R/P}");
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature"));
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn."));
|
||||
|
|
|
@ -10,7 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -26,7 +26,7 @@ public final class AhnCropChampion extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// You may exert Ahn-Crop Champion as it attacks. When you do, untap all other creatures you control.
|
||||
addAbility(new ExertAbility(new BecomesExertSourceTriggeredAbility(new UntapAllControllerEffect(new FilterControlledCreaturePermanent("creatures you control"), null, false))));
|
||||
addAbility(new ExertAbility(new BecomesExertSourceTriggeredAbility(new UntapAllControllerEffect(StaticFilters.FILTER_CONTROLLED_CREATURES, null, false))));
|
||||
}
|
||||
|
||||
private AhnCropChampion(final AhnCropChampion card) {
|
||||
|
|
|
@ -11,8 +11,7 @@ import mage.abilities.keyword.OutlastAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -20,16 +19,6 @@ import mage.filter.FilterPermanent;
|
|||
*/
|
||||
public final class AinokBondKin extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
static final String rule = "Each creature you control with a +1/+1 counter on it has first strike";
|
||||
|
||||
public AinokBondKin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add(SubType.DOG);
|
||||
|
@ -42,8 +31,10 @@ public final class AinokBondKin extends CardImpl {
|
|||
this.addAbility(new OutlastAbility(new ManaCostsImpl("{1}{W}")));
|
||||
|
||||
// Each creature you control with a +1/+1 counter on it has first strike.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter, rule)));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
|
||||
FirstStrikeAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1)));
|
||||
}
|
||||
|
||||
private AinokBondKin(final AinokBondKin card) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ public final class AkromasBlessing extends CardImpl {
|
|||
|
||||
|
||||
// Choose a color. Creatures you control gain protection from the chosen color until end of turn.
|
||||
this.getSpellAbility().addEffect(new GainProtectionFromColorAllEffect(Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you control")));
|
||||
this.getSpellAbility().addEffect(new GainProtectionFromColorAllEffect(Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
// Cycling {W}
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{W}")));
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,12 +20,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class AlluringSiren extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public AlluringSiren(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
||||
|
||||
|
@ -33,7 +27,7 @@ public final class AlluringSiren extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,20 +15,13 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Quercitron
|
||||
*/
|
||||
public final class AltacBloodseeker extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public AltacBloodseeker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
||||
|
@ -41,7 +34,7 @@ public final class AltacBloodseeker extends CardImpl {
|
|||
// Whenever a creature an opponent controls dies, Altac Bloodseeker gets +2/+0 and gains first strike and haste until end of turn.
|
||||
Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn);
|
||||
effect.setText("{this} gets +2/+0");
|
||||
Ability ability = new DiesCreatureTriggeredAbility(effect, false, filter);
|
||||
Ability ability = new DiesCreatureTriggeredAbility(effect, false, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
|
||||
effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("and gains first strike");
|
||||
|
|
|
@ -15,9 +15,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -27,12 +26,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class AngelOfDeliverance extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public AngelOfDeliverance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{W}{W}");
|
||||
this.subtype.add(SubType.ANGEL);
|
||||
|
@ -49,7 +42,7 @@ public final class AngelOfDeliverance extends CardImpl {
|
|||
DeliriumCondition.instance,
|
||||
"<i>Delirium</i> — Whenever {this} deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls"
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addHint(CardTypesInGraveyardHint.YOU);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetE
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -22,7 +22,7 @@ public final class AngelicRenewal extends CardImpl {
|
|||
// Whenever a creature is put into your graveyard from the battlefield, you may sacrifice Angelic Renewal. If you do, return that card to the battlefield.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new DoIfCostPaid(
|
||||
new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, false), new SacrificeSourceCost()), false,
|
||||
new FilterCreaturePermanent("a creature"), true, true));
|
||||
StaticFilters.FILTER_PERMANENT_A_CREATURE, true, true));
|
||||
}
|
||||
|
||||
private AngelicRenewal(final AngelicRenewal card) {
|
||||
|
|
|
@ -15,8 +15,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -24,14 +23,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author JotaPeRL
|
||||
*/
|
||||
public final class AquastrandSpider extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("creature with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public AquastrandSpider(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add(SubType.SPIDER);
|
||||
|
@ -46,7 +38,7 @@ public final class AquastrandSpider extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityTargetEffect(ReachAbility.getInstance(),
|
||||
Duration.EndOfTurn), new ManaCostsImpl("{G}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_P1P1));
|
||||
this.addAbility(ability.addCustomOutcome(Outcome.Benefit));
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,12 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author Plopman
|
||||
*/
|
||||
public final class ArenaAthlete extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ArenaAthlete(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
||||
|
@ -36,7 +29,7 @@ public final class ArenaAthlete extends CardImpl {
|
|||
|
||||
// <i>Heroic</i> Whenever you cast a spell that targets Arena Athlete, target creature an opponent controls can't block this turn.
|
||||
Ability ability = new HeroicAbility(new CantBlockTargetEffect(Duration.EndOfTurn));
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -19,12 +18,6 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
*/
|
||||
public final class ArmorcraftJudge extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public ArmorcraftJudge(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
|
||||
this.subtype.add(SubType.ELF);
|
||||
|
@ -33,7 +26,9 @@ public final class ArmorcraftJudge extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Armorcraft Judge enters the battlefield, draw a card for each creature you control with a +1/+1 counter on it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter))));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(
|
||||
new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1))
|
||||
));
|
||||
}
|
||||
|
||||
private ArmorcraftJudge(final ArmorcraftJudge card) {
|
||||
|
|
|
@ -14,21 +14,13 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class AvatarOfTheResolute extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public AvatarOfTheResolute(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}");
|
||||
|
@ -43,9 +35,11 @@ public final class AvatarOfTheResolute extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Avatar of the Resolute enters the battlefield with a +1/+1 counter on it for each other creature you control with a +1/+1 counter on it.
|
||||
DynamicValue numberCounters = new PermanentsOnBattlefieldCount(filter);
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), numberCounters, true),
|
||||
"with a +1/+1 counter on it for each other creature you control with a +1/+1 counter on it"));
|
||||
DynamicValue numberCounters = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_OTHER_CONTROLLED_CREATURE_P1P1);
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(
|
||||
CounterType.P1P1.createInstance(0), numberCounters, true),
|
||||
"with a +1/+1 counter on it for each other creature you control with a +1/+1 counter on it")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -19,12 +18,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public final class AzoriusArrester extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public AzoriusArrester(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
|
@ -36,7 +29,7 @@ public final class AzoriusArrester extends CardImpl {
|
|||
|
||||
// When Azorius Arrester enters the battlefield, detain target creature an opponent controls.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DetainTargetEffect(), false);
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -27,12 +26,6 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public final class BanisherPriest extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public BanisherPriest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}");
|
||||
this.subtype.add(SubType.HUMAN, SubType.CLERIC);
|
||||
|
@ -42,7 +35,7 @@ public final class BanisherPriest extends CardImpl {
|
|||
|
||||
// When Banisher Priest enters the battlefield, exile target creature an opponent controls until Banisher Priest leaves the battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BanisherPriestExileEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -21,12 +22,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BattlefrontKrushok extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public BattlefrontKrushok(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}");
|
||||
this.subtype.add(SubType.BEAST);
|
||||
|
@ -37,7 +32,9 @@ public final class BattlefrontKrushok extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByMoreThanOneSourceEffect()));
|
||||
|
||||
// Each creature you control with a +1/+1 counter on it can't be blocked by more than one creature.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByMoreThanOneAllEffect(filter)));
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new CantBeBlockedByMoreThanOneAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1)));
|
||||
}
|
||||
|
||||
private BattlefrontKrushok(final BattlefrontKrushok card) {
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -22,18 +21,12 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class Betrayal extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public Betrayal(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature an opponent controls
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent(filter);
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
@ -20,7 +20,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
|
@ -34,12 +34,6 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public final class BishopOfBinding extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public BishopOfBinding(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
|
||||
|
@ -50,7 +44,7 @@ public final class BishopOfBinding extends CardImpl {
|
|||
|
||||
// When Bishop of Binding enters the battlefield, exile target creature an opponent controls until Bishop of Binding leaves the battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BishopOfBindingExileEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
|
@ -32,8 +32,9 @@ public final class BlastingStation extends CardImpl {
|
|||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever a creature enters the battlefield, you may untap Blasting Station.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new FilterCreaturePermanent("a creature"), true));
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), StaticFilters.FILTER_PERMANENT_A_CREATURE, true));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,8 @@ import mage.abilities.keyword.ReboundAbility;
|
|||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Library;
|
||||
|
@ -23,12 +22,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class BlessedReincarnation extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public BlessedReincarnation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}");
|
||||
|
||||
|
@ -36,7 +29,7 @@ public final class BlessedReincarnation extends CardImpl {
|
|||
// That player reveals cards from the top of their library until a creature card is revealed.
|
||||
// The player puts that card onto the battlefield, then shuffles the rest into their library.
|
||||
this.getSpellAbility().addEffect(new BlessedReincarnationEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
|
||||
// Rebound
|
||||
this.addAbility(new ReboundAbility());
|
||||
|
|
|
@ -9,7 +9,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.permanent.token.UnicornToken;
|
||||
|
@ -18,7 +18,6 @@ import java.util.UUID;
|
|||
|
||||
public class BlessedSanctuary extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filterYourCreatures = new FilterControlledCreaturePermanent("creatures you control");
|
||||
private static final FilterControlledCreaturePermanent filterNontoken = new FilterControlledCreaturePermanent("a nontoken creature");
|
||||
|
||||
static {
|
||||
|
@ -30,7 +29,7 @@ public class BlessedSanctuary extends CardImpl {
|
|||
|
||||
//Prevent all noncombat damage that would be dealt to you and creatures you control.
|
||||
this.addAbility(new SimpleStaticAbility(new PreventAllNonCombatDamageToAllEffect(
|
||||
Duration.WhileOnBattlefield, filterYourCreatures, true)));
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_CONTROLLED_CREATURES, true)));
|
||||
|
||||
//Whenever a nontoken creature enters the battlefield under your control, create a 2/2 white Unicorn creature token.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD,
|
||||
|
|
|
@ -12,13 +12,11 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -27,12 +25,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class BloodcrazedHoplite extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public BloodcrazedHoplite(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.subtype.add(SubType.HUMAN, SubType.SOLDIER);
|
||||
|
@ -44,7 +36,7 @@ public final class BloodcrazedHoplite extends CardImpl {
|
|||
this.addAbility(new HeroicAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), false)));
|
||||
// Whenever a +1/+1 counter is put on Bloodcrazed Hoplite, remove a +1/+1 counter from target creature an opponent controls.
|
||||
Ability ability = new BloodcrazedHopliteTriggeredAbility();
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -24,12 +24,6 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public final class BramblewoodParagon extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Each creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public BramblewoodParagon(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add(SubType.ELF, SubType.WARRIOR);
|
||||
|
@ -45,7 +39,9 @@ public final class BramblewoodParagon extends CardImpl {
|
|||
new GainAbilityAllEffect(
|
||||
TrampleAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield,
|
||||
filter)));
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1)
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -27,12 +26,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class CaptivatingCrew extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public CaptivatingCrew(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
|
@ -49,7 +42,7 @@ public final class CaptivatingCrew extends CardImpl {
|
|||
effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("It gains haste until end of turn");
|
||||
ability.addEffect(effect);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -23,11 +23,10 @@ public final class CarnivalOfSouls extends CardImpl {
|
|||
|
||||
public CarnivalOfSouls(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
|
||||
|
||||
// Whenever a creature enters the battlefield, you lose 1 life and add {B}.
|
||||
Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new LoseLifeSourceControllerEffect(1),
|
||||
new FilterCreaturePermanent("a creature"), false, SetTargetPointer.PERMANENT, null, false);
|
||||
StaticFilters.FILTER_PERMANENT_A_CREATURE, false, SetTargetPointer.PERMANENT, null, false);
|
||||
Effect effect = new AddManaToManaPoolSourceControllerEffect(Mana.BlackMana(1));
|
||||
effect.setText("and add {B}.");
|
||||
ability.addEffect(effect);
|
||||
|
|
|
@ -15,6 +15,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -35,8 +36,11 @@ public final class CemeteryPuca extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever a creature dies, you may pay {1}. If you do, Cemetery Puca becomes a copy of that creature, except it has this ability.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new DoIfCostPaid(new CemeteryPucaEffect(), new ManaCostsImpl("{1}")), false, new FilterCreaturePermanent("a creature"), true));
|
||||
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
||||
new DoIfCostPaid(new CemeteryPucaEffect(), new ManaCostsImpl("{1}")),
|
||||
false,
|
||||
StaticFilters.FILTER_PERMANENT_A_CREATURE,
|
||||
true));
|
||||
}
|
||||
|
||||
private CemeteryPuca(final CemeteryPuca card) {
|
||||
|
@ -72,7 +76,7 @@ class CemeteryPucaEffect extends OneShotEffect {
|
|||
Permanent copyFromCreature = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
|
||||
if (copyFromCreature != null) {
|
||||
game.copyPermanent(Duration.WhileOnBattlefield, copyFromCreature, copyToCreature.getId(), source, new EmptyCopyApplier());
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(new DiesCreatureTriggeredAbility(new DoIfCostPaid(new CemeteryPucaEffect(), new ManaCostsImpl("{1}")), false, new FilterCreaturePermanent("a creature"), true), Duration.WhileOnBattlefield);
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(new DiesCreatureTriggeredAbility(new DoIfCostPaid(new CemeteryPucaEffect(), new ManaCostsImpl("{1}")), false, StaticFilters.FILTER_PERMANENT_A_CREATURE, true), Duration.WhileOnBattlefield);
|
||||
effect.setTargetPointer(new FixedTarget(copyToCreature.getId(), game));
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
|
|
|
@ -14,7 +14,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -25,10 +25,8 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public final class CennsTactician extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterSoldier = new FilterCreaturePermanent("Soldier creature");
|
||||
private static final FilterControlledCreaturePermanent filterCounter = new FilterControlledCreaturePermanent("Each creature you control with a +1/+1 counter on it");
|
||||
static {
|
||||
filterSoldier.add(SubType.SOLDIER.getPredicate());
|
||||
filterCounter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public CennsTactician(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -45,7 +43,14 @@ public final class CennsTactician extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Each creature you control with a +1/+1 counter on it can block an additional creature each combat.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureAllEffect(1, filterCounter, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new CanBlockAdditionalCreatureAllEffect(
|
||||
1,
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1,
|
||||
Duration.WhileOnBattlefield)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private CennsTactician(final CennsTactician card) {
|
||||
|
|
|
@ -15,9 +15,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -62,11 +61,9 @@ import mage.util.CardUtil;
|
|||
public final class ChainedToTheRocks extends CardImpl {
|
||||
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Mountain you control");
|
||||
private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(SubType.MOUNTAIN.getPredicate());
|
||||
filterTarget.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ChainedToTheRocks(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -82,7 +79,7 @@ public final class ChainedToTheRocks extends CardImpl {
|
|||
|
||||
// When Chained to the Rocks enters the battlefield, exile target creature an opponent controls until Chained to the Rocks leaves the battlefield. (That creature returns under its owner's control.)
|
||||
ability = new EntersBattlefieldTriggeredAbility(new ChainedToTheRocksEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filterTarget));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -26,12 +25,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public final class ChromeshellCrab extends CardImpl {
|
||||
|
||||
private static final String rule = "you may exchange control of target creature you control and target creature an opponent controls";
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ChromeshellCrab(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
|
||||
|
@ -48,7 +41,7 @@ public final class ChromeshellCrab extends CardImpl {
|
|||
effect.setText("exchange control of target creature you control and target creature an opponent controls");
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect, false, true);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
@ -49,12 +47,6 @@ public final class ChroniclerOfHeroes extends CardImpl {
|
|||
|
||||
class ChroniclerOfHeroesEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with a +1/+1 counter on it");
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public ChroniclerOfHeroesEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "draw a card if you control a creature with a +1/+1 counter on it";
|
||||
|
@ -73,7 +65,7 @@ class ChroniclerOfHeroesEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (new PermanentsOnTheBattlefieldCondition(filter).apply(game, source)) {
|
||||
if (new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_A_CREATURE_P1P1).apply(game, source)) {
|
||||
controller.drawCards(1, source, game);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -17,7 +17,7 @@ import mage.target.common.TargetAnyTarget;
|
|||
* @author fireshoes
|
||||
*/
|
||||
public final class CloseQuarters extends CardImpl {
|
||||
|
||||
|
||||
static final private FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
|
||||
|
||||
static {
|
||||
|
|
|
@ -15,8 +15,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -25,12 +24,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class ConqueringManticore extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ConqueringManticore(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
|
||||
this.subtype.add(SubType.MANTICORE);
|
||||
|
@ -43,7 +36,7 @@ public final class ConqueringManticore extends CardImpl {
|
|||
Ability ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn), false);
|
||||
ability.addEffect(new UntapTargetEffect().setText("Untap that creature"));
|
||||
ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn."));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -26,12 +25,6 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public final class ConstrictingSliver extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filterTarget.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ConstrictingSliver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||
this.subtype.add(SubType.SLIVER);
|
||||
|
@ -42,7 +35,7 @@ public final class ConstrictingSliver extends CardImpl {
|
|||
// Sliver creatures you control have "When this creature enters the battlefield, you may exile target creature an opponent controls
|
||||
// until this creature leaves the battlefield."
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ConstrictingSliverExileEffect(), true);
|
||||
ability.addTarget(new TargetCreaturePermanent(filterTarget));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(ability,
|
||||
|
|
|
@ -15,6 +15,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -26,11 +27,9 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public final class ContestedCliffs extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Beast creature you control");
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature an opponent controls");
|
||||
static {
|
||||
filter1.add(TargetController.YOU.getControllerPredicate());
|
||||
filter1.add(SubType.BEAST.getPredicate());
|
||||
filter2.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public ContestedCliffs(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -38,16 +37,16 @@ public final class ContestedCliffs extends CardImpl {
|
|||
|
||||
// {tap}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {R}{G}, {tap}: Choose target Beast creature you control and target creature an opponent controls. Those creatures fight each other.
|
||||
Effect effect = new FightTargetsEffect();
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{R}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
Target target1 = new TargetCreaturePermanent(filter1);
|
||||
ability.addTarget(target1);
|
||||
Target target2 = new TargetCreaturePermanent(filter2);
|
||||
Target target2 = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target2);
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private ContestedCliffs(final ContestedCliffs card) {
|
||||
|
|
|
@ -11,10 +11,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -22,12 +20,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
*/
|
||||
public final class CrownedCeratok extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Each creature you control with a +1/+1 counter on it");
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public CrownedCeratok(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
|
||||
this.subtype.add(SubType.RHINO);
|
||||
|
@ -39,8 +31,14 @@ public final class CrownedCeratok extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Each creature you control with a +1/+1 counter on it has trample.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(
|
||||
TrampleAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private CrownedCeratok(final CrownedCeratok card) {
|
||||
|
|
|
@ -12,8 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -68,12 +67,6 @@ public final class CrypticCommand extends CardImpl {
|
|||
|
||||
class CrypticCommandEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public CrypticCommandEffect() {
|
||||
super(Outcome.Tap);
|
||||
staticText = "Tap all creatures your opponents control";
|
||||
|
@ -89,7 +82,7 @@ class CrypticCommandEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, player.getId(), source.getSourceId(), game)) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE, player.getId(), source.getSourceId(), game)) {
|
||||
creature.tap(source, game);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -17,8 +17,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -26,11 +25,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author JotaPeRL
|
||||
*/
|
||||
public final class CytoplastManipulator extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with a +1/+1 counter on it");
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public CytoplastManipulator(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}");
|
||||
|
@ -50,7 +44,7 @@ public final class CytoplastManipulator extends CardImpl {
|
|||
"gain control of target creature with a +1/+1 counter on it for as long as {this} remains on the battlefield");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_P1P1));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
@ -17,8 +17,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
@ -28,12 +27,6 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
* @author emerald000
|
||||
*/
|
||||
public final class CytoplastRootKin extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creature you control that has a +1/+1 counter on it");
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public CytoplastRootKin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}");
|
||||
|
@ -45,8 +38,8 @@ public final class CytoplastRootKin extends CardImpl {
|
|||
// Graft 4
|
||||
this.addAbility(new GraftAbility(this, 4));
|
||||
|
||||
// When Cytoplast Root-Kin enters the battlefield, put a +1/+1 counter on each other creature you control that has a +1/+1 counter on it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter)));
|
||||
// When Cytoplast Root-Kin enters the battlefield, put a +1/+1 counter on each other creature you control with a +1/+1 counter on it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_OTHER_CONTROLLED_CREATURE_P1P1)));
|
||||
|
||||
// {2}: Move a +1/+1 counter from target creature you control onto Cytoplast Root-Kin.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CytoplastRootKinEffect(), new GenericManaCost(2));
|
||||
|
|
|
@ -15,8 +15,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -24,11 +23,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author JotaPeRL
|
||||
*/
|
||||
public final class CytospawnShambler extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with a +1/+1 counter on it");
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public CytospawnShambler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}");
|
||||
|
@ -42,7 +36,7 @@ public final class CytospawnShambler extends CardImpl {
|
|||
|
||||
// {G}: Target creature with a +1/+1 counter on it gains trample until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_P1P1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -18,18 +19,12 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class DarkProphecy extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public DarkProphecy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}");
|
||||
|
||||
// Whenever a creature you control dies, you draw a card and you lose 1 life.
|
||||
Effect effect = new DrawCardSourceControllerEffect(1, "you");
|
||||
Ability ability = new DiesCreatureTriggeredAbility(effect, false, filter);
|
||||
Ability ability = new DiesCreatureTriggeredAbility(effect, false, StaticFilters.FILTER_CONTROLLED_A_CREATURE);
|
||||
effect = new LoseLifeSourceControllerEffect(1);
|
||||
ability.addEffect(effect.concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -14,8 +14,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -34,8 +33,7 @@ public final class DauntlessEscort extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Sacrifice Dauntless Escort: Creatures you control are indestructible this turn.
|
||||
FilterPermanent filter = new FilterControlledCreaturePermanent("Creatures you control");
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, filter, false);
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES, false);
|
||||
effect.setText("Creatures you control are indestructible this turn");
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new SacrificeSourceCost()));
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.ManaPoolItem;
|
||||
|
@ -31,19 +31,13 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class DeadMansChest extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public DeadMansChest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature an opponent controls
|
||||
TargetPermanent auraTarget = new TargetPermanent(filter);
|
||||
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
@ -11,8 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,13 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public final class DeepwaterHypnotist extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
|
||||
public DeepwaterHypnotist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
||||
|
@ -38,7 +30,7 @@ public final class DeepwaterHypnotist extends CardImpl {
|
|||
|
||||
// <i>Inspired</i> — Whenever Deepwater Hypnotist becomes untapped, target creature an opponent controls gets -3/-0 until end of turn.
|
||||
Ability ability = new InspiredAbility(new BoostTargetEffect(-3,0,Duration.EndOfTurn));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,13 +7,12 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.SacrificeControllerEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
|
@ -38,7 +37,7 @@ public final class DemonicAppetite extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield)));
|
||||
|
||||
// At the beginning of your upkeep, sacrifice a creature.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(new FilterCreaturePermanent("a creature"), 1, ""),
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_PERMANENT_A_CREATURE, 1, ""),
|
||||
TargetController.YOU, false));
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
|
@ -18,19 +19,13 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
*/
|
||||
public final class DictateOfErebos extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public DictateOfErebos(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}");
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
// Whenever a creature you control dies, each opponent sacrifices a creature.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("creature")), false, filter));
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("creature")), false, StaticFilters.FILTER_CONTROLLED_A_CREATURE));
|
||||
}
|
||||
|
||||
private DictateOfErebos(final DictateOfErebos card) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetE
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -20,7 +20,7 @@ public final class Displace extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
|
||||
|
||||
// Exile up to two target creatures you control, then return those cards to the battlefield under their owner's control.
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2, new FilterControlledCreaturePermanent("creatures you control"), false));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2, StaticFilters.FILTER_CONTROLLED_CREATURES, false));
|
||||
this.getSpellAbility().addEffect(new ExileTargetForSourceEffect());
|
||||
this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, false)
|
||||
.withReturnNames("those cards", "their owner's").concatBy(", then"));
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -20,12 +20,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class DongZhouTheTyrant extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public DongZhouTheTyrant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
|
@ -36,7 +30,7 @@ public final class DongZhouTheTyrant extends CardImpl {
|
|||
|
||||
// When Dong Zhou, the Tyrant enters the battlefield, target creature an opponent controls deals damage equal to its power to that player.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DongZhouTheTyrantEffect(), false);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -24,13 +23,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class DuelingCoach extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public DuelingCoach(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
|
||||
|
@ -48,7 +40,10 @@ public final class DuelingCoach extends CardImpl {
|
|||
|
||||
// {4}{W}, {T}: Put a +1/+1 counter on each creature you control with a +1/+1 counter on it.
|
||||
ability = new SimpleActivatedAbility(
|
||||
new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), new ManaCostsImpl("{4}{W}")
|
||||
new AddCountersAllEffect(
|
||||
CounterType.P1P1.createInstance(),
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1),
|
||||
new ManaCostsImpl("{4}{W}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
|
@ -27,12 +27,6 @@ import mage.watchers.Watcher;
|
|||
*/
|
||||
public final class DungeonGeists extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public DungeonGeists(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}");
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
|
@ -45,7 +39,7 @@ public final class DungeonGeists extends CardImpl {
|
|||
// When Dungeon Geists enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's untap step for as long as you control Dungeon Geists.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
|
||||
ability.addEffect(new DungeonGeistsEffect());
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
Target target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability, new DungeonGeistsWatcher());
|
||||
// watcher needed to send normal events to Dungeon Geists ReplacementEffect
|
||||
|
|
|
@ -5,7 +5,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.constants.Duration;
|
||||
|
@ -14,7 +14,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -23,12 +23,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class DuskshellCrawler extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public DuskshellCrawler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
||||
|
@ -43,9 +37,12 @@ public final class DuskshellCrawler extends CardImpl {
|
|||
|
||||
// Each creature you control with a +1/+1 counter on it has trample.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter)
|
||||
.setText("Each creature you control with a +1/+1 counter on it has trample")
|
||||
));
|
||||
new GainAbilityAllEffect(
|
||||
TrampleAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private DuskshellCrawler(final DuskshellCrawler card) {
|
||||
|
|
|
@ -12,8 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -26,12 +25,6 @@ import mage.target.targetpointer.FirstTargetPointer;
|
|||
*/
|
||||
public final class EliteScaleguard extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public EliteScaleguard(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
@ -43,7 +36,11 @@ public final class EliteScaleguard extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BolsterEffect(2)));
|
||||
|
||||
// Whenever a creature you control with a +1/+1 counter on it attacks, tap target creature defending player controls.
|
||||
Ability ability = new AttacksCreatureYouControlTriggeredAbility(new TapTargetEffect(), false, filter, true);
|
||||
Ability ability = new AttacksCreatureYouControlTriggeredAbility(
|
||||
new TapTargetEffect(),
|
||||
false,
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1,
|
||||
true);
|
||||
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls")));
|
||||
ability.setTargetAdjuster(EliteScaleguardTargetAdjuster.instance);
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -8,8 +8,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
|||
import mage.abilities.effects.common.continuous.PlayWithHandRevealedEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
@ -21,8 +20,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class EnduringRenewal extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("a creature");
|
||||
|
||||
public EnduringRenewal(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
||||
|
||||
|
@ -35,7 +32,7 @@ public final class EnduringRenewal extends CardImpl {
|
|||
// Whenever a creature is put into your graveyard from the battlefield, return it to your hand.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(
|
||||
new ReturnFromGraveyardToHandTargetEffect().setText("return it to your hand"),
|
||||
false, filter, true, true
|
||||
false, StaticFilters.FILTER_PERMANENT_A_CREATURE, true, true
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -47,8 +47,8 @@ public final class EpharasEnlightenment extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA)));
|
||||
// Whenever a creature enters the battlefield under your control, you may return Ephara's Enlightenment to its owner's hand.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new ReturnToHandSourceEffect(true),
|
||||
new FilterCreaturePermanent("a creature"),
|
||||
new ReturnToHandSourceEffect(true),
|
||||
StaticFilters.FILTER_PERMANENT_A_CREATURE,
|
||||
true));
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -24,17 +24,11 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author emerald000
|
||||
*/
|
||||
public final class EternalThirst extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls");
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public EternalThirst(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
|
@ -47,12 +41,10 @@ public final class EternalThirst extends CardImpl {
|
|||
effect.setText("Enchanted creature has lifelink");
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
// and "Whenever a creature an opponent controls dies, put a +1/+1 counter on this creature."
|
||||
effect = new GainAbilityAttachedEffect(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter), AttachmentType.AURA);
|
||||
effect = new GainAbilityAttachedEffect(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_OPPONENTS_PERMANENT_A_CREATURE), AttachmentType.AURA);
|
||||
ability.addEffect(effect);
|
||||
effect.setText("and \"Whenever a creature an opponent controls dies, put a +1/+1 counter on this creature.\"");
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private EternalThirst(final EternalThirst card) {
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.TargetController;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
|
@ -24,11 +24,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author spjspj
|
||||
*/
|
||||
public final class EvolutionaryEscalation extends CardImpl {
|
||||
private static final FilterCreaturePermanent filterOpponentCreature = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filterOpponentCreature.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public EvolutionaryEscalation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
|
@ -37,7 +32,7 @@ public final class EvolutionaryEscalation extends CardImpl {
|
|||
EvolutionaryEscalationEffect effect = new EvolutionaryEscalationEffect();
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
ability.addTarget(new TargetCreaturePermanent(filterOpponentCreature));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,7 @@ import mage.abilities.keyword.UnleashAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -21,14 +19,6 @@ import mage.filter.predicate.mageobject.AnotherPredicate;
|
|||
*/
|
||||
public final class ExavaRakdosBloodWitch extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
static final String rule = "Each other creature you control with a +1/+1 counter on it has haste";
|
||||
public ExavaRakdosBloodWitch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}");
|
||||
|
@ -46,7 +36,11 @@ public final class ExavaRakdosBloodWitch extends CardImpl {
|
|||
// Unleash
|
||||
this.addAbility(new UnleashAbility());
|
||||
// Each other creature you control with a +1/+1 counter on it has haste.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, rule)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
|
||||
HasteAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_OTHER_CONTROLLED_CREATURE_P1P1,
|
||||
rule)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -57,6 +58,7 @@ public final class ExperimentKraj extends CardImpl {
|
|||
class ExperimentKrajEffect extends ContinuousEffectImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
|
@ -11,8 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,12 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author fireshoes
|
||||
*/
|
||||
public final class EyeblightAssassin extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterOpponentCreature = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filterOpponentCreature.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public EyeblightAssassin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
|
||||
|
@ -36,7 +29,7 @@ public final class EyeblightAssassin extends CardImpl {
|
|||
|
||||
// When Eyeblight Assassin enters the battlefield, target creature an opponent controls gets -1/-1 until end of turn.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-1,-1, Duration.EndOfTurn));
|
||||
ability.addTarget(new TargetCreaturePermanent(filterOpponentCreature));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -27,12 +26,6 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public final class FairgroundsWarden extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public FairgroundsWarden(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
|
||||
this.subtype.add(SubType.DWARF);
|
||||
|
@ -42,7 +35,7 @@ public final class FairgroundsWarden extends CardImpl {
|
|||
|
||||
// When Fairgrounds Warden enters the battlefield, exile target creature an opponent controls until Fairgrounds Warden leaves the battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new FairsgroundsWardenExileEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -29,12 +29,6 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public final class FaithUnbroken extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filterTarget.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public FaithUnbroken(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
@ -48,7 +42,7 @@ public final class FaithUnbroken extends CardImpl {
|
|||
|
||||
// When Faith Unbroken enters the battlefield, exile target creature an opponent controls until Faith Unbroken leaves the battlefield.
|
||||
ability = new EntersBattlefieldTriggeredAbility(new FaithUnbrokenEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filterTarget));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -26,12 +26,12 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class FesteringNewt extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature an opponent controls");
|
||||
private static final FilterCreaturePermanent filterBogbrewWitch = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filterCreature.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
filterBogbrewWitch.add(new NamePredicate("Bogbrew Witch"));
|
||||
}
|
||||
|
||||
public FesteringNewt(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
|
||||
this.subtype.add(SubType.SALAMANDER);
|
||||
|
@ -46,7 +46,7 @@ public final class FesteringNewt extends CardImpl {
|
|||
new LockedInCondition(new PermanentsOnTheBattlefieldCondition(filterBogbrewWitch)),
|
||||
"target creature an opponent controls gets -1/-1 until end of turn. That creature gets -4/-4 instead if you control a creature named Bogbrew Witch");
|
||||
Ability ability = new DiesSourceTriggeredAbility(effect);
|
||||
ability.addTarget(new TargetCreaturePermanent(filterCreature));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,9 +13,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -24,17 +23,11 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class FiresOfYavimaya extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public FiresOfYavimaya(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{G}");
|
||||
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_CONTROLLED_CREATURES, false)));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -13,7 +13,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -32,7 +32,7 @@ public final class FlailingDrake extends CardImpl {
|
|||
// Whenever Flailing Drake blocks or becomes blocked by a creature, that creature gets +1/+1 until end of turn.
|
||||
Effect effect = new BoostTargetEffect(+1, +1, Duration.EndOfTurn);
|
||||
effect.setText("that creature gets +1/+1 until end of turn");
|
||||
Ability ability = new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, new FilterCreaturePermanent("a creature"), false, null, true);
|
||||
Ability ability = new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, StaticFilters.FILTER_PERMANENT_A_CREATURE, false, null, true);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,12 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class Fogwalker extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public Fogwalker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
|
@ -36,7 +29,7 @@ public final class Fogwalker extends CardImpl {
|
|||
this.addAbility(new SkulkAbility());
|
||||
// When Fogwalker enters the battlefield, target creature an opponent controls doesn't untap during it controler's next untap step.
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,10 +14,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -25,14 +22,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
*/
|
||||
public final class FoundryHornet extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a creature with a +1/+1 counter on it");
|
||||
private static final FilterCreaturePermanent filterOpponent = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
filterOpponent.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
private static final String rule = "When {this} enters the battlefield, if you control a creature with a +1/+1 counter on it, creatures your opponents control get -1/-1 until end of turn.";
|
||||
|
||||
public FoundryHornet(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -46,8 +35,8 @@ public final class FoundryHornet extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Foundry Hornet enters the battlefield, if you control a creature with a +1/+1 counter on it, creatures your opponents control get -1/-1 until end of turn.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostAllEffect(-1, -1, Duration.EndOfTurn, filterOpponent, false), false);
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule));
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostAllEffect(-1, -1, Duration.EndOfTurn, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE, false), false);
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_A_CREATURE_P1P1), rule));
|
||||
}
|
||||
|
||||
private FoundryHornet(final FoundryHornet card) {
|
||||
|
|
|
@ -14,9 +14,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -32,18 +31,12 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GOTOJAIL extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public GOTOJAIL(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
|
||||
|
||||
// When GO TO JAIL enters the battlefield, exile target creature an opponent controls until GO TO JAIL leaves the battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GoToJailExileEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -9,9 +9,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -19,12 +18,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
*/
|
||||
public final class GideonsAvenger extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public GideonsAvenger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
@ -34,7 +27,7 @@ public final class GideonsAvenger extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever a creature an opponent controls becomes tapped, put a +1/+1 counter on Gideon's Avenger.
|
||||
this.addAbility(new BecomesTappedTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter));
|
||||
this.addAbility(new BecomesTappedTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_OPPONENTS_PERMANENT_A_CREATURE));
|
||||
}
|
||||
|
||||
private GideonsAvenger(final GideonsAvenger card) {
|
||||
|
|
|
@ -15,8 +15,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -28,12 +27,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class GildedDrake extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public GildedDrake(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.subtype.add(SubType.DRAKE);
|
||||
|
@ -47,7 +40,7 @@ public final class GildedDrake extends CardImpl {
|
|||
// This ability can't be countered except by spells and abilities.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GildedDrakeEffect());
|
||||
ability.setCanFizzle(false);
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 1, filter, false));
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 1, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE, false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -21,12 +21,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author fireshoes
|
||||
*/
|
||||
public final class GlaringAegis extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public GlaringAegis(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}");
|
||||
|
@ -41,7 +35,7 @@ public final class GlaringAegis extends CardImpl {
|
|||
|
||||
// When Glaring Aegis enters the battlefield, tap target creature an opponent controls.
|
||||
Ability ability2 = new EntersBattlefieldTriggeredAbility(new TapTargetEffect());
|
||||
ability2.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability2.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability2);
|
||||
|
||||
// Enchanted creature gets +1/+3.
|
||||
|
|
|
@ -14,7 +14,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -31,7 +31,7 @@ public final class Glory extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {2}{W}: Choose a color. Creatures you control gain protection from the chosen color until end of turn. Activate this ability only if Glory is in your graveyard.
|
||||
Effect effect = new GainProtectionFromColorAllEffect(Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you control"));
|
||||
Effect effect = new GainProtectionFromColorAllEffect(Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES);
|
||||
effect.setText("Choose a color. Creatures you control gain protection from the chosen color until end of turn. Activate only if {this} is in your graveyard.");
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, effect, new ManaCostsImpl("{2}{W}")));
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -24,12 +23,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GnarlidColony extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public GnarlidColony(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
||||
|
@ -48,9 +41,10 @@ public final class GnarlidColony extends CardImpl {
|
|||
|
||||
// Each creature you control with a +1/+1 counter on it has trample.
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
|
||||
TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter,
|
||||
"Each creature you control with a +1/+1 counter on it has trample"
|
||||
)));
|
||||
TrampleAbility.getInstance(),
|
||||
Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1))
|
||||
);
|
||||
}
|
||||
|
||||
private GnarlidColony(final GnarlidColony card) {
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -47,8 +47,6 @@ public final class GriffinCanyon extends CardImpl {
|
|||
}
|
||||
|
||||
class GriffinCanyonEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature");
|
||||
|
||||
public GriffinCanyonEffect() {
|
||||
super(Outcome.Benefit);
|
||||
|
@ -69,7 +67,7 @@ class GriffinCanyonEffect extends OneShotEffect {
|
|||
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
|
||||
if (targetCreature != null) {
|
||||
targetCreature.untap(game);
|
||||
if (filter.match(targetCreature, game)) {
|
||||
if (StaticFilters.FILTER_PERMANENT_A_CREATURE.match(targetCreature, game)) {
|
||||
game.addEffect(new BoostTargetEffect(1, 1, Duration.EndOfTurn), source);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -8,8 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -22,19 +21,13 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public final class GrimContest extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public GrimContest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{G}");
|
||||
|
||||
// Choose target creature you control and target creature an opponent controls. Each of those creatures deals damage equal to its toughness to the other.
|
||||
this.getSpellAbility().addEffect(new GrimContestEffect());
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
}
|
||||
|
||||
private GrimContest(final GrimContest card) {
|
||||
|
|
|
@ -8,19 +8,12 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class GrowingRanks extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public GrowingRanks(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G/W}{G/W}");
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -27,12 +27,6 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public final class GuardianOfTazeem extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public GuardianOfTazeem(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
|
||||
this.subtype.add(SubType.SPHINX);
|
||||
|
@ -44,7 +38,7 @@ public final class GuardianOfTazeem extends CardImpl {
|
|||
|
||||
// <i>Landfall</i> — Whenever a land enters the battlefield under you control, tap target creature an opponent controls. If that land is an Island, that creature doesn't untap during its controller's next untap step.
|
||||
Ability ability = new GuardianOfTazeemTriggeredAbility();
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -27,11 +26,6 @@ import java.util.UUID;
|
|||
|
||||
public final class HaazdaSnareSquad extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public HaazdaSnareSquad (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
@ -43,7 +37,7 @@ public final class HaazdaSnareSquad extends CardImpl {
|
|||
// Whenever Haazda Snare Squad attacks you may pay {W}. If you do, tap target creature an opponent controls.
|
||||
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new TapTargetEffect(), new ManaCostsImpl("{W}")),false,
|
||||
"Whenever {this} attacks, you may pay {W}. If you do, tap target creature an opponent controls.");
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
Target target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -22,12 +21,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class HagraConstrictor extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public HagraConstrictor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
|
||||
|
@ -43,7 +36,9 @@ public final class HagraConstrictor extends CardImpl {
|
|||
|
||||
// Each creature you control with a +1/+1 counter on it has menace.
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
|
||||
new MenaceAbility(), Duration.WhileOnBattlefield, filter,
|
||||
new MenaceAbility(),
|
||||
Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1,
|
||||
"Each creature you control with a +1/+1 counter on it has menace. " +
|
||||
"<i>(A creature with menace can't be blocked except by two or more creatures.)</i>"
|
||||
)));
|
||||
|
|
|
@ -14,9 +14,7 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
|
@ -27,14 +25,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class HamzaGuardianOfArashin extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1);
|
||||
private static final Hint hint = new ValueHint("Creatures you control with +1/+1 counter on them", xValue);
|
||||
|
||||
public HamzaGuardianOfArashin(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,12 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class HeavyInfantry extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public HeavyInfantry(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
@ -35,7 +28,7 @@ public final class HeavyInfantry extends CardImpl {
|
|||
|
||||
// When Heavy Infantry enters the battlefield, tap target creature an opponent controls.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@ import mage.constants.AttachmentType;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -28,11 +27,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class HeliodsEmissary extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public HeliodsEmissary(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{W}");
|
||||
this.subtype.add(SubType.ELK);
|
||||
|
@ -44,11 +38,11 @@ public final class HeliodsEmissary extends CardImpl {
|
|||
this.addAbility(new BestowAbility(this, "{6}{W}"));
|
||||
// Whenever Heliod's Emissary or enchanted creature attacks, tap target creature an opponent controls.
|
||||
Ability ability = new AttacksTriggeredAbility(new TapTargetEffect(), false);
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
Target target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
ability = new AttacksAttachedTriggeredAbility(new TapTargetEffect(), AttachmentType.AURA, false);
|
||||
target = new TargetCreaturePermanent(filter);
|
||||
target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
// Enchanted creature gets +3/+3.
|
||||
|
|
|
@ -15,8 +15,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -24,11 +23,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author JotaPeRL
|
||||
*/
|
||||
public final class HeliumSquirter extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with a +1/+1 counter on it");
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public HeliumSquirter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
|
||||
|
@ -42,7 +36,7 @@ public final class HeliumSquirter extends CardImpl {
|
|||
|
||||
// {1}: Target creature with a +1/+1 counter on it gains flying until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(1));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_P1P1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -31,7 +31,7 @@ public final class HeroOfGomaFada extends CardImpl {
|
|||
// <i>Rally</i> — Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn.
|
||||
Ability ability = new AllyEntersBattlefieldTriggeredAbility(
|
||||
new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn,
|
||||
new FilterControlledCreaturePermanent("creatures you control")), false);
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURES), false);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -28,12 +27,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author emerald000
|
||||
*/
|
||||
public final class HighSentinelsOfArashin extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creature you control with a +1/+1 counter on it");
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public HighSentinelsOfArashin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
|
||||
|
@ -47,7 +40,7 @@ public final class HighSentinelsOfArashin extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// High Sentinels of Arashin gets +1/+1 for each other creature you control with a +1/+1 counter on it.
|
||||
DynamicValue count = new PermanentsOnBattlefieldCount(filter);
|
||||
DynamicValue count = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_OTHER_CONTROLLED_CREATURE_P1P1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield)));
|
||||
|
||||
// {3}{W}: Put a +1/+1 counter on target creature.
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
|
@ -28,12 +28,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class IcefallRegent extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public IcefallRegent(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
|
@ -43,10 +37,11 @@ public final class IcefallRegent extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Icefall Regent enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's untap step for as long as you control Icefall Regent.
|
||||
// When Icefall Regent enters the battlefield, tap target creature an opponent controls.
|
||||
// That creature doesn't untap during its controller's untap step for as long as you control Icefall Regent.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
|
||||
ability.addEffect(new IcefallRegentEffect());
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
Target target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability, new IcefallRegentWatcher());
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEf
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -24,7 +24,7 @@ public final class IllusionistsStratagem extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(false)
|
||||
.withReturnNames("those cards", "their owner's").concatBy(", then"));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2,
|
||||
new FilterControlledCreaturePermanent("creatures you control"), false));
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURES, false));
|
||||
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
|
|
|
@ -11,7 +11,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -25,7 +25,7 @@ public final class ImpactTremors extends CardImpl {
|
|||
// Whenever a creature enters the battlefield under your control, Impact Tremors deals 1 damage to each opponent.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new DamagePlayersEffect(Outcome.Damage, StaticValue.get(1), TargetController.OPPONENT),
|
||||
new FilterCreaturePermanent("a creature"),
|
||||
StaticFilters.FILTER_PERMANENT_A_CREATURE,
|
||||
false));
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -22,16 +23,13 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
*/
|
||||
public final class InTheWebOfWar extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature");
|
||||
|
||||
public InTheWebOfWar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}{R}");
|
||||
|
||||
|
||||
// Whenever a creature enters the battlefield under your control, it gets +2/+0 and gains haste until end of turn.
|
||||
Effect effect = new BoostTargetEffect(2,0, Duration.EndOfTurn);
|
||||
effect.setText("it gets +2/+0");
|
||||
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, false, SetTargetPointer.PERMANENT, null);
|
||||
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_PERMANENT_A_CREATURE, false, SetTargetPointer.PERMANENT, null);
|
||||
effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("and gains haste until end of turn");
|
||||
ability.addEffect(effect);
|
||||
|
|
|
@ -7,8 +7,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -17,26 +16,17 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class InactionInjunction extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public InactionInjunction(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}");
|
||||
|
||||
|
||||
|
||||
// Detain target creature an opponent controls.
|
||||
// (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
||||
this.getSpellAbility().addEffect(new DetainTargetEffect());
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
|
||||
}
|
||||
|
||||
private InactionInjunction(final InactionInjunction card) {
|
||||
|
|
|
@ -11,8 +11,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -20,19 +19,18 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
*/
|
||||
public final class InspiringCall extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public InspiringCall(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}");
|
||||
|
||||
// Draw a card for each creature you control with a +1/+1 counter on it. Those creatures gain indestructible until end of turn. <i>(Damage and effects that say "destroy" don't destroy them.)
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter)));
|
||||
Effect effect = new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, filter);
|
||||
effect.setText("Those creatures gain indestructible until end of turn. <i>(Damage and effects that say \"destroy\" don't destroy them.)</i>");
|
||||
// Draw a card for each creature you control with a +1/+1 counter on it.
|
||||
// Those creatures gain indestructible until end of turn.
|
||||
// <i>(Damage and effects that say "destroy" don't destroy them.)
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(
|
||||
new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1)));
|
||||
Effect effect = new GainAbilityControlledEffect(
|
||||
IndestructibleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1);
|
||||
effect.setText("Those creatures gain indestructible until end of turn. " +
|
||||
"<i>(Damage and effects that say \"destroy\" don't destroy them.)</i>");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -27,7 +27,7 @@ public final class IntruderAlarm extends CardImpl {
|
|||
// Creatures don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, FILTER_PERMANENT_CREATURES)));
|
||||
// Whenever a creature enters the battlefield, untap all creatures.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllEffect(FILTER_PERMANENT_CREATURES), new FilterCreaturePermanent("a creature")));
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllEffect(FILTER_PERMANENT_CREATURES), StaticFilters.FILTER_PERMANENT_A_CREATURE));
|
||||
}
|
||||
|
||||
private IntruderAlarm(final IntruderAlarm card) {
|
||||
|
|
|
@ -11,8 +11,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,12 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public final class IsperiasSkywatch extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public IsperiasSkywatch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}");
|
||||
|
@ -41,7 +34,7 @@ public final class IsperiasSkywatch extends CardImpl {
|
|||
// When Isperia's Skywatch enters the battlefield, detain target creature an opponent controls.
|
||||
// (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DetainTargetEffect());
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -19,12 +18,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
*/
|
||||
public final class IvorytuskFortress extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public IvorytuskFortress(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{B}{G}");
|
||||
this.subtype.add(SubType.ELEPHANT);
|
||||
|
@ -33,7 +26,8 @@ public final class IvorytuskFortress extends CardImpl {
|
|||
this.toughness = new MageInt(7);
|
||||
|
||||
// Untap each creature you control with a +1/+1 counter on it during each other player's untap step.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new UntapAllDuringEachOtherPlayersUntapStepEffect(filter)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new UntapAllDuringEachOtherPlayersUntapStepEffect(StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1)));
|
||||
}
|
||||
|
||||
private IvorytuskFortress(final IvorytuskFortress card) {
|
||||
|
|
|
@ -14,8 +14,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -25,13 +24,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class JiangYangguWildcrafter extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("Each creature you control with a +1/+1 counter on it");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public JiangYangguWildcrafter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{G}");
|
||||
|
||||
|
@ -41,7 +33,7 @@ public final class JiangYangguWildcrafter extends CardImpl {
|
|||
|
||||
// Each creature you control with a +1/+1 counter on it has "{T}: Add one mana of any color."
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
new AnyColorManaAbility(), Duration.WhileOnBattlefield, filter
|
||||
new AnyColorManaAbility(), Duration.WhileOnBattlefield, StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1
|
||||
)));
|
||||
|
||||
// -1: Put a +1/+1 counter on target creature.
|
||||
|
|
|
@ -17,6 +17,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -56,12 +57,6 @@ public final class KalonianHydra extends CardImpl {
|
|||
|
||||
class KalonianHydraEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(CounterType.P1P1.getPredicate());
|
||||
}
|
||||
|
||||
public KalonianHydraEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "double the number of +1/+1 counters on each creature you control";
|
||||
|
@ -78,7 +73,7 @@ class KalonianHydraEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1, source.getControllerId(), source.getSourceId(), game);
|
||||
for (Permanent permanent : permanents) {
|
||||
int existingCounters = permanent.getCounters(game).getCount(CounterType.P1P1);
|
||||
if (existingCounters > 0) {
|
||||
|
|
|
@ -16,7 +16,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -38,7 +38,7 @@ public final class KeeperOfKeys extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, if you're the monarch, creatures you control can't be blocked this turn.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new CantBeBlockedAllEffect(new FilterControlledCreaturePermanent("creatures you control"), Duration.EndOfTurn),
|
||||
new CantBeBlockedAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURES, Duration.EndOfTurn),
|
||||
TargetController.YOU, false), MonarchIsSourceControllerCondition.instance,
|
||||
"At the beginning of your upkeep, if you're the monarch, creatures you control can't be blocked this turn."));
|
||||
}
|
||||
|
|
|
@ -12,11 +12,10 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -29,18 +28,11 @@ public final class KefnetsMonument extends CardImpl {
|
|||
|
||||
private static final FilterCard filter = new FilterCard("Blue creature spells");
|
||||
private static final FilterSpell filter2 = new FilterSpell("a creature spell");
|
||||
private static final FilterCreaturePermanent filter3 = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.and(new ColorPredicate(ObjectColor.BLUE), CardType.CREATURE.getPredicate()));
|
||||
}
|
||||
static {
|
||||
filter2.add(CardType.CREATURE.getPredicate());
|
||||
}
|
||||
static {
|
||||
filter3.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
|
||||
public KefnetsMonument(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
@ -52,7 +44,7 @@ public final class KefnetsMonument extends CardImpl {
|
|||
|
||||
// Whenever you cast a creature spell, target creature an opponent controls doesn't untap during its controller's next untap step.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect(), filter2, false);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter3));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -34,7 +34,7 @@ public final class KolaghanForerunners extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Kolaghan Forerunners' power is equal to the number of creatures you control.
|
||||
Effect effect = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("creatures you control")), Duration.EndOfGame);
|
||||
Effect effect = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURES), Duration.EndOfGame);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, effect).addHint(CreaturesYouControlHint.instance));
|
||||
|
||||
// Dash {2}{R} <i.(You may cast this spell for its dash cost. If you do it gains haste and it's returned to its owner's hand at the beginning of the next end step.)</i>
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,12 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class KorEntanglers extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public KorEntanglers(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
|
||||
this.subtype.add(SubType.KOR);
|
||||
|
@ -36,7 +29,7 @@ public final class KorEntanglers extends CardImpl {
|
|||
|
||||
// <i>Rally</i> — Whenever Kor Entanglers or another Ally enters the battlefield under your control, tap target creature an opponent controls.
|
||||
Ability ability = new AllyEntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
@ -10,8 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -20,12 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class KorHookmaster extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public KorHookmaster(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
|
||||
this.subtype.add(SubType.KOR);
|
||||
|
@ -38,7 +31,7 @@ public final class KorHookmaster extends CardImpl {
|
|||
// That creature doesn't untap during its controller's next untap step.
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect());
|
||||
ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue