mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
[filters] Replaced color conditions with Predicates
This commit is contained in:
parent
ecf765ecf5
commit
13f744f09f
168 changed files with 618 additions and 697 deletions
|
@ -32,23 +32,24 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class SphinxOfTheSteelWind extends CardImpl<SphinxOfTheSteelWind> {
|
||||
private static FilterCard filter = new FilterCard("red and from green");
|
||||
private static final FilterCard filter = new FilterCard("red and from green");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.RED),
|
||||
new ColorPredicate(ObjectColor.GREEN)));
|
||||
}
|
||||
|
||||
public SphinxOfTheSteelWind (UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
@ -74,8 +75,7 @@ class BogGnarrTriggeredAbility extends TriggeredAbilityImpl<BogGnarrTriggeredAbi
|
|||
private static final FilterCard filter = new FilterCard("a black spell");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public BogGnarrTriggeredAbility() {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
@ -73,8 +74,7 @@ class GladeGnarrTriggeredAbility extends TriggeredAbilityImpl<GladeGnarrTriggere
|
|||
private static final FilterCard filter = new FilterCard("a black spell");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public GladeGnarrTriggeredAbility() {
|
||||
|
|
|
@ -39,6 +39,8 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
@ -52,9 +54,7 @@ public class AngelOfJubilation extends CardImpl<AngelOfJubilation> {
|
|||
private final static FilterCreaturePermanent filterNonBlack = new FilterCreaturePermanent("nonblack creatures");
|
||||
|
||||
static {
|
||||
filterNonBlack.setUseColor(true);
|
||||
filterNonBlack.setColor(ObjectColor.BLACK);
|
||||
filterNonBlack.setNotColor(true);
|
||||
filterNonBlack.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public AngelOfJubilation(UUID ownerId) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.UUID;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
|
@ -42,6 +43,8 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -50,12 +53,10 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class CallToServe extends CardImpl<CallToServe> {
|
||||
private static FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setNotColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public CallToServe(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
|
@ -41,6 +42,8 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.SoulshiftAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,9 +55,7 @@ public class PusKami extends CardImpl<PusKami> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setNotColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public PusKami(UUID ownerId) {
|
||||
|
|
|
@ -15,8 +15,8 @@ import mage.abilities.keyword.HasteAbility;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -90,8 +90,7 @@ class TokTokVolcanoBorn extends Token {
|
|||
private final static FilterCard filter = new FilterCard("red");
|
||||
|
||||
static {
|
||||
filter.setColor(ObjectColor.RED);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
TokTokVolcanoBorn() {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.abilities.effects.common.continious.SetCardColorTargetEffect;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetSpellOrPermanent;
|
||||
|
||||
|
@ -55,8 +56,7 @@ public class EightAndAHalfTale extends CardImpl<EightAndAHalfTale> {
|
|||
private final static FilterCard filter = new FilterCard("white");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public EightAndAHalfTale(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.Constants.AttachmentType;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedMatchesFilterCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
@ -44,8 +45,8 @@ import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
|
@ -64,9 +65,7 @@ public class TenzaGodosMaul extends CardImpl<TenzaGodosMaul> {
|
|||
|
||||
static {
|
||||
legendaryFilter.add(new SupertypePredicate("Legendary"));
|
||||
redFilter.getColor().setRed(true);
|
||||
redFilter.setUseColor(true);
|
||||
redFilter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
redFilter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public TenzaGodosMaul(UUID ownerId) {
|
||||
|
|
|
@ -32,12 +32,14 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -77,8 +79,7 @@ class BloodhallOozeTriggeredAbility1 extends TriggeredAbilityImpl<BloodhallOozeT
|
|||
private final static FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public BloodhallOozeTriggeredAbility1() {
|
||||
|
@ -118,8 +119,7 @@ class BloodhallOozeTriggeredAbility2 extends TriggeredAbilityImpl<BloodhallOozeT
|
|||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
static {
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public BloodhallOozeTriggeredAbility2() {
|
||||
|
|
|
@ -31,11 +31,12 @@ package mage.sets.conflux;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -47,10 +48,9 @@ public class CelestialPurge extends CardImpl<CelestialPurge> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("black or red permanent");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.BLACK),
|
||||
new ColorPredicate(ObjectColor.RED)));
|
||||
}
|
||||
|
||||
public CelestialPurge(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
|
@ -41,6 +42,7 @@ import mage.abilities.keyword.HasteAbility;
|
|||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,10 +53,8 @@ public class CliffrunnerBehemoth extends CardImpl<CliffrunnerBehemoth> {
|
|||
private static final FilterPermanent whitePermanentFilter = new FilterPermanent("white");
|
||||
|
||||
static {
|
||||
redPermanentFilter.setUseColor(true);
|
||||
redPermanentFilter.getColor().setRed(true);
|
||||
whitePermanentFilter.setUseColor(true);
|
||||
whitePermanentFilter.getColor().setWhite(true);
|
||||
redPermanentFilter.add(new ColorPredicate(ObjectColor.RED));
|
||||
whitePermanentFilter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,13 +32,15 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.SkipEnchantedUntapEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -51,10 +53,9 @@ public class ControlledInstincts extends CardImpl<ControlledInstincts> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("red or green creature");
|
||||
|
||||
static {
|
||||
filter.getColor().setRed(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setUseColor(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.RED),
|
||||
new ColorPredicate(ObjectColor.GREEN)));
|
||||
}
|
||||
|
||||
public ControlledInstincts(UUID ownerId) {
|
||||
|
|
|
@ -30,10 +30,12 @@ package mage.sets.conflux;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -91,8 +93,7 @@ class DarkTemperEffect extends OneShotEffect<DarkTemperEffect> {
|
|||
}
|
||||
|
||||
FilterPermanent filter = new FilterPermanent("black permanent");
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
|
||||
if (game.getBattlefield().countAll(filter, source.getControllerId(), game) == 0) {
|
||||
permanent.damage(2, source.getSourceId(), game, true, false);
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
|
@ -42,6 +43,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
|
|||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -50,8 +52,7 @@ public class EmberWeaver extends CardImpl<EmberWeaver> {
|
|||
private static final FilterPermanent redPermanentFilter = new FilterPermanent("red");
|
||||
|
||||
static {
|
||||
redPermanentFilter.setUseColor(true);
|
||||
redPermanentFilter.getColor().setRed(true);
|
||||
redPermanentFilter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public EmberWeaver(UUID ownerId) {
|
||||
|
|
|
@ -32,10 +32,11 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,9 +46,7 @@ public class GoblinOutlander extends CardImpl<GoblinOutlander> {
|
|||
private static final FilterCard filter = new FilterCard("white");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public GoblinOutlander(UUID ownerId) {
|
||||
|
|
|
@ -32,10 +32,11 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,9 +46,7 @@ public class NacatlOutlander extends CardImpl<NacatlOutlander> {
|
|||
private static final FilterCard filter = new FilterCard("blue");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlue(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
public NacatlOutlander(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
|
@ -40,6 +41,7 @@ import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
|||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,8 +52,7 @@ public class ToxicIguanar extends CardImpl<ToxicIguanar> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("green");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public ToxicIguanar(UUID ownerId) {
|
||||
|
|
|
@ -32,10 +32,11 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,9 +46,7 @@ public class ValeronOutlander extends CardImpl<ValeronOutlander> {
|
|||
private static final FilterCard filter = new FilterCard("black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public ValeronOutlander(UUID ownerId) {
|
||||
|
|
|
@ -32,10 +32,11 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,9 +46,7 @@ public class VedalkenOutlander extends CardImpl<VedalkenOutlander> {
|
|||
private static final FilterCard filter = new FilterCard("red");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public VedalkenOutlander(UUID ownerId) {
|
||||
|
|
|
@ -31,6 +31,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.PostResolveEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
|
@ -38,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -90,8 +92,7 @@ class ViewFromAboveEffect extends PostResolveEffect<ViewFromAboveEffect> {
|
|||
@Override
|
||||
public void postResolve(Card card, Ability source, UUID controllerId, Game game) {
|
||||
FilterPermanent filter = new FilterPermanent("white permanent");
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
|
||||
if (game.getBattlefield().countAll(filter, source.getControllerId(), game) > 0) {
|
||||
card.moveToZone(Zone.HAND, source.getId(), game, false);
|
||||
|
|
|
@ -32,10 +32,11 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,9 +46,7 @@ public class ZombieOutlander extends CardImpl<ZombieOutlander> {
|
|||
private static final FilterCard filter = new FilterCard("green");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public ZombieOutlander(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEff
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -93,10 +93,8 @@ class FaithsShieldEffect extends OneShotEffect<FaithsShieldEffect> {
|
|||
if (FatefulHourCondition.getInstance().apply(game, source)) {
|
||||
ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
|
||||
FilterCard filter = new FilterCard();
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(choice.getColor());
|
||||
filter.add(new ColorPredicate(choice.getColor()));
|
||||
filter.setMessage(choice.getChoice());
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
|
||||
Ability ability = new ProtectionAbility(filter) ;
|
||||
game.addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn), source);
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
@ -45,8 +46,9 @@ import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -61,10 +63,9 @@ public class SwordOfFireAndIce extends CardImpl<SwordOfFireAndIce> {
|
|||
private static final FilterCard filter = new FilterCard("red and from blue");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.RED),
|
||||
new ColorPredicate(ObjectColor.BLUE)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
@ -45,9 +46,10 @@ import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -62,10 +64,9 @@ public class SwordOfLightAndShadow extends CardImpl<SwordOfLightAndShadow> {
|
|||
private static final FilterCard filter = new FilterCard("white and from black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.WHITE),
|
||||
new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public SwordOfLightAndShadow(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,8 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,9 +51,7 @@ public class SealOfDoom extends CardImpl<SealOfDoom> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.setNotColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public SealOfDoom(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
|
@ -40,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.SplitSecondAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,8 +51,7 @@ public class CelestialCrusader extends CardImpl<CelestialCrusader> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("white creatures");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public CelestialCrusader(UUID ownerId) {
|
||||
|
|
|
@ -32,10 +32,12 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,8 +48,7 @@ public class Crusade extends CardImpl<Crusade> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures");
|
||||
|
||||
static {
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public Crusade(UUID ownerId) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
|
@ -55,14 +56,10 @@ public class BalefireLiege extends CardImpl<BalefireLiege> {
|
|||
private final static FilterSpell filterWhiteSpell = new FilterSpell("a white spell");
|
||||
|
||||
static {
|
||||
filterRedCreature.setUseColor(true);
|
||||
filterRedCreature.setColor(ObjectColor.RED);
|
||||
filterWhiteCreature.setUseColor(true);
|
||||
filterWhiteCreature.setColor(ObjectColor.WHITE);
|
||||
filterRedSpell.setUseColor(true);
|
||||
filterRedSpell.setColor(ObjectColor.RED);
|
||||
filterWhiteSpell.setUseColor(true);
|
||||
filterWhiteSpell.setColor(ObjectColor.WHITE);
|
||||
filterRedCreature.add(new ColorPredicate(ObjectColor.RED));
|
||||
filterWhiteCreature.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
filterRedSpell.add(new ColorPredicate(ObjectColor.RED));
|
||||
filterWhiteSpell.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public BalefireLiege(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.TapTargetEffect;
|
|||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +52,7 @@ public class BallynockTrapper extends CardImpl<BallynockTrapper> {
|
|||
private final static FilterSpell filterWhiteSpell = new FilterSpell("a white spell");
|
||||
|
||||
static {
|
||||
filterWhiteSpell.setUseColor(true);
|
||||
filterWhiteSpell.setColor(ObjectColor.WHITE);
|
||||
filterWhiteSpell.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public BallynockTrapper(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -50,10 +51,8 @@ public class BelligerentHatchling extends CardImpl<BelligerentHatchling> {
|
|||
private final static FilterSpell filterWhiteSpell = new FilterSpell("a white spell");
|
||||
|
||||
static {
|
||||
filterRedSpell.setUseColor(true);
|
||||
filterRedSpell.setColor(ObjectColor.RED);
|
||||
filterWhiteSpell.setUseColor(true);
|
||||
filterWhiteSpell.setColor(ObjectColor.WHITE);
|
||||
filterRedSpell.add(new ColorPredicate(ObjectColor.RED));
|
||||
filterWhiteSpell.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public BelligerentHatchling(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
|
@ -41,6 +42,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +53,7 @@ public class CinderPyromancer extends CardImpl<CinderPyromancer> {
|
|||
private static final FilterSpell filter = new FilterSpell("a red spell");
|
||||
|
||||
static {
|
||||
filter.getColor().setRed(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public CinderPyromancer (UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
|
@ -52,10 +53,8 @@ public class CreakwoodLiege extends CardImpl<CreakwoodLiege> {
|
|||
private final static FilterCreaturePermanent filterGreenCreature = new FilterCreaturePermanent("green creatures");
|
||||
|
||||
static {
|
||||
filterBlackCreature.setUseColor(true);
|
||||
filterBlackCreature.setColor(ObjectColor.BLACK);
|
||||
filterGreenCreature.setUseColor(true);
|
||||
filterGreenCreature.setColor(ObjectColor.GREEN);
|
||||
filterBlackCreature.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
filterGreenCreature.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
|
@ -42,6 +43,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -57,14 +59,10 @@ public class DeathbringerLiege extends CardImpl<DeathbringerLiege> {
|
|||
private final static FilterSpell filterBlackSpellCard = new FilterSpell("a black spell");
|
||||
|
||||
static {
|
||||
filterWhite.setUseColor(true);
|
||||
filterWhite.getColor().setWhite(true);
|
||||
filterBlack.setUseColor(true);
|
||||
filterBlack.getColor().setBlack(true);
|
||||
filterWhiteSpellCard.setUseColor(true);
|
||||
filterWhiteSpellCard.getColor().setWhite(true);
|
||||
filterBlackSpellCard.setUseColor(true);
|
||||
filterBlackSpellCard.getColor().setBlack(true);
|
||||
filterWhite.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
filterBlack.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
filterWhiteSpellCard.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
filterBlackSpellCard.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public DeathbringerLiege (UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.WolfToken;
|
||||
|
||||
|
@ -49,10 +50,8 @@ public class FableOfWolfAndOwl extends CardImpl<FableOfWolfAndOwl> {
|
|||
private final static FilterSpell filterBlueSpell = new FilterSpell("a blue spell");
|
||||
|
||||
static {
|
||||
filterGreenSpell.setUseColor(true);
|
||||
filterGreenSpell.setColor(ObjectColor.GREEN);
|
||||
filterBlueSpell.setUseColor(true);
|
||||
filterBlueSpell.setColor(ObjectColor.BLUE);
|
||||
filterGreenSpell.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
filterBlueSpell.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
public FableOfWolfAndOwl(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
|||
import mage.abilities.keyword.WitherAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +52,7 @@ public class FangSkulkin extends CardImpl<FangSkulkin> {
|
|||
private final static FilterCreaturePermanent filterBlackCreature = new FilterCreaturePermanent("black creature");
|
||||
|
||||
static {
|
||||
filterBlackCreature.setUseColor(true);
|
||||
filterBlackCreature.setColor(ObjectColor.BLACK);
|
||||
filterBlackCreature.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public FangSkulkin(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,8 +51,7 @@ public class HoofSkulkin extends CardImpl<HoofSkulkin> {
|
|||
private final static FilterCreaturePermanent filterGreenCreature = new FilterCreaturePermanent("green creature");
|
||||
|
||||
static {
|
||||
filterGreenCreature.setUseColor(true);
|
||||
filterGreenCreature.setColor(ObjectColor.GREEN);
|
||||
filterGreenCreature.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public HoofSkulkin(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
|||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +52,7 @@ public class JawboneSkulkin extends CardImpl<JawboneSkulkin> {
|
|||
private final static FilterCreaturePermanent filterRedCreature = new FilterCreaturePermanent("red creature");
|
||||
|
||||
static {
|
||||
filterRedCreature.setUseColor(true);
|
||||
filterRedCreature.setColor(ObjectColor.RED);
|
||||
filterRedCreature.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public JawboneSkulkin(UUID ownerId) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -54,8 +55,7 @@ public class MerrowLevitator extends CardImpl<MerrowLevitator> {
|
|||
private final static FilterSpell filterBlueSpell = new FilterSpell("a blue spell");
|
||||
|
||||
static {
|
||||
filterBlueSpell.setUseColor(true);
|
||||
filterBlueSpell.setColor(ObjectColor.BLUE);
|
||||
filterBlueSpell.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
public MerrowLevitator(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.WitherAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,10 +52,8 @@ public class NoxiousHatchling extends CardImpl<NoxiousHatchling> {
|
|||
private final static FilterSpell filterGreenSpell = new FilterSpell("a green spell");
|
||||
|
||||
static {
|
||||
filterBlackSpell.setUseColor(true);
|
||||
filterBlackSpell.setColor(ObjectColor.BLACK);
|
||||
filterGreenSpell.setUseColor(true);
|
||||
filterGreenSpell.setColor(ObjectColor.GREEN);
|
||||
filterBlackSpell.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
filterGreenSpell.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public NoxiousHatchling(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
|||
import mage.abilities.keyword.ShroudAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +52,7 @@ public class ShellSkulkin extends CardImpl<ShellSkulkin> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("blue creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.BLUE);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
public ShellSkulkin(UUID ownerId) {
|
||||
|
|
|
@ -44,6 +44,7 @@ import mage.abilities.keyword.ShroudAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -54,10 +55,8 @@ public class SturdyHatchling extends CardImpl<SturdyHatchling> {
|
|||
private final static FilterSpell filterBlueSpell = new FilterSpell("a blue spell");
|
||||
|
||||
static {
|
||||
filterGreenSpell.setUseColor(true);
|
||||
filterGreenSpell.setColor(ObjectColor.GREEN);
|
||||
filterBlueSpell.setUseColor(true);
|
||||
filterBlueSpell.setColor(ObjectColor.BLUE);
|
||||
filterGreenSpell.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
filterBlueSpell.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
public SturdyHatchling(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.LifelinkAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -50,10 +51,8 @@ public class VoraciousHatchling extends CardImpl<VoraciousHatchling> {
|
|||
private final static FilterSpell filterBlackSpell = new FilterSpell("a black spell");
|
||||
|
||||
static {
|
||||
filterWhiteSpell.setUseColor(true);
|
||||
filterWhiteSpell.setColor(ObjectColor.WHITE);
|
||||
filterBlackSpell.setUseColor(true);
|
||||
filterBlackSpell.setColor(ObjectColor.BLACK);
|
||||
filterWhiteSpell.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
filterBlackSpell.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public VoraciousHatchling(UUID ownerId) {
|
||||
|
|
|
@ -33,12 +33,15 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,9 +52,9 @@ public class WildernessHypnotist extends CardImpl<WildernessHypnotist> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("red or green creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.RED),
|
||||
new ColorPredicate(ObjectColor.GREEN)));
|
||||
}
|
||||
|
||||
public WildernessHypnotist(UUID ownerId) {
|
||||
|
|
|
@ -31,10 +31,12 @@ import java.util.UUID;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,8 +47,7 @@ public class BadMoon extends CardImpl<BadMoon> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Black creatures");
|
||||
|
||||
static {
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public BadMoon(UUID ownerId) {
|
||||
|
|
|
@ -30,9 +30,12 @@ package mage.sets.guildpact;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
|
@ -43,9 +46,7 @@ public class Frazzle extends CardImpl<Frazzle> {
|
|||
private final static FilterSpell filter = new FilterSpell("nonblue spell");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlue(true);
|
||||
filter.setNotColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLUE)));
|
||||
}
|
||||
|
||||
public Frazzle(UUID ownerId) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
|
@ -42,6 +43,7 @@ import mage.filter.FilterSpell;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -55,11 +57,9 @@ public class TiborAndLumia extends CardImpl<TiborAndLumia> {
|
|||
private final static FilterSpell filterRed = new FilterSpell("a red spell");
|
||||
|
||||
static {
|
||||
filterBlue.setUseColor(true);
|
||||
filterBlue.getColor().setBlue(true);
|
||||
filterBlue.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
filterRed.setUseColor(true);
|
||||
filterRed.getColor().setRed(true);
|
||||
filterRed.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public TiborAndLumia(UUID ownerId) {
|
||||
|
|
|
@ -44,6 +44,7 @@ import mage.abilities.effects.common.continious.BoostEnchantedEffect;
|
|||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -57,8 +58,7 @@ public class WurmweaverCoil extends CardImpl<WurmweaverCoil> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("green creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public WurmweaverCoil(UUID ownerId) {
|
||||
|
|
|
@ -32,11 +32,12 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,9 +48,7 @@ public class BlackKnight extends CardImpl<BlackKnight> {
|
|||
private static final FilterCard filter = new FilterCard("White");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public BlackKnight(UUID ownerId) {
|
||||
|
|
|
@ -31,9 +31,12 @@ package mage.sets.magic2010;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,9 +48,7 @@ public class DoomBlade extends CardImpl<DoomBlade> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setNotColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public DoomBlade(UUID ownerId){
|
||||
|
|
|
@ -33,12 +33,13 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CantCounterSourceEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,12 +50,8 @@ public class GreatSableStag extends CardImpl<GreatSableStag> {
|
|||
private static final FilterCard filter2 = new FilterCard("Black");
|
||||
|
||||
static {
|
||||
filter1.setUseColor(true);
|
||||
filter1.getColor().setBlue(true);
|
||||
filter1.setScopeColor(ComparisonScope.Any);
|
||||
filter2.setUseColor(true);
|
||||
filter2.getColor().setBlack(true);
|
||||
filter2.setScopeColor(ComparisonScope.Any);
|
||||
filter1.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
filter2.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public GreatSableStag(UUID ownerId) {
|
||||
|
|
|
@ -33,10 +33,12 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,8 +49,7 @@ public class HonorOfThePure extends CardImpl<HonorOfThePure> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public HonorOfThePure(UUID ownerId) {
|
||||
|
|
|
@ -30,9 +30,12 @@ package mage.sets.magic2010;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.DamageMultiEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
/**
|
||||
|
@ -44,9 +47,9 @@ public class IgniteDisorder extends CardImpl<IgniteDisorder> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white and/or blue creatures");
|
||||
|
||||
static {
|
||||
filter.getColor().setWhite(true);
|
||||
filter.getColor().setBlue(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.WHITE),
|
||||
new ColorPredicate(ObjectColor.BLUE)));
|
||||
}
|
||||
|
||||
public IgniteDisorder(UUID ownerId) {
|
||||
|
|
|
@ -32,12 +32,14 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -94,10 +96,9 @@ class LightwielderPaladinTriggeredAbility extends TriggeredAbilityImpl<Lightwiel
|
|||
if (event.getType() == EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)
|
||||
&& ((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
FilterPermanent filter = new FilterPermanent("black or red permanent");
|
||||
filter.getColor().setBlack(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.setUseColor(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.BLACK),
|
||||
new ColorPredicate(ObjectColor.RED)));
|
||||
filter.getControllerId().add(event.getTargetId());
|
||||
filter.setNotController(false);
|
||||
this.getTargets().clear();
|
||||
|
|
|
@ -31,12 +31,14 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.OpponentCastsSpellTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,10 +49,9 @@ public class MoldAdder extends CardImpl<MoldAdder> {
|
|||
private static final FilterCard filter = new FilterCard("blue or black spell");
|
||||
|
||||
static {
|
||||
filter.getColor().setBlue(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setUseColor(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.BLUE),
|
||||
new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public MoldAdder(UUID ownerId) {
|
||||
|
|
|
@ -32,11 +32,12 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,9 +48,7 @@ public class WhiteKnight extends CardImpl<WhiteKnight> {
|
|||
private static final FilterCard filter = new FilterCard("Black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public WhiteKnight(UUID ownerId) {
|
||||
|
|
|
@ -32,13 +32,15 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.CantCounterControlledEffect;
|
||||
import mage.abilities.effects.common.CantTargetControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,9 +53,9 @@ public class AutumnsVeil extends CardImpl<AutumnsVeil> {
|
|||
private static final FilterStackObject filterSource = new FilterStackObject("blue or black spells");
|
||||
|
||||
static {
|
||||
filterSource.getColor().setBlue(true);
|
||||
filterSource.getColor().setBlack(true);
|
||||
filterSource.setScopeColor(ComparisonScope.Any);
|
||||
filterSource.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.BLUE),
|
||||
new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public AutumnsVeil(UUID ownerId) {
|
||||
|
|
|
@ -32,12 +32,14 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CantCounterSourceEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,10 +51,9 @@ public class Combust extends CardImpl<Combust> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white or blue creature");
|
||||
|
||||
static {
|
||||
filter.getColor().setWhite(true);
|
||||
filter.getColor().setBlue(true);
|
||||
filter.setUseColor(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.WHITE),
|
||||
new ColorPredicate(ObjectColor.BLUE)));
|
||||
}
|
||||
|
||||
public Combust(UUID ownerId) {
|
||||
|
|
|
@ -31,6 +31,7 @@ package mage.sets.magic2011;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.AlternativeCostImpl;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
|
@ -38,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -76,8 +78,7 @@ class DemonOfDeathsGateAlternativeCost extends AlternativeCostImpl<DemonOfDeaths
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("black creature");
|
||||
|
||||
static {
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public DemonOfDeathsGateAlternativeCost() {
|
||||
|
|
|
@ -34,12 +34,15 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CantCounterSourceEffect;
|
||||
import mage.abilities.effects.common.CantTargetSourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,9 +53,7 @@ public class GaeasRevenge extends CardImpl<GaeasRevenge> {
|
|||
private static final FilterStackObject filter = new FilterStackObject("nongreen spells or abilities from nongreen sources");
|
||||
|
||||
static {
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setNotColor(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.GREEN)));
|
||||
}
|
||||
|
||||
public GaeasRevenge(UUID ownerId) {
|
||||
|
|
|
@ -49,9 +49,9 @@ public class Incite extends CardImpl<Incite> {
|
|||
super(ownerId, 145, "Incite", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
this.expansionSetCode = "M11";
|
||||
this.color.setRed(true);
|
||||
|
||||
// Target creature becomes red until end of turn and attacks this turn if able.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
// this.getSpellAbility().addEffect(new InciteEffect());
|
||||
this.getSpellAbility().addEffect(new SetCardColorTargetEffect(ObjectColor.RED, Constants.Duration.EndOfTurn, "Target creature becomes red until end of turn"));
|
||||
this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn));
|
||||
}
|
||||
|
@ -65,35 +65,3 @@ public class Incite extends CardImpl<Incite> {
|
|||
return new Incite(this);
|
||||
}
|
||||
}
|
||||
|
||||
//class InciteEffect extends ContinuousEffectImpl<InciteEffect> {
|
||||
//
|
||||
// public InciteEffect() {
|
||||
// super(Duration.EndOfTurn, Layer.ColorChangingEffects_5, SubLayer.NA, Outcome.Detriment);
|
||||
// staticText = "Target creature becomes red until end of turn";
|
||||
// }
|
||||
//
|
||||
// public InciteEffect(final InciteEffect effect) {
|
||||
// super(effect);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public InciteEffect copy() {
|
||||
// return new InciteEffect(this);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean apply(Game game, Ability source) {
|
||||
// Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
// if (permanent != null) {
|
||||
// permanent.getColor().setRed(true);
|
||||
// permanent.getColor().setWhite(false);
|
||||
// permanent.getColor().setGreen(false);
|
||||
// permanent.getColor().setBlue(false);
|
||||
// permanent.getColor().setBlack(false);
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
|
|
@ -33,9 +33,11 @@ import java.util.UUID;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,8 +48,7 @@ public class GuardiansPledge extends CardImpl<GuardiansPledge> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public GuardiansPledge (UUID ownerId) {
|
||||
|
|
|
@ -30,14 +30,15 @@ package mage.sets.magic2013;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.CompoundAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -49,12 +50,8 @@ public class AkromasMemorial extends CardImpl<AkromasMemorial> {
|
|||
private static final FilterCard filterRed = new FilterCard("Red");
|
||||
|
||||
static {
|
||||
filterBlack.setUseColor(true);
|
||||
filterBlack.getColor().setBlack(true);
|
||||
filterBlack.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filterRed.setUseColor(true);
|
||||
filterRed.getColor().setRed(true);
|
||||
filterRed.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filterBlack.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
filterRed.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public AkromasMemorial(UUID ownerId) {
|
||||
|
|
|
@ -32,11 +32,13 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
import mage.abilities.effects.common.CantBlockTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,8 +50,7 @@ public class GoblinBattleJester extends CardImpl<GoblinBattleJester> {
|
|||
private static final FilterSpell filter = new FilterSpell("a red spell");
|
||||
|
||||
static {
|
||||
filter.getColor().setRed(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public GoblinBattleJester(UUID ownerId) {
|
||||
|
|
|
@ -31,11 +31,12 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.ExaltedAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,12 +44,10 @@ import mage.filter.FilterCard;
|
|||
*/
|
||||
public class KnightOfGlory extends CardImpl<KnightOfGlory> {
|
||||
|
||||
private static FilterCard filter = new FilterCard("Black");
|
||||
private static final FilterCard filter = new FilterCard("Black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public KnightOfGlory(UUID ownerId) {
|
||||
|
|
|
@ -31,11 +31,12 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.ExaltedAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,9 +47,7 @@ public class KnightOfInfamy extends CardImpl<KnightOfInfamy> {
|
|||
private static final FilterCard filter = new FilterCard("white");
|
||||
|
||||
static {
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setUseColor(true);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public KnightOfInfamy(UUID ownerId) {
|
||||
|
|
|
@ -30,9 +30,11 @@ package mage.sets.magic2013;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
|
@ -44,8 +46,7 @@ public class Revive extends CardImpl<Revive> {
|
|||
private static final FilterCard filter = new FilterCard("green card from your graveyard");
|
||||
|
||||
static {
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public Revive(UUID ownerId) {
|
||||
|
|
|
@ -33,12 +33,14 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.RegenerateTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,8 +52,7 @@ public class TrollsOfTelJilad extends CardImpl<TrollsOfTelJilad> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("green creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public TrollsOfTelJilad(UUID ownerId) {
|
||||
|
|
|
@ -31,6 +31,7 @@ package mage.sets.mirrodinbesieged;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ShuffleSpellEffect;
|
||||
|
@ -38,13 +39,14 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -86,8 +88,7 @@ class GreenSunsZenithSearchEffect extends OneShotEffect<GreenSunsZenithSearchEff
|
|||
if (player == null)
|
||||
return false;
|
||||
FilterCard filter = new FilterCard("green creature card with converted mana cost X or less");
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1));
|
||||
|
|
|
@ -32,28 +32,24 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ayratn
|
||||
*/
|
||||
public class MirranCrusader extends CardImpl<MirranCrusader> {
|
||||
private static FilterCard filter = new FilterCard("Black");
|
||||
private static FilterCard filter2 = new FilterCard("Green");
|
||||
private static final FilterCard filter = new FilterCard("Black");
|
||||
private static final FilterCard filter2 = new FilterCard("Green");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
|
||||
filter2.setUseColor(true);
|
||||
filter2.getColor().setGreen(true);
|
||||
filter2.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
filter2.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public MirranCrusader (UUID ownerId) {
|
||||
|
|
|
@ -32,11 +32,13 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.InfectAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -48,11 +50,9 @@ public class PhyrexianCrusader extends CardImpl<PhyrexianCrusader> {
|
|||
private static final FilterCard filter2 = new FilterCard("White");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
|
||||
filter2.setUseColor(true);
|
||||
filter2.getColor().setWhite(true);
|
||||
filter2.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public PhyrexianCrusader (UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
@ -46,6 +47,8 @@ import mage.abilities.keyword.EquipAbility;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -60,9 +63,9 @@ public class SwordOfFeastAndFamine extends CardImpl<SwordOfFeastAndFamine> {
|
|||
private static final FilterCard filter = new FilterCard("green and from black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.GREEN),
|
||||
new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
@ -41,6 +42,7 @@ import mage.abilities.keyword.ChangelingAbility;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -53,8 +55,7 @@ public class ChameleonColossus extends CardImpl<ChameleonColossus> {
|
|||
private final static FilterCard filter = new FilterCard("black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public ChameleonColossus(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -46,9 +48,7 @@ public class VioletPall extends CardImpl<VioletPall> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.setNotColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public VioletPall(UUID ownerId) {
|
||||
|
|
|
@ -39,11 +39,11 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceColorOrArtifact;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
@ -103,9 +103,7 @@ class ApostlesBlessingEffect extends GainAbilityTargetEffect {
|
|||
if (choice.isArtifactSelected()) {
|
||||
protectionFilter.add(new CardTypePredicate(Constants.CardType.ARTIFACT));
|
||||
} else {
|
||||
protectionFilter.setColor(choice.getColor());
|
||||
protectionFilter.setUseColor(true);
|
||||
protectionFilter.setScopeColor(ComparisonScope.Any);
|
||||
protectionFilter.add(new ColorPredicate(choice.getColor()));
|
||||
}
|
||||
|
||||
protectionFilter.setMessage(choice.getChoice());
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.TargetController;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -46,6 +47,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -56,8 +58,7 @@ public class ShrineOfBoundlessGrowth extends CardImpl<ShrineOfBoundlessGrowth> {
|
|||
private static final FilterSpell filter = new FilterSpell("a green spell");
|
||||
|
||||
static {
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public ShrineOfBoundlessGrowth (UUID ownerId) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.UUID;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -45,18 +46,18 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <author>
|
||||
* @author BetaSteward
|
||||
*/
|
||||
public class ShrineOfBurningRage extends CardImpl<ShrineOfBurningRage> {
|
||||
private final static FilterSpell filter = new FilterSpell("a red spell");
|
||||
|
||||
static {
|
||||
filter.getColor().setRed(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public ShrineOfBurningRage (UUID ownerId) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -45,6 +46,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
|
@ -56,8 +58,7 @@ public class ShrineOfLimitlessPower extends CardImpl<ShrineOfLimitlessPower> {
|
|||
private static final FilterSpell filter = new FilterSpell("a black spell");
|
||||
|
||||
static {
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public ShrineOfLimitlessPower(UUID ownerId) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -45,6 +46,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.permanent.token.MyrToken;
|
||||
|
||||
/**
|
||||
|
@ -56,8 +58,7 @@ public class ShrineOfLoyalLegions extends CardImpl<ShrineOfLoyalLegions> {
|
|||
private static final FilterSpell filter = new FilterSpell("a white spell");
|
||||
|
||||
static {
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public ShrineOfLoyalLegions(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants.Outcome;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -48,6 +49,7 @@ import mage.cards.CardsImpl;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -62,8 +64,7 @@ public class ShrineOfPiercingVision extends CardImpl<ShrineOfPiercingVision> {
|
|||
private static final FilterSpell filter = new FilterSpell("a blue spell");
|
||||
|
||||
static {
|
||||
filter.getColor().setBlue(true);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
public ShrineOfPiercingVision(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -47,8 +48,9 @@ import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -64,10 +66,9 @@ public class SwordOfWarAndPeace extends CardImpl<SwordOfWarAndPeace> {
|
|||
private static final FilterCard filter = new FilterCard("red and from white");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.RED),
|
||||
new ColorPredicate(ObjectColor.WHITE)));
|
||||
}
|
||||
|
||||
public SwordOfWarAndPeace (UUID ownerId) {
|
||||
|
|
|
@ -31,10 +31,11 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,9 +46,7 @@ public class VulshokRefugee extends CardImpl<VulshokRefugee> {
|
|||
private static final FilterCard filter = new FilterCard("Red");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public VulshokRefugee(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
|
@ -40,21 +41,20 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
|||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class CrovaxAscendantHero extends CardImpl<CrovaxAscendantHero> {
|
||||
private static FilterCreaturePermanent filter1 = new FilterCreaturePermanent("white creatures");
|
||||
private static FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Nonwhite creatures");
|
||||
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("white creatures");
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("Nonwhite creatures");
|
||||
|
||||
static {
|
||||
filter1.getColor().setWhite(true);
|
||||
filter1.setUseColor(true);
|
||||
filter2.getColor().setWhite(true);
|
||||
filter2.setUseColor(true);
|
||||
filter2.setNotColor(true);
|
||||
filter1.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
filter2.add(Predicates.not(new ColorPredicate(ObjectColor.WHITE)));
|
||||
}
|
||||
|
||||
public CrovaxAscendantHero(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.keyword.ProtectionAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
|
@ -53,8 +54,7 @@ public class DuneriderOutlaw extends CardImpl<DuneriderOutlaw> {
|
|||
private static final FilterCard filter = new FilterCard("green");
|
||||
|
||||
static {
|
||||
filter.setColor(ObjectColor.GREEN);
|
||||
filter.setUseColor(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public DuneriderOutlaw(UUID ownerId) {
|
||||
|
|
|
@ -33,11 +33,14 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,11 +52,8 @@ public class AscendantEvincar extends CardImpl<AscendantEvincar> {
|
|||
private final static FilterCreaturePermanent filterNonBlack = new FilterCreaturePermanent("Nonblack creatures");
|
||||
|
||||
static {
|
||||
filterBlack.setUseColor(true);
|
||||
filterBlack.getColor().setBlack(true);
|
||||
filterNonBlack.setUseColor(true);
|
||||
filterNonBlack.getColor().setBlack(true);
|
||||
filterNonBlack.setNotColor(true);
|
||||
filterBlack.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
filterNonBlack.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public AscendantEvincar(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.common.AttacksTriggeredAbility;
|
|||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,10 +50,8 @@ public class AgrusKosWojekVeteran extends CardImpl<AgrusKosWojekVeteran> {
|
|||
private final static FilterAttackingCreature filterWhite = new FilterAttackingCreature("attacking white creatures");
|
||||
|
||||
static {
|
||||
filterRed.setUseColor(true);
|
||||
filterRed.setColor(ObjectColor.RED);
|
||||
filterWhite.setUseColor(true);
|
||||
filterWhite.setColor(ObjectColor.WHITE);
|
||||
filterRed.add(new ColorPredicate(ObjectColor.RED));
|
||||
filterWhite.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.ProtectionAbility;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
@ -83,8 +84,7 @@ class CentaurToken extends Token {
|
|||
private final static FilterCard filter = new FilterCard("black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
CentaurToken() {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.dynamicvalue.common.StaticValue;
|
|||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -45,8 +46,7 @@ public class AncientStirrings extends CardImpl<AncientStirrings> {
|
|||
private final static FilterCard filter = new FilterCard("colorless card");
|
||||
|
||||
static {
|
||||
filter.setColorless(true);
|
||||
filter.setUseColorless(true);
|
||||
filter.add(new ColorlessPredicate());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,10 +30,13 @@ package mage.sets.riseoftheeldrazi;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.permanent.token.EldraziSpawnToken;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -46,9 +49,7 @@ public class Corpsehatch extends CardImpl<Corpsehatch> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setNotColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public Corpsehatch(UUID ownerId) {
|
||||
|
|
|
@ -44,6 +44,8 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
@ -59,8 +61,7 @@ public class EmrakulTheAeonsTorn extends CardImpl<EmrakulTheAeonsTorn> {
|
|||
private static final FilterSpell filter = new FilterSpell("colored spells");
|
||||
|
||||
static {
|
||||
filter.setColorless(false);
|
||||
filter.setUseColorless(true);
|
||||
filter.add(Predicates.not(new ColorlessPredicate()));
|
||||
}
|
||||
|
||||
public EmrakulTheAeonsTorn(UUID ownerId) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
|
@ -54,8 +55,7 @@ public class KhalniHydra extends CardImpl<KhalniHydra> {
|
|||
|
||||
static {
|
||||
filter = new FilterControlledCreaturePermanent();
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.GREEN);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public KhalniHydra(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,8 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -53,8 +55,7 @@ public class Vendetta extends CardImpl<Vendetta> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.setNotColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public Vendetta(UUID ownerId) {
|
||||
|
|
|
@ -33,12 +33,14 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,8 +51,7 @@ public class EiganjoFreeRiders extends CardImpl<EiganjoFreeRiders> {
|
|||
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("white creature you control");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public EiganjoFreeRiders(UUID ownerId) {
|
||||
|
|
|
@ -31,10 +31,12 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,8 +47,7 @@ public class HandOfCruelty extends CardImpl<HandOfCruelty> {
|
|||
private final static FilterCard filter = new FilterCard("white");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public HandOfCruelty(UUID ownerId) {
|
||||
|
|
|
@ -32,10 +32,12 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
* @author anonymous
|
||||
|
@ -45,8 +47,7 @@ public class HandOfHonor extends CardImpl<HandOfHonor> {
|
|||
private final static FilterCard filter = new FilterCard("black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public HandOfHonor(UUID ownerId) {
|
||||
|
|
|
@ -33,12 +33,14 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,8 +52,7 @@ public class OniOfWildPlaces extends CardImpl<OniOfWildPlaces> {
|
|||
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("red creature you control");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
public OniOfWildPlaces(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -41,6 +42,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,8 +54,7 @@ public class SkullCollector extends CardImpl<SkullCollector> {
|
|||
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("black creature you control");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public SkullCollector(UUID ownerId) {
|
||||
|
|
|
@ -31,12 +31,14 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
|
@ -50,8 +52,7 @@ public class StampedingSerow extends CardImpl<StampedingSerow> {
|
|||
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("green creature you control");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public StampedingSerow(UUID ownerId) {
|
||||
|
|
|
@ -34,12 +34,14 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.IntimidateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,8 +52,7 @@ public class BellowingTanglewurm extends CardImpl<BellowingTanglewurm> {
|
|||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public BellowingTanglewurm (UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
|
@ -40,8 +41,9 @@ import mage.abilities.effects.ContinuousEffect;
|
|||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,13 +55,12 @@ public class EtchedChampion extends CardImpl<EtchedChampion> {
|
|||
private static final FilterCard filter = new FilterCard("all colors");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.getColor().setBlue(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.BLACK),
|
||||
new ColorPredicate(ObjectColor.BLUE),
|
||||
new ColorPredicate(ObjectColor.GREEN),
|
||||
new ColorPredicate(ObjectColor.RED),
|
||||
new ColorPredicate(ObjectColor.WHITE)));
|
||||
}
|
||||
|
||||
public EtchedChampion(UUID ownerId) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue