diff --git a/Mage.Sets/src/mage/cards/b/BelbesPortal.java b/Mage.Sets/src/mage/cards/b/BelbesPortal.java index ac0c13bab5..c13b8375e4 100644 --- a/Mage.Sets/src/mage/cards/b/BelbesPortal.java +++ b/Mage.Sets/src/mage/cards/b/BelbesPortal.java @@ -30,7 +30,7 @@ public final class BelbesPortal extends CardImpl { this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.PutCreatureInPlay))); // {3}, {tap}: You may put a creature card of the chosen type from your hand onto the battlefield. FilterCreatureCard filter = new FilterCreatureCard("a creature card of the chosen type"); - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutCardFromHandOntoBattlefieldEffect(filter), new ManaCostsImpl("{3}")); diff --git a/Mage.Sets/src/mage/cards/b/BloodlinePretender.java b/Mage.Sets/src/mage/cards/b/BloodlinePretender.java index 839c75de85..64d8abdb06 100644 --- a/Mage.Sets/src/mage/cards/b/BloodlinePretender.java +++ b/Mage.Sets/src/mage/cards/b/BloodlinePretender.java @@ -29,7 +29,7 @@ public final class BloodlinePretender extends CardImpl { static { filter.add(AnotherPredicate.instance); - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); } public BloodlinePretender(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/b/BrassHerald.java b/Mage.Sets/src/mage/cards/b/BrassHerald.java index 2b5d3d4f29..5a76f66ded 100644 --- a/Mage.Sets/src/mage/cards/b/BrassHerald.java +++ b/Mage.Sets/src/mage/cards/b/BrassHerald.java @@ -69,7 +69,7 @@ class BrassHeraldEntersEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { FilterCard filter = new FilterCard("creature cards of the chosen type"); - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); return new RevealLibraryPutIntoHandEffect(4, filter, Zone.LIBRARY).apply(game, source); } } diff --git a/Mage.Sets/src/mage/cards/c/CripplingFear.java b/Mage.Sets/src/mage/cards/c/CripplingFear.java new file mode 100644 index 0000000000..474f5ea7ec --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CripplingFear.java @@ -0,0 +1,45 @@ +package mage.cards.c; + +import mage.abilities.effects.common.ChooseCreatureTypeEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ChosenSubtypePredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CripplingFear extends CardImpl { + + private static final FilterCreaturePermanent filter + = new FilterCreaturePermanent("Creatures that aren't of the chosen type"); + + static { + filter.add(ChosenSubtypePredicate.FALSE); + } + + public CripplingFear(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + + // Choose a creature type. Creatures that aren't of the chosen type get -3/-3 until end of turn. + this.getSpellAbility().addEffect(new ChooseCreatureTypeEffect(Outcome.Neutral)); + this.getSpellAbility().addEffect(new BoostAllEffect( + -3, -3, Duration.EndOfTurn, filter, false + )); + } + + private CripplingFear(final CripplingFear card) { + super(card); + } + + @Override + public CripplingFear copy() { + return new CripplingFear(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EtchingsOfTheChosen.java b/Mage.Sets/src/mage/cards/e/EtchingsOfTheChosen.java index f57521b7af..11db8005cd 100644 --- a/Mage.Sets/src/mage/cards/e/EtchingsOfTheChosen.java +++ b/Mage.Sets/src/mage/cards/e/EtchingsOfTheChosen.java @@ -36,9 +36,9 @@ public final class EtchingsOfTheChosen extends CardImpl { = new FilterControlledCreaturePermanent("a creature of the chosen type"); static { - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); filter.add(TargetController.YOU.getControllerPredicate()); - filter2.add(ChosenSubtypePredicate.instance); + filter2.add(ChosenSubtypePredicate.TRUE); } public EtchingsOfTheChosen(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/i/IconOfAncestry.java b/Mage.Sets/src/mage/cards/i/IconOfAncestry.java index a9641a8b57..ac44440de2 100644 --- a/Mage.Sets/src/mage/cards/i/IconOfAncestry.java +++ b/Mage.Sets/src/mage/cards/i/IconOfAncestry.java @@ -29,7 +29,7 @@ public final class IconOfAncestry extends CardImpl { = new FilterCreaturePermanent("creatures you control of the chosen type"); static { - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); filter.add(TargetController.YOU.getControllerPredicate()); } diff --git a/Mage.Sets/src/mage/cards/k/KindredBoon.java b/Mage.Sets/src/mage/cards/k/KindredBoon.java index 64c4a6c403..0cc025ee9c 100644 --- a/Mage.Sets/src/mage/cards/k/KindredBoon.java +++ b/Mage.Sets/src/mage/cards/k/KindredBoon.java @@ -41,7 +41,7 @@ public final class KindredBoon extends CardImpl { // {1}{W}: Put a divinity counter on target creature you control of the chosen type. FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control of the chosen type"); - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.DIVINITY.createInstance()), new ManaCostsImpl("{1}{W}")); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/k/KindredDiscovery.java b/Mage.Sets/src/mage/cards/k/KindredDiscovery.java index d85ed68e1e..50fd25f1ca 100644 --- a/Mage.Sets/src/mage/cards/k/KindredDiscovery.java +++ b/Mage.Sets/src/mage/cards/k/KindredDiscovery.java @@ -27,7 +27,7 @@ public final class KindredDiscovery extends CardImpl { // Whenever a creature you control of the chosen type enters the battlefield or attacks, draw a card. FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a creature you control of the chosen type"); - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); this.addAbility(new EntersBattlefieldOrAttacksAllTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), filter, false)); } diff --git a/Mage.Sets/src/mage/cards/m/MirrorOfTheForebears.java b/Mage.Sets/src/mage/cards/m/MirrorOfTheForebears.java index 39ebe93b95..1c421c2897 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorOfTheForebears.java +++ b/Mage.Sets/src/mage/cards/m/MirrorOfTheForebears.java @@ -31,7 +31,7 @@ public final class MirrorOfTheForebears extends CardImpl { private static final FilterPermanent filter = new FilterControlledCreaturePermanent(); static { - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); } public MirrorOfTheForebears(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/m/MoltenEchoes.java b/Mage.Sets/src/mage/cards/m/MoltenEchoes.java index 446c6aab06..eacbf3e9f3 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenEchoes.java +++ b/Mage.Sets/src/mage/cards/m/MoltenEchoes.java @@ -40,7 +40,7 @@ public final class MoltenEchoes extends CardImpl { // Whenever a nontoken creature of the chosen type enters the battlefield under your control, create a token that's a copy of that creature. That token gains haste. Exile it at the beginning of the next end step. FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("nontoken creature of the chosen type"); filter.add(Predicates.not(TokenPredicate.instance)); - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new MoltenEchoesEffect(), filter, false, SetTargetPointer.PERMANENT, diff --git a/Mage.Sets/src/mage/cards/m/MorophonTheBoundless.java b/Mage.Sets/src/mage/cards/m/MorophonTheBoundless.java index b18b28ea8c..d4fcd5666e 100644 --- a/Mage.Sets/src/mage/cards/m/MorophonTheBoundless.java +++ b/Mage.Sets/src/mage/cards/m/MorophonTheBoundless.java @@ -27,7 +27,7 @@ public final class MorophonTheBoundless extends CardImpl { = new FilterCreaturePermanent("creatures you control of the chosen type"); static { - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); filter2.add(TargetController.YOU.getControllerPredicate()); } diff --git a/Mage.Sets/src/mage/cards/p/PlagueEngineer.java b/Mage.Sets/src/mage/cards/p/PlagueEngineer.java index ad710e65b6..4fe25a965a 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueEngineer.java +++ b/Mage.Sets/src/mage/cards/p/PlagueEngineer.java @@ -27,7 +27,7 @@ public final class PlagueEngineer extends CardImpl { = new FilterOpponentsCreaturePermanent("creatures of the chosen type your opponents control"); static { - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); } public PlagueEngineer(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/Realmwalker.java b/Mage.Sets/src/mage/cards/r/Realmwalker.java index 5264b65e28..a46efad770 100644 --- a/Mage.Sets/src/mage/cards/r/Realmwalker.java +++ b/Mage.Sets/src/mage/cards/r/Realmwalker.java @@ -24,7 +24,7 @@ public final class Realmwalker extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("cast creature spells of the chosen type"); static { - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); } public Realmwalker(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/r/ReflectionsOfLittjara.java b/Mage.Sets/src/mage/cards/r/ReflectionsOfLittjara.java index 0a9ea9dfda..a0856d5dba 100644 --- a/Mage.Sets/src/mage/cards/r/ReflectionsOfLittjara.java +++ b/Mage.Sets/src/mage/cards/r/ReflectionsOfLittjara.java @@ -21,7 +21,7 @@ public final class ReflectionsOfLittjara extends CardImpl { private static final FilterSpell filter = new FilterSpell("a spell of the chosen type"); static { - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); } public ReflectionsOfLittjara(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/s/SpeciesSpecialist.java b/Mage.Sets/src/mage/cards/s/SpeciesSpecialist.java index 3d75b308d8..2f84f581f9 100644 --- a/Mage.Sets/src/mage/cards/s/SpeciesSpecialist.java +++ b/Mage.Sets/src/mage/cards/s/SpeciesSpecialist.java @@ -24,7 +24,7 @@ public final class SpeciesSpecialist extends CardImpl { private static final FilterPermanent filter = new FilterCreaturePermanent("a creature of the chosen type"); static { - filter.add(ChosenSubtypePredicate.instance); + filter.add(ChosenSubtypePredicate.TRUE); } public SpeciesSpecialist(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index ba4ce1264b..78cf058d44 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -114,6 +114,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Colossal Plow", 236, Rarity.UNCOMMON, mage.cards.c.ColossalPlow.class)); cards.add(new SetCardInfo("Cosmos Elixir", 237, Rarity.RARE, mage.cards.c.CosmosElixir.class)); cards.add(new SetCardInfo("Craven Hulk", 127, Rarity.COMMON, mage.cards.c.CravenHulk.class)); + cards.add(new SetCardInfo("Crippling Fear", 82, Rarity.RARE, mage.cards.c.CripplingFear.class)); cards.add(new SetCardInfo("Crush the Weak", 128, Rarity.UNCOMMON, mage.cards.c.CrushTheWeak.class)); cards.add(new SetCardInfo("Cyclone Summoner", 52, Rarity.RARE, mage.cards.c.CycloneSummoner.class)); cards.add(new SetCardInfo("Darkbore Pathway", 254, Rarity.RARE, mage.cards.d.DarkborePathway.class)); diff --git a/Mage/src/main/java/mage/filter/predicate/mageobject/ChosenSubtypePredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/ChosenSubtypePredicate.java index ab0deb49f2..ed2cdb4cca 100644 --- a/Mage/src/main/java/mage/filter/predicate/mageobject/ChosenSubtypePredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/ChosenSubtypePredicate.java @@ -14,12 +14,18 @@ import mage.game.Game; * @author LoneFox */ public enum ChosenSubtypePredicate implements ObjectSourcePlayerPredicate> { - instance; + TRUE(true), FALSE(false); + + private final boolean value; + + ChosenSubtypePredicate(boolean value) { + this.value = value; + } @Override public boolean apply(ObjectSourcePlayer input, Game game) { SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(input.getSourceId(), game); - return input.getObject().hasSubtype(subType, game); + return input.getObject().hasSubtype(subType, game) == value; } @Override