* Replaced some filter objects by static filter.

This commit is contained in:
LevelX2 2020-07-03 13:58:08 +02:00
parent 299e664191
commit d4711b78d4
17 changed files with 35 additions and 33 deletions

View file

@ -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;
/**
*
@ -29,7 +29,7 @@ public final class AgentOfTheFates extends CardImpl {
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// Heroic - Whenever you cast a spell that targets Agent of the Fates, each opponent sacrifices a creature.
this.addAbility(new HeroicAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature"))));
this.addAbility(new HeroicAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
}
public AgentOfTheFates(final AgentOfTheFates card) {

View file

@ -7,7 +7,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
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;
/**
@ -21,7 +21,7 @@ public final class AltarsReap extends CardImpl {
// As an additional cost to cast Altar's Reap, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("a creature"), true)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true)));
// Draw two cards.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
}

View file

@ -13,7 +13,7 @@ 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.target.common.TargetControlledCreaturePermanent;
/**
@ -30,7 +30,7 @@ public final class ArcticMerfolk extends CardImpl {
this.toughness = new MageInt(1);
// KickerReturn a creature you control to its owner's hand. (You may return a creature you control to its owner's hand in addition to any other costs as you cast this spell.)
this.addAbility(new KickerAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"),true))));
this.addAbility(new KickerAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent(1,1,StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT,true))));
// If Arctic Merfolk was kicked, it enters the battlefield with a +1/+1 counter on it.
this.addAbility(new EntersBattlefieldAbility(

View file

@ -11,7 +11,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
/**
@ -36,7 +36,7 @@ public final class ButcherOfMalakir extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever Butcher of Malakir or another creature you control dies, each opponent sacrifices a creature.
this.addAbility(new DiesThisOrAnotherCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")), false, filter));
this.addAbility(new DiesThisOrAnotherCreatureTriggeredAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT), false, filter));
}
public ButcherOfMalakir(final ButcherOfMalakir card) {

View file

@ -18,6 +18,8 @@ import mage.target.common.TargetControlledCreaturePermanent;
import mage.util.CardUtil;
import java.util.UUID;
import mage.abilities.StaticAbility;
import mage.filter.StaticFilters;
/**
* @author jonubuu
@ -34,7 +36,7 @@ public final class CabalTherapy extends CardImpl {
// Flashback-Sacrifice a creature.
this.addAbility(new FlashbackAbility(
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true)),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true)),
TimingRule.SORCERY));
}

View file

@ -9,7 +9,7 @@ import mage.abilities.effects.common.LoseLifeTargetControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
@ -31,7 +31,7 @@ public final class DeathBomb extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}");
// As an additional cost to cast Death Bomb, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("a creature"), true)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true)));
// Destroy target nonblack creature. It can't be regenerated. Its controller loses 2 life.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addEffect(new LoseLifeTargetControllerEffect(2));

View file

@ -14,7 +14,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;
/**
*
@ -33,7 +33,7 @@ public final class DemonOfWailingAgonies extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Lieutenant - As long as you control your commander, Demon of Wailing Agonies gets +2/+2 and has "Whenever Demon of Wailing Agonies deals combat damage to a player, that player sacrifices a creature."
Ability gainedAbility = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeEffect(new FilterControlledCreaturePermanent("a creature"), 1, "that player"), false, true);
Ability gainedAbility = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, 1, "that player"), false, true);
ContinuousEffect effect = new GainAbilitySourceEffect(gainedAbility);
effect.setText("and has \"Whenever {this} deals combat damage to a player, that player sacrifices a creature.\"");
this.addAbility(new LieutenantAbility(effect));

View file

@ -15,7 +15,7 @@ import mage.constants.ComparisonType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -33,7 +33,7 @@ public final class EldritchEvolution extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}{G}");
// As an additional cost to cast Eldritch Evolution, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true)));
// Search your library for a creature card with converted mana cost X or less, where X is 2 plus the sacrificed creature's converted mana cost.
// Put that card onto the battlefield, then shuffle your library. Exile Eldritch Evolution.

View file

@ -12,7 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
/**
*
@ -34,7 +34,7 @@ public final class NefaroxOverlordOfGrixis extends CardImpl {
this.addAbility(new ExaltedAbility());
// Whenever Nefarox, Overlord of Grixis attacks alone, defending player sacrifices a creature.
this.addAbility(new AttacksAloneTriggeredAbility(new SacrificeEffect(
new FilterControlledCreaturePermanent("a creature"), 1, "defending player")));
StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, 1, "defending player")));
}
public NefaroxOverlordOfGrixis(final NefaroxOverlordOfGrixis card) {

View file

@ -14,7 +14,7 @@ import mage.abilities.effects.common.SacrificeOpponentsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
@ -31,7 +31,7 @@ public final class OathOfLiliana extends CardImpl {
addSuperType(SuperType.LEGENDARY);
// When Oath of Liliana enters the battlefield, each opponent sacrifices a creature.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")), false));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT), false));
// At the beginning of each end step, if a planeswalker entered the battlefield under your control this turn, create a 2/2 black Zombie creature token.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility(

View file

@ -15,7 +15,6 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.events.GameEvent;
@ -28,6 +27,7 @@ import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
* Once you announce you're casting Rescue from the Underworld, no player may
@ -57,7 +57,7 @@ public final class RescueFromTheUnderworld extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{B}");
// As an additional cost to cast Rescue from the Underworld, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), false)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, false)));
// Choose target creature card in your graveyard. Return that card and the sacrificed card to the battlefield under your control at the beginning of your next upkeep. Exile Rescue from the Underworld.
this.getSpellAbility().addEffect(new RescueFromTheUnderworldTextEffect());

View file

@ -10,7 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -27,7 +27,7 @@ public final class RiteOfConsumption extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// As an additional cost to cast Rite of Consumption, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), false)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, false)));
// Rite of Consumption deals damage equal to the sacrificed creature's power to target player. You gain life equal to the damage dealt this way.
this.getSpellAbility().addEffect(new RiteOfConsumptionEffect());
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());

View file

@ -8,7 +8,7 @@ import mage.abilities.effects.common.GainLifeEffect;
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 mage.target.common.TargetOpponentsCreaturePermanent;
@ -22,7 +22,7 @@ public final class SeveredStrands extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// As an additional cost to cast this spell, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true)));
// You gain life equal to the sacrificed creature's toughness. Destroy target creature an opponent controls.
this.getSpellAbility().addEffect(new GainLifeEffect(

View file

@ -7,7 +7,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
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;
/**
@ -20,7 +20,7 @@ public final class Skulltap extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}");
// As an additional cost to cast Skulltap, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true)));
// Draw two cards.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
}

View file

@ -15,7 +15,7 @@ import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.SetTargetPointer;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
/**
*
@ -33,7 +33,7 @@ public final class StormriderRig extends CardImpl {
// Whenever a creature enters the battlefield under your control, you may attach Stormrider Rig to it.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"),
new FilterControlledCreaturePermanent("a creature"), true, SetTargetPointer.PERMANENT, null, true));
StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true, SetTargetPointer.PERMANENT, null, true));
// Equip {2}
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2)));

View file

@ -10,7 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -28,7 +28,7 @@ public final class TormentedThoughts extends CardImpl {
// As an additional cost to cast Tormented Thoughts, sacrifice a creature.
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"), false)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, false)));
// Target player discards a number of cards equal to the sacrificed creature's power.
this.getSpellAbility().addEffect(new TormentedThoughtsDiscardEffect());

View file

@ -9,7 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
@ -71,7 +71,7 @@ class TyrantsChoiceEffect extends OneShotEffect {
}
}
if (deathCount > tortureCount) {
new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")).apply(game, source);
new SacrificeOpponentsEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT).apply(game, source);
} else {
new TyrantsChoiceLoseLifeEffect().apply(game, source);
}