mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[KHM] Implemented Crippling Fear
This commit is contained in:
parent
2dc53bba18
commit
63c3664629
17 changed files with 69 additions and 17 deletions
|
@ -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}"));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
45
Mage.Sets/src/mage/cards/c/CripplingFear.java
Normal file
45
Mage.Sets/src/mage/cards/c/CripplingFear.java
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -14,12 +14,18 @@ import mage.game.Game;
|
|||
* @author LoneFox
|
||||
*/
|
||||
public enum ChosenSubtypePredicate implements ObjectSourcePlayerPredicate<ObjectSourcePlayer<MageObject>> {
|
||||
instance;
|
||||
TRUE(true), FALSE(false);
|
||||
|
||||
private final boolean value;
|
||||
|
||||
ChosenSubtypePredicate(boolean value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectSourcePlayer<MageObject> input, Game game) {
|
||||
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(input.getSourceId(), game);
|
||||
return input.getObject().hasSubtype(subType, game);
|
||||
return input.getObject().hasSubtype(subType, game) == value;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue