Add static filter for 'nonblack creature'

This commit is contained in:
Alex W. Jackson 2021-12-11 15:30:15 -05:00
parent 62bc6ed848
commit ed47416972
67 changed files with 172 additions and 813 deletions

View file

@ -1,6 +1,5 @@
package mage.cards.a;
import mage.ObjectColor;
import mage.abilities.condition.common.KickedCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.dynamicvalue.common.TargetPermanentPowerCount;
@ -10,9 +9,7 @@ import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -22,12 +19,6 @@ import java.util.UUID;
*/
public final class AgonizingDemise extends CardImpl {
private static final FilterCreaturePermanent filterNonBlackCreature = new FilterCreaturePermanent("nonblack creature");
static {
filterNonBlackCreature.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public AgonizingDemise(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
@ -36,7 +27,7 @@ public final class AgonizingDemise extends CardImpl {
// Destroy target nonblack creature. It can't be regenerated.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterNonBlackCreature));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
// If Agonizing Demise was kicked, it deals damage equal to that creature's power to the creature's controller.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(

View file

@ -1,7 +1,6 @@
package mage.cards.a;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.common.SimpleStaticAbility;
@ -15,9 +14,9 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.Filter;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
@ -28,12 +27,6 @@ import java.util.UUID;
*/
public final class AngelOfJubilation extends CardImpl {
private static final FilterCreaturePermanent filterNonBlack = new FilterCreaturePermanent("nonblack creatures");
static {
filterNonBlack.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public AngelOfJubilation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}{W}");
this.subtype.add(SubType.ANGEL);
@ -44,7 +37,7 @@ public final class AngelOfJubilation extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Other nonblack creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterNonBlack, true)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES_NON_BLACK, true)));
// Players can't pay life or sacrifice creatures to cast spells or activate abilities.
Ability ability = new SimpleStaticAbility(new AngelOfJubilationEffect());

View file

@ -1,16 +1,12 @@
package mage.cards.a;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -19,18 +15,12 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class Annihilate extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Annihilate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}{B}");
// Destroy target nonblack creature. It can't be regenerated.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}

View file

@ -1,8 +1,6 @@
package mage.cards.a;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SacrificeIfCastAtInstantTimeTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
@ -13,9 +11,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.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -25,12 +21,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class ArmorOfThorns extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public ArmorOfThorns(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
this.subtype.add(SubType.AURA);
@ -39,7 +29,7 @@ public final class ArmorOfThorns extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.ALL, new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame)));
this.addAbility(new SacrificeIfCastAtInstantTimeTriggeredAbility());
// Enchant nonblack creature
TargetPermanent auraTarget = new TargetCreaturePermanent(filter);
TargetPermanent auraTarget = new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK);
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());

View file

@ -1,8 +1,6 @@
package mage.cards.a;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -11,10 +9,7 @@ import mage.cards.CardImpl;
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.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
@ -24,19 +19,13 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class Attrition extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Attrition(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}");
//{B}, Sacrifice a creature: Destroy target nonblack creature.
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{B}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,8 +1,6 @@
package mage.cards.b;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
@ -14,9 +12,8 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -27,12 +24,10 @@ import java.util.UUID;
*/
public final class BountyHunter extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature with a bounty counter on it");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with a bounty counter on it");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
filter2.add(CounterType.BOUNTY.getPredicate());
filter.add(CounterType.BOUNTY.getPredicate());
}
public BountyHunter(UUID ownerId, CardSetInfo setInfo) {
@ -43,11 +38,11 @@ public final class BountyHunter extends CardImpl {
// {tap}: Put a bounty counter on target nonblack creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
// {tap}: Destroy target creature with a bounty counter on it.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter2));
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
}

View file

@ -1,8 +1,6 @@
package mage.cards.c;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
@ -15,9 +13,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.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -27,18 +23,12 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class CallToServe extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public CallToServe(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
this.subtype.add(SubType.AURA);
// Enchant nonblack creature
TargetPermanent auraTarget = new TargetCreaturePermanent(filter);
TargetPermanent auraTarget = new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK);
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());

View file

@ -1,6 +1,5 @@
package mage.cards.c;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
import mage.abilities.effects.common.AttachEffect;
@ -11,9 +10,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -24,12 +21,6 @@ import java.util.UUID;
*/
public final class ChimeOfNight extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public ChimeOfNight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
@ -44,7 +35,7 @@ public final class ChimeOfNight extends CardImpl {
// When Chime of Night is put into a graveyard from the battlefield, destroy target nonblack creature.
ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DestroyTargetEffect());
ability.addTarget(new TargetPermanent(filter));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,16 +1,12 @@
package mage.cards.c;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.permanent.token.EldraziSpawnToken;
import mage.target.common.TargetCreaturePermanent;
@ -20,17 +16,10 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class Corpsehatch extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Corpsehatch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}");
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new CreateTokenEffect(new EldraziSpawnToken(), 2));
}

View file

@ -1,17 +1,13 @@
package mage.cards.c;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Mode;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.Target;
import mage.target.TargetPermanent;
import mage.target.common.TargetArtifactPermanent;
@ -23,22 +19,16 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class CrosissCharm extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public CrosissCharm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{B}{R}");
// Choose one - Return target permanent to its owner's hand;
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent());
// or destroy target nonblack creature, and it can't be regenerated;
Mode mode = new Mode();
mode.addEffect(new DestroyTargetEffect(true));
mode.addTarget(new TargetCreaturePermanent(filter));
mode.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addMode(mode);
// or destroy target artifact.
mode = new Mode();

View file

@ -1,9 +1,7 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -11,9 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -23,13 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class DakmorLancer extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DakmorLancer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}");
this.subtype.add(SubType.HUMAN);
@ -39,7 +28,7 @@ public final class DakmorLancer extends CardImpl {
// When Dakmor Lancer enters the battlefield, destroy target nonblack creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,15 +1,11 @@
package mage.cards.d;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -18,17 +14,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class DarkBanishing extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DarkBanishing(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}");
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private DarkBanishing(final DarkBanishing card) {

View file

@ -1,10 +1,7 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -13,9 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -24,11 +19,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class DarkHatchling extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DarkHatchling (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}");
this.subtype.add(SubType.HORROR);
@ -41,7 +31,7 @@ public final class DarkHatchling extends CardImpl {
// When Dark Hatchling enters the battlefield, destroy target nonblack creature. It can't be regenerated.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(true));
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,16 +1,12 @@
package mage.cards.d;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -18,12 +14,6 @@ import mage.target.common.TargetCreaturePermanent;
* @author fireshoes
*/
public final class DarkOffering extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DarkOffering(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}");
@ -31,7 +21,7 @@ public final class DarkOffering extends CardImpl {
// Destroy target nonblack creature. You gain 3 life.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new GainLifeEffect(3));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private DarkOffering(final DarkOffering card) {

View file

@ -1,17 +1,13 @@
package mage.cards.d;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.MadnessAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -20,18 +16,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class DarkWithering extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DarkWithering(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}{B}");
// Destroy target nonblack creature.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
// Madness {B}

View file

@ -1,15 +1,12 @@
package mage.cards.d;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.Target;
@ -21,18 +18,12 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class DeadRingers extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DeadRingers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
// Destroy two target nonblack creatures unless either one is a color the other isn't. They can't be regenerated.
this.getSpellAbility().addEffect(new DeadRingersEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, filter, false));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK, false));
}
private DeadRingers(final DeadRingers card) {

View file

@ -1,8 +1,6 @@
package mage.cards.d;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.LoseLifeTargetControllerEffect;
@ -10,9 +8,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
@ -22,20 +17,15 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class DeathBomb extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DeathBomb(UUID ownerId, CardSetInfo setInfo) {
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, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true)));
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
// 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));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private DeathBomb(final DeathBomb card) {

View file

@ -1,17 +1,13 @@
package mage.cards.d;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.dynamicvalue.common.TargetManaValue;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.permanent.token.SaprolingToken;
import mage.target.TargetPermanent;
@ -21,19 +17,12 @@ import mage.target.TargetPermanent;
*/
public final class DeathMutation extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DeathMutation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{6}{B}{G}");
// Destroy target nonblack creature. It can't be regenerated.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetPermanent(filter));
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
// create X 1/1 green Saproling creature tokens, where X is that creature's converted mana cost.
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), TargetManaValue.instance));
}

View file

@ -1,9 +1,7 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.BlocksOrBecomesBlockedSourceTriggeredAbility;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
import mage.abilities.effects.Effect;
@ -13,9 +11,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
/**
*
@ -23,12 +19,6 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class Deathgazer extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Deathgazer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.LIZARD);
@ -39,7 +29,7 @@ public final class Deathgazer extends CardImpl {
// Whenever Deathgazer blocks or becomes blocked by a nonblack creature, destroy that creature at end of combat.
Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true);
effect.setText("destroy that creature at end of combat");
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, filter, false));
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK, false));
}

View file

@ -1,16 +1,11 @@
package mage.cards.d;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -19,16 +14,10 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class DoomBlade extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DoomBlade(UUID ownerId, CardSetInfo setInfo){
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}");
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
}

View file

@ -1,9 +1,7 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.BlocksOrBecomesBlockedSourceTriggeredAbility;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
import mage.abilities.effects.Effect;
@ -13,9 +11,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
/**
*
@ -23,12 +19,6 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class DreadSpecter extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public DreadSpecter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.SPECTER);
@ -38,7 +28,7 @@ public final class DreadSpecter extends CardImpl {
// Whenever Dread Specter blocks or becomes blocked by a nonblack creature, destroy that creature at end of combat.
Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true);
effect.setText("destroy that creature at end of combat");
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, filter, false));
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK, false));
}
private DreadSpecter(final DreadSpecter card) {

View file

@ -1,6 +1,5 @@
package mage.cards.d;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -8,9 +7,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetadjustment.TargetAdjuster;
@ -25,7 +22,6 @@ public final class DregsOfSorrow extends CardImpl {
public DregsOfSorrow(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{4}{B}");
// Destroy X target nonblack creatures. Draw X cards.
this.getSpellAbility().addEffect(new DestroyTargetEffect("Destroy X target nonblack creatures"));
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(ManacostVariableValue.REGULAR));
@ -44,16 +40,11 @@ public final class DregsOfSorrow extends CardImpl {
enum DregsOfSorrowAdjuster implements TargetAdjuster {
instance;
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creatures");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
@Override
public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear();
int xValue = ability.getManaCostsToPay().getX();
ability.addTarget(new TargetCreaturePermanent(xValue, xValue, filter, false));
ability.addTarget(new TargetCreaturePermanent(xValue, xValue, StaticFilters.FILTER_PERMANENT_CREATURES_NON_BLACK, false));
}
}
}

View file

@ -1,15 +1,11 @@
package mage.cards.e;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.ExileTargetAndSearchGraveyardHandLibraryEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -17,19 +13,13 @@ import mage.target.common.TargetCreaturePermanent;
* @author LevelX2
*/
public final class Eradicate extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Eradicate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}");
// Exile target nonblack creature. Search its controller's graveyard, hand, and library for all cards
// with the same name as that creature and exile them. Then that player shuffles their library.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new ExileTargetAndSearchGraveyardHandLibraryEffect(false, "its controller's","all cards with the same name as that creature"));
}
@ -42,5 +32,3 @@ public final class Eradicate extends CardImpl {
return new Eradicate(this);
}
}

View file

@ -1,8 +1,6 @@
package mage.cards.e;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
@ -12,9 +10,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -23,20 +19,13 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class ExecutionersCapsule extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public ExecutionersCapsule(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{B}");
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{B}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -3,7 +3,6 @@ package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.Cost;
@ -16,9 +15,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
@ -31,12 +28,6 @@ import mage.util.CardUtil;
*/
public final class GarzasAssassin extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public GarzasAssassin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}{B}");
this.subtype.add(SubType.HUMAN);
@ -46,7 +37,7 @@ public final class GarzasAssassin extends CardImpl {
// Sacrifice Garza's Assassin: Destroy target nonblack creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
// RecoverPay half your life, rounded up.

View file

@ -1,17 +1,13 @@
package mage.cards.g;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.Target;
@ -24,17 +20,11 @@ import mage.target.targetpointer.FirstTargetPointer;
*/
public final class GhastlyDemise extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature if its tougness is less than the number of cards in your graveyard");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public GhastlyDemise(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}");
// Destroy target nonblack creature if its toughness is less than or equal to the number of cards in your graveyard.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new GhastlyDemiseEffect(false));
}

View file

@ -1,15 +1,11 @@
package mage.cards.g;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -18,18 +14,12 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class GhostlyVisit extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public GhostlyVisit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
// Destroy target nonblack creature.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private GhostlyVisit(final GhostlyVisit card) {

View file

@ -1,9 +1,7 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
@ -19,9 +17,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
/**
*
@ -29,12 +25,6 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class Gloomdrifter extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creatures");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Gloomdrifter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
this.subtype.add(SubType.ZOMBIE);
@ -47,7 +37,7 @@ public final class Gloomdrifter extends CardImpl {
// Threshold - As long as seven or more cards are in your graveyard, Gloomdrifter has "When Gloomdrifter enters the battlefield, nonblack creatures get -2/-2 until end of turn."
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new GainAbilitySourceEffect(new EntersBattlefieldTriggeredAbility(
new BoostAllEffect(-2, -2, Duration.EndOfTurn, filter, false))),
new BoostAllEffect(-2, -2, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES_NON_BLACK, false))),
new CardsInControllerGraveyardCondition(7),
"As long as seven or more cards are in your graveyard, {this} has \"When {this} enters the battlefield, nonblack creatures get -2/-2 until end of turn.\""));
ability.setAbilityWord(AbilityWord.THRESHOLD);

View file

@ -1,9 +1,7 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.BlocksOrBecomesBlockedSourceTriggeredAbility;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -15,9 +13,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
/**
*
@ -25,12 +21,6 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class GorgonRecluse extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public GorgonRecluse(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
this.subtype.add(SubType.GORGON);
@ -40,7 +30,7 @@ public final class GorgonRecluse extends CardImpl {
// Whenever Gorgon Recluse blocks or becomes blocked by a nonblack creature, destroy that creature at end of combat.
Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true);
effect.setText("destroy that creature at end of combat");
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, filter, false));
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(effect, StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK, false));
// Madness {B}{B}
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{B}{B}")));

View file

@ -1,8 +1,6 @@
package mage.cards.g;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.effects.Effect;
@ -14,9 +12,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SetTargetPointer;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -25,17 +21,12 @@ import mage.game.permanent.Permanent;
* @author emerald000
*/
public final class GravePeril extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public GravePeril(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
// When a nonblack creature enters the battlefield, sacrifice Grave Peril. If you do, destroy that creature.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GravePerilEffect(), filter, false, SetTargetPointer.PERMANENT, null));
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GravePerilEffect(), StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK, false, SetTargetPointer.PERMANENT, null).setTriggerPhrase("When a nonblack creature enters the battlefield, "));
}
private GravePeril(final GravePeril card) {
@ -49,21 +40,21 @@ public final class GravePeril extends CardImpl {
}
class GravePerilEffect extends OneShotEffect {
GravePerilEffect() {
super(Outcome.DestroyPermanent);
this.staticText = "sacrifice Grave Peril. If you do, destroy that creature";
}
GravePerilEffect(final GravePerilEffect effect) {
super(effect);
}
@Override
public GravePerilEffect copy() {
return new GravePerilEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game);

View file

@ -1,15 +1,11 @@
package mage.cards.h;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -18,18 +14,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class HandOfDeath extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public HandOfDeath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
// Destroy target nonblack creature.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
}

View file

@ -1,8 +1,6 @@
package mage.cards.h;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageControllerEffect;
@ -11,9 +9,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -62,9 +58,7 @@ class HellfireEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int destroyedCreature = 0;
FilterCreaturePermanent filter = new FilterCreaturePermanent("all nonblack creatures");
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
for (Permanent creature : game.getState().getBattlefield().getActivePermanents(filter, controller.getId(), game)) {
for (Permanent creature : game.getState().getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES_NON_BLACK, controller.getId(), game)) {
if (creature.destroy(source, game, false)
&& game.getState().getZone(creature.getId()) == Zone.GRAVEYARD) { // If a commander is replaced to command zone, the creature does not die) {
destroyedCreature++;

View file

@ -1,16 +1,12 @@
package mage.cards.h;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.LoseLifeTargetControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -19,18 +15,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class HideousEnd extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public HideousEnd(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{B}");
// Destroy target nonblack creature. Its controller loses 2 life.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new LoseLifeTargetControllerEffect(2));
}

View file

@ -1,7 +1,5 @@
package mage.cards.h;
import mage.ObjectColor;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.common.ExileFromGraveCost;
import mage.abilities.decorator.ConditionalOneShotEffect;
@ -12,10 +10,8 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
@ -27,11 +23,9 @@ import java.util.UUID;
*/
public final class HorobisWhisper extends CardImpl {
private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("nonblack creature");
private static final FilterLandPermanent filterCondition = new FilterLandPermanent("Swamp");
static {
filterTarget.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
filterCondition.add(SubType.SWAMP.getPredicate());
}
@ -39,16 +33,13 @@ public final class HorobisWhisper extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{B}");
this.subtype.add(SubType.ARCANE);
// If you control a Swamp, destroy target nonblack creature.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DestroyTargetEffect(),
new PermanentsOnTheBattlefieldCondition(filterCondition),"If you control a Swamp, destroy target nonblack creature"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterTarget) );
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
// Splice onto Arcane-Exile four cards from your graveyard.
this.addAbility(new SpliceOntoArcaneAbility(new ExileFromGraveCost(new TargetCardInYourGraveyard(4,4, new FilterCard("cards")))));
}

View file

@ -1,4 +1,3 @@
package mage.cards.k;
import java.util.UUID;
@ -7,8 +6,8 @@ import mage.abilities.effects.common.DamageAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
/**
@ -17,20 +16,18 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class KaerveksHex extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("green creature");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("green creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
filter2.add(new ColorPredicate(ObjectColor.GREEN));
filter.add(new ColorPredicate(ObjectColor.GREEN));
}
public KaerveksHex(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
// Kaervek's Hex deals 1 damage to each nonblack creature and an additional 1 damage to each green creature.
this.getSpellAbility().addEffect(new DamageAllEffect(1, filter));
this.getSpellAbility().addEffect(new DamageAllEffect(1, filter2).setText("and an additional 1 damage to each green creature"));
this.getSpellAbility().addEffect(new DamageAllEffect(1, StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DamageAllEffect(1, filter).setText("and an additional 1 damage to each green creature"));
}
private KaerveksHex(final KaerveksHex card) {

View file

@ -1,4 +1,3 @@
package mage.cards.k;
import java.util.HashSet;
@ -6,7 +5,6 @@ import java.util.Set;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
@ -18,13 +16,11 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.FilterPlayer;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.StackObject;
@ -39,13 +35,9 @@ import mage.target.TargetPlayer;
public final class KeeperOfTheDead extends CardImpl {
private static final FilterPlayer filter = new FilterPlayer();
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("nonblack creature");
private static final FilterCard filter3 = new FilterCard("creature cards");
static {
filter.add(new KeeperOfDeadPredicate());
filter2.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
filter3.add(CardType.CREATURE.getPredicate());
}
public KeeperOfTheDead(UUID ownerId, CardSetInfo setInfo) {
@ -76,12 +68,6 @@ public final class KeeperOfTheDead extends CardImpl {
class KeeperOfDeadPredicate implements ObjectSourcePlayerPredicate<Player> {
private static final FilterCard filter = new FilterCard("creature cards");
static {
filter.add(CardType.CREATURE.getPredicate());
}
@Override
public boolean apply(ObjectSourcePlayer<Player> input, Game game) {
Player targetPlayer = input.getObject();
@ -96,8 +82,8 @@ class KeeperOfDeadPredicate implements ObjectSourcePlayerPredicate<Player> {
|| !controller.hasOpponent(targetPlayer.getId(), game)) {
return false;
}
int countGraveyardTargetPlayer = targetPlayer.getGraveyard().getCards(filter, game).size();
int countGraveyardController = controller.getGraveyard().getCards(filter, game).size();
int countGraveyardTargetPlayer = targetPlayer.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURES, game).size();
int countGraveyardController = controller.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURES, game).size();
return countGraveyardController >= countGraveyardTargetPlayer + 2;
}
@ -109,12 +95,6 @@ class KeeperOfDeadPredicate implements ObjectSourcePlayerPredicate<Player> {
class KeeperOfTheDeadCreatureTarget extends TargetPermanent {
private static final FilterCreaturePermanent nonblackCreaturefilter = new FilterCreaturePermanent("nonblack creature");
static {
nonblackCreaturefilter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public KeeperOfTheDeadCreatureTarget() {
super(1, 1, new FilterCreaturePermanent("nonblack creature that player controls"), false);
}
@ -152,7 +132,7 @@ class KeeperOfTheDeadCreatureTarget extends TargetPermanent {
UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget();
for (UUID targetId : availablePossibleTargets) {
Permanent permanent = game.getPermanent(targetId);
if (permanent != null && nonblackCreaturefilter.match(permanent, game) && permanent.isControlledBy(playerId)) {
if (permanent != null && StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK.match(permanent, game) && permanent.isControlledBy(playerId)) {
possibleTargets.add(targetId);
}
}

View file

@ -1,6 +1,5 @@
package mage.cards.m;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.condition.common.MorbidCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
@ -11,9 +10,7 @@ import mage.abilities.hint.common.MorbidHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -23,12 +20,6 @@ import java.util.UUID;
*/
public final class MaliciousAffliction extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creatures");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public MaliciousAffliction(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{B}");
@ -43,7 +34,7 @@ public final class MaliciousAffliction extends CardImpl {
// Destroy target nonblack creature.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private MaliciousAffliction(final MaliciousAffliction card) {

View file

@ -1,9 +1,7 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.abilities.keyword.WitherAbility;
@ -13,9 +11,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
/**
*
@ -23,12 +19,6 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class MidnightBanshee extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public MidnightBanshee(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}");
this.subtype.add(SubType.SPIRIT);
@ -38,7 +28,7 @@ public final class MidnightBanshee extends CardImpl {
this.addAbility(WitherAbility.getInstance());
// At the beginning of your upkeep, put a -1/-1 counter on each nonblack creature.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersAllEffect(CounterType.M1M1.createInstance(), filter), TargetController.YOU, false));
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersAllEffect(CounterType.M1M1.createInstance(), StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK), TargetController.YOU, false));
}
private MidnightBanshee(final MidnightBanshee card) {

View file

@ -1,8 +1,6 @@
package mage.cards.m;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.Cost;
@ -14,11 +12,8 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import mage.util.CardUtil;
@ -29,12 +24,6 @@ import mage.util.CardUtil;
*/
public final class MurderousBetrayal extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public MurderousBetrayal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}{B}");
@ -42,7 +31,7 @@ public final class MurderousBetrayal extends CardImpl {
Effect effect = new DestroyTargetEffect(true);
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new MurderousBetrayalCost());
ability.addCost(new ManaCostsImpl("{B}{B}"));
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,10 +1,8 @@
package mage.cards.m;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
@ -15,9 +13,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
@ -28,20 +24,14 @@ import mage.target.targetpointer.FixedTarget;
* @author wetterlicht
*/
public final class MurderousSpoils extends CardImpl {
private static final FilterCreaturePermanent FILTER = new FilterCreaturePermanent("nonblack creature");
static {
FILTER.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public MurderousSpoils(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{5}{B}");
// Destroy target nonblack creature. It can't be regenerated. You gain control of all Equipment that was attached to it.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(FILTER));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new MurderousSpoilsEffect());
}
private MurderousSpoils(final MurderousSpoils card) {

View file

@ -1,9 +1,7 @@
package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.KickedCostCondition;
@ -15,9 +13,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetLandPermanent;
@ -28,12 +24,6 @@ import mage.target.common.TargetLandPermanent;
*/
public final class NightscapeBattlemage extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("up to two nonblack creatures");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public NightscapeBattlemage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
this.subtype.add(SubType.ZOMBIE);
@ -47,7 +37,7 @@ public final class NightscapeBattlemage extends CardImpl {
this.addAbility(kickerAbility);
// When Nightscape Battlemage enters the battlefield, if it was kicked with its {2}{U} kicker, return up to two target nonblack creatures to their owners' hands.
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
ability.addTarget(new TargetCreaturePermanent(0, 2, filter, false));
ability.addTarget(new TargetCreaturePermanent(0, 2, StaticFilters.FILTER_PERMANENT_CREATURES_NON_BLACK, false));
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new KickedCostCondition("{2}{U}"),
"When {this} enters the battlefield, if it was kicked with its {2}{U} kicker, return up to two target nonblack creatures to their owners' hands."));
// When Nightscape Battlemage enters the battlefield, if it was kicked with its {2}{R} kicker, destroy target land.

View file

@ -1,9 +1,7 @@
package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
@ -15,9 +13,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -26,12 +22,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class NotoriousAssassin extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public NotoriousAssassin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
this.subtype.add(SubType.HUMAN);
@ -44,7 +34,7 @@ public final class NotoriousAssassin extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(true), new ManaCostsImpl("{2}{B}"));
ability.addCost(new TapSourceCost());
ability.addCost(new DiscardCardCost());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,16 +1,12 @@
package mage.cards.p;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetLandPermanent;
@ -21,12 +17,6 @@ import mage.target.common.TargetLandPermanent;
*/
public final class PlagueSpores extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public PlagueSpores(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{R}");
@ -34,7 +24,7 @@ public final class PlagueSpores extends CardImpl {
Effect effect = new DestroyTargetEffect(true, true);
effect.setText("Destroy target nonblack creature and target land. They can't be regenerated.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addTarget(new TargetLandPermanent());
}

View file

@ -1,16 +1,12 @@
package mage.cards.p;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -19,19 +15,13 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class PoisonArrow extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public PoisonArrow(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}");
// Destroy target nonblack creature. You gain 3 life.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new GainLifeEffect(3));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private PoisonArrow(final PoisonArrow card) {

View file

@ -2,16 +2,14 @@ package mage.cards.p;
import mage.MageObject;
import mage.MageObjectReference;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.WatcherScope;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
@ -25,18 +23,12 @@ import java.util.*;
*/
public final class PrematureBurial extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature that entered the battlefield since your last turn ended");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public PrematureBurial(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Destroy target nonblack creature that entered the battlefield since your last turn ended.
this.getSpellAbility().addEffect(new DestroyTargetEffect().setText("Destroy target nonblack creature that entered the battlefield since your last turn ended."));
this.getSpellAbility().addTarget(new ETBSinceYourLastTurnTarget(filter));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new ETBSinceYourLastTurnTarget(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addWatcher(new ETBSinceYourLastTurnWatcher());
}
@ -123,4 +115,4 @@ class ETBSinceYourLastTurnWatcher extends Watcher {
public boolean enteredSinceLastTurn(UUID player, MageObjectReference mor) {
return playerToETBMap.get(player).contains(mor);
}
}
}

View file

@ -1,9 +1,7 @@
package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
@ -16,9 +14,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -27,12 +23,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class PusKami extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public PusKami(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}");
this.subtype.add(SubType.SPIRIT);
@ -42,7 +32,7 @@ public final class PusKami extends CardImpl {
// {B}, Sacrifice Pus Kami: Destroy target nonblack creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.B));
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
this.addAbility(new SoulshiftAbility(6));
}

View file

@ -1,15 +1,11 @@
package mage.cards.r;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -20,17 +16,11 @@ import java.util.UUID;
*/
public final class RecklessSpite extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creatures");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public RecklessSpite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{B}");
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, filter, false));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, StaticFilters.FILTER_PERMANENT_CREATURES_NON_BLACK, false));
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(5));
}

