[KHM] Implemented Immersturm Predator

This commit is contained in:
Evan Kranzler 2021-01-17 11:20:17 -05:00
parent 725ddddbea
commit e8a15e6491
3 changed files with 75 additions and 7 deletions

View file

@ -0,0 +1,64 @@
package mage.cards.i;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BecomesTappedSourceTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ImmersturmPredator extends CardImpl {
public ImmersturmPredator(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}");
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Immersturm Predator becomes tapped, exile up to one target card from a graveyard and put a +1/+1 counter on Immersturm Predator.
Ability ability = new BecomesTappedSourceTriggeredAbility(new ExileTargetEffect());
ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()).concatBy("and"));
ability.addTarget(new TargetCardInGraveyard(0, 1));
this.addAbility(ability);
// Sacrifice another creature: Immersturm Predator gains indestructible until end of turn. Tap it.
ability = new SimpleActivatedAbility(new GainAbilitySourceEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn
), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
ability.addEffect(new TapSourceEffect().setText("Tap it"));
this.addAbility(ability);
}
private ImmersturmPredator(final ImmersturmPredator card) {
super(card);
}
@Override
public ImmersturmPredator copy() {
return new ImmersturmPredator(this);
}
}

View file

@ -170,6 +170,7 @@ public final class Kaldheim extends ExpansionSet {
cards.add(new SetCardInfo("Horizon Seeker", 175, Rarity.COMMON, mage.cards.h.HorizonSeeker.class));
cards.add(new SetCardInfo("Ice Tunnel", 262, Rarity.COMMON, mage.cards.i.IceTunnel.class));
cards.add(new SetCardInfo("Icehide Troll", 176, Rarity.COMMON, mage.cards.i.IcehideTroll.class));
cards.add(new SetCardInfo("Immersturm Predator", 214, Rarity.RARE, mage.cards.i.ImmersturmPredator.class));
cards.add(new SetCardInfo("Infernal Pet", 99, Rarity.COMMON, mage.cards.i.InfernalPet.class));
cards.add(new SetCardInfo("Inga Rune-Eyes", 64, Rarity.UNCOMMON, mage.cards.i.IngaRuneEyes.class));
cards.add(new SetCardInfo("Invasion of the Giants", 215, Rarity.UNCOMMON, mage.cards.i.InvasionOfTheGiants.class));

View file

@ -1,8 +1,5 @@
package mage.target.common;
import java.util.UUID;
import mage.abilities.Ability;
import mage.cards.Card;
import mage.constants.Zone;
@ -10,24 +7,31 @@ import mage.filter.FilterCard;
import mage.game.Game;
import mage.target.TargetCard;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class TargetCardInGraveyard extends TargetCard {
private static final FilterCard defaultFilter = new FilterCard("card from a graveyard");
public TargetCardInGraveyard() {
this(1, 1, new FilterCard("card from a graveyard"));
this(1, 1);
}
public TargetCardInGraveyard(FilterCard filter) {
this(1, 1, filter);
this(1, filter);
}
public TargetCardInGraveyard(int numTargets, FilterCard filter) {
this(numTargets, numTargets, filter);
}
public TargetCardInGraveyard(int minNumTargets, int maxNumTargets) {
this(minNumTargets, maxNumTargets, defaultFilter);
}
public TargetCardInGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter);
}
@ -46,5 +50,4 @@ public class TargetCardInGraveyard extends TargetCard {
public TargetCardInGraveyard copy() {
return new TargetCardInGraveyard(this);
}
}