View file

@ -1,8 +1,6 @@
package mage.cards.s;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
@ -11,9 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -21,17 +17,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class SealOfDoom extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SealOfDoom(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(true), new SacrificeSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,9 +1,7 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -11,9 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -21,12 +17,6 @@ import mage.target.common.TargetCreaturePermanent;
* @author fireshoes
*/
public final class SerpentAssassin extends CardImpl {
static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SerpentAssassin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}");
@ -37,7 +27,7 @@ public final class SerpentAssassin extends CardImpl {
// When Serpent Assassin enters the battlefield, you may destroy target nonblack creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true);
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,8 +1,6 @@
package mage.cards.s;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -10,9 +8,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -24,18 +20,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class SeverSoul extends CardImpl {
private static final FilterCreaturePermanent nonBlackCreature = new FilterCreaturePermanent("nonblack creature");
static {
nonBlackCreature.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SeverSoul(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}");
// Destroy target nonblack creature. It can't be regenerated.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(nonBlackCreature));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
// You gain life equal to its toughness.
this.getSpellAbility().addEffect(new GainLifeEqualToToughnessEffect());

View file

@ -1,9 +1,7 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.KickedCondition;
@ -14,9 +12,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -26,12 +22,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class ShivanEmissary extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public ShivanEmissary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
this.subtype.add(SubType.HUMAN);
@ -43,7 +33,7 @@ public final class ShivanEmissary extends CardImpl {
this.addAbility(new KickerAbility("{1}{B}"));
// When Shivan Emissary enters the battlefield, if it was kicked, destroy target nonblack creature. It can't be regenerated.
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(true));
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance,
"When {this} enters the battlefield, if it was kicked, destroy target nonblack creature. It can't be regenerated."));
}

View file

@ -1,9 +1,7 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.HateCondition;
@ -13,9 +11,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.LifeLossOtherFromCombatWatcher;
@ -25,12 +21,6 @@ import mage.watchers.common.LifeLossOtherFromCombatWatcher;
*/
public final class SithAssassin extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SithAssassin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.PUREBLOOD);
@ -43,7 +33,7 @@ public final class SithAssassin extends CardImpl {
new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true),
HateCondition.instance,
"<i>Hate</i> &mdash; When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, you may destroy target nonblack creature.");
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability, new LifeLossOtherFromCombatWatcher());
}

View file

@ -1,9 +1,7 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
@ -13,9 +11,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -24,12 +20,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class Skinthinner extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Skinthinner(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
this.subtype.add(SubType.ZOMBIE);
@ -40,7 +30,7 @@ public final class Skinthinner extends CardImpl {
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{B}{B}")));
// When Skinthinner is turned face up, destroy target nonblack creature. It can't be regenerated.
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DestroyTargetEffect(true));
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(ability);
}

View file

@ -1,17 +1,13 @@
package mage.cards.s;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.BuybackAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -20,12 +16,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class Slaughter extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Slaughter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}{B}");
@ -34,7 +24,7 @@ public final class Slaughter extends CardImpl {
// Destroy target nonblack creature. It can't be regenerated.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private Slaughter(final Slaughter card) {

View file

@ -1,8 +1,6 @@
package mage.cards.s;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.common.delayed.PactDelayedTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
@ -10,9 +8,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -20,20 +16,14 @@ import mage.target.common.TargetCreaturePermanent;
* @author Plopman
*/
public final class SlaughterPact extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SlaughterPact(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{0}");
this.color.setBlack(true);
// Destroy target nonblack creature.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
// At the beginning of your next upkeep, pay {2}{B}. If you don't, you lose the game.
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new PactDelayedTriggeredAbility(new ManaCostsImpl("{2}{B}")),false));

View file

@ -1,7 +1,5 @@
package mage.cards.s;
import mage.ObjectColor;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.PayLifeCost;
@ -10,10 +8,8 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -24,18 +20,15 @@ import java.util.UUID;
*/
public final class SnuffOut extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
private static final FilterLandPermanent filterSwamp = new FilterLandPermanent("If you control a Swamp");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
filterSwamp.add(SubType.SWAMP.getPredicate());
}
public SnuffOut(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}");
// If you control a Swamp, you may pay 4 life rather than pay Snuff Out's mana cost.
this.addAbility(new AlternativeCostSourceAbility(
new PayLifeCost(4),
@ -43,7 +36,7 @@ public final class SnuffOut extends CardImpl {
//
// Destroy target nonblack creature. It can't be regenerated.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private SnuffOut(final SnuffOut card) {

View file

@ -1,16 +1,12 @@
package mage.cards.s;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -18,19 +14,13 @@ import mage.target.common.TargetCreaturePermanent;
* @author fireshoes
*/
public final class SoulShred extends CardImpl {
static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SoulShred(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}");
// Soul Shred deals 3 damage to target nonblack creature. You gain 3 life.
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new GainLifeEffect(3));
}

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.Iterator;
@ -19,8 +18,7 @@ import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
@ -31,11 +29,6 @@ import mage.target.common.TargetCreaturePermanent;
* @author emerald000
*/
public final class SpinningDarkness extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SpinningDarkness(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}{B}");
@ -46,7 +39,7 @@ public final class SpinningDarkness extends CardImpl {
// Spinning Darkness deals 3 damage to target nonblack creature. You gain 3 life.
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
this.getSpellAbility().addEffect(new GainLifeEffect(3));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private SpinningDarkness(final SpinningDarkness card) {
@ -60,7 +53,7 @@ public final class SpinningDarkness extends CardImpl {
}
class SpinningDarknessCost extends CostImpl {
private static final FilterCard filter = new FilterCard("black card");
static {
filter.add(new ColorPredicate(ObjectColor.BLACK));

View file

@ -1,18 +1,13 @@
package mage.cards.s;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.SpellAbilityType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.TargetSpell;
import mage.target.common.TargetCreaturePermanent;
@ -22,30 +17,18 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class SpiteMalice extends SplitCard {
private static final FilterSpell filterNonCreatureSpell = new FilterSpell("noncreature spell");
static {
filterNonCreatureSpell.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
private static final FilterCreaturePermanent filterNonBlackCreature = new FilterCreaturePermanent("nonblack creature");
static {
filterNonBlackCreature.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SpiteMalice(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}", "{3}{B}", SpellAbilityType.SPLIT);
// Spite
// Counter target noncreature spell.
this.getLeftHalfCard().getSpellAbility().addEffect(new CounterTargetEffect());
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetSpell(filterNonCreatureSpell));
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_NON_CREATURE));
// Malice
// Destroy target nonblack creature. It can't be regenerated.
this.getRightHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(filterNonBlackCreature));
this.getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private SpiteMalice(final SpiteMalice card) {

View file

@ -1,9 +1,7 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.KickedCostCondition;
@ -15,9 +13,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -26,11 +22,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class StormscapeBattlemage extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public StormscapeBattlemage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
this.subtype.add(SubType.METATHRAN);
@ -49,13 +40,13 @@ public final class StormscapeBattlemage extends CardImpl {
new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3),false),
new KickedCostCondition("{W}"),
"When Stormscape Battlemage enters the battlefield, if it was kicked with its {W} kicker, you gain 3 life."));
// When Stormscape Battlemage enters the battlefield, if it was kicked with its {2}{B} kicker, destroy target nonblack creature. That creature can't be regenerated.
// When Stormscape Battlemage enters the battlefield, if it was kicked with its {2}{B} kicker, destroy target nonblack creature. That creature can't be regenerated.
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(true),false);
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
ability, new KickedCostCondition("{2}{B}"),
"When Stormscape Battlemage enters the battlefield, if it was kicked with its {2}{B} kicker, destroy target nonblack creature. That creature can't be regenerated."));
"When Stormscape Battlemage enters the battlefield, if it was kicked with its {2}{B} kicker, destroy target nonblack creature. That creature can't be regenerated."));
}
private StormscapeBattlemage(final StormscapeBattlemage card) {

View file

@ -1,9 +1,7 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
@ -14,10 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
@ -28,12 +23,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class StrongholdAssassin extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public StrongholdAssassin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.subtype.add(SubType.PHYREXIAN);
@ -45,8 +34,8 @@ public final class StrongholdAssassin extends CardImpl {
// {tap}, Sacrifice a creature: Destroy target nonblack creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
Target target = new TargetCreaturePermanent(filter);
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
Target target = new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK);
ability.addTarget(target);
this.addAbility(ability);
}

View file

@ -1,8 +1,6 @@
package mage.cards.t;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
@ -16,9 +14,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
@ -30,12 +26,6 @@ import mage.target.targetpointer.FixedTarget;
*/
public final class ToxicStench extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public ToxicStench(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
@ -51,7 +41,7 @@ public final class ToxicStench extends CardImpl {
new CardsInControllerGraveyardCondition(7),
"<br/><br/><i>Threshold</i> &mdash; If seven or more cards are in your graveyard, instead destroy that creature. It can't be regenerated."));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
}
private ToxicStench(final ToxicStench card) {

View file

@ -1,8 +1,6 @@
package mage.cards.v;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
@ -10,9 +8,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -24,18 +20,11 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class Vendetta extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public Vendetta(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}");
// Destroy target nonblack creature. It can't be regenerated. You lose life equal to that creature's toughness.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addEffect(new VendettaEffect());
}

View file

@ -1,17 +1,13 @@
package mage.cards.v;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.game.permanent.token.FaerieRogueToken;
import mage.target.common.TargetCreaturePermanent;
@ -21,18 +17,12 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class VioletPall extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public VioletPall(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{4}{B}");
this.subtype.add(SubType.FAERIE);
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK));
this.getSpellAbility().addEffect(new CreateTokenEffect(new FaerieRogueToken(), 1));
}

View file

@ -1,16 +1,12 @@
package mage.cards.w;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
/**
@ -18,19 +14,13 @@ import mage.target.common.TargetCreaturePermanent;
* @author fireshoes
*/
public final class WickedPact extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public WickedPact(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{B}");
// Destroy two target nonblack creatures. You lose 5 life.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, filter, false));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, StaticFilters.FILTER_PERMANENT_CREATURES_NON_BLACK, false));
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(5));
}

View file

@ -1,9 +1,7 @@
package mage.cards.z;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ExileFromGraveCost;
@ -16,9 +14,7 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.StaticFilters;
import mage.target.Target;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
@ -28,13 +24,6 @@ import mage.target.common.TargetCreaturePermanent;
* @author cbt33
*/
public final class ZombieAssassin extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
static {
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public ZombieAssassin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}");
@ -45,7 +34,7 @@ public final class ZombieAssassin extends CardImpl {
// {tap}, Exile two cards from your graveyard and Zombie Assassin: Destroy target nonblack creature. It can't be regenerated.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(true), new TapSourceCost());
Target target = new TargetCreaturePermanent(filter);
Target target = new TargetCreaturePermanent(StaticFilters.FILTER_PERMANENT_CREATURE_NON_BLACK);
ability.addTarget(target);
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(2,2,new FilterCard("cards from your graveyard"))));
ability.addCost(new ExileSourceCost());

View file

@ -1,5 +1,6 @@
package mage.filter;
import mage.ObjectColor;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
@ -7,6 +8,7 @@ import mage.constants.TargetController;
import mage.filter.common.*;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.mageobject.KickedSpellPredicate;
import mage.filter.predicate.mageobject.MulticoloredPredicate;
import mage.filter.predicate.other.AnotherTargetPredicate;
@ -569,6 +571,20 @@ public final class StaticFilters {
FILTER_PERMANENT_CREATURES_CONTROLLED.setLockedFilter(true);
}
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_NON_BLACK = new FilterCreaturePermanent("nonblack creature");
static {
FILTER_PERMANENT_CREATURE_NON_BLACK.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
FILTER_PERMANENT_CREATURE_NON_BLACK.setLockedFilter(true);
}
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES_NON_BLACK = new FilterCreaturePermanent("nonblack creatures");
static {
FILTER_PERMANENT_CREATURES_NON_BLACK.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
FILTER_PERMANENT_CREATURES_NON_BLACK.setLockedFilter(true);
}
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent(SubType.GOBLIN, "Goblin creatures");
static {