From 3e8eaefb7944041517850fae6adbc4239f711f1e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 1 Jun 2019 11:08:50 -0400 Subject: [PATCH] Implemented Iceberg Cancrix --- .../src/mage/cards/i/IcebergCancrix.java | 56 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/IcebergCancrix.java diff --git a/Mage.Sets/src/mage/cards/i/IcebergCancrix.java b/Mage.Sets/src/mage/cards/i/IcebergCancrix.java new file mode 100644 index 00000000000..98b110cbaae --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IcebergCancrix.java @@ -0,0 +1,56 @@ +package mage.cards.i; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.TargetPlayer; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class IcebergCancrix extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new SupertypePredicate(SuperType.SNOW)); + } + + public IcebergCancrix(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.CRAB); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Whenever another snow permanent enters the battlefield under your control, you may have target player put the top two cards of their library into their graveyard. + Ability ability = new EntersBattlefieldControlledTriggeredAbility( + Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(2), filter, + true, "Whenever another snow permanent enters the battlefield under your control, " + + "you may have target player put the top two cards of their library into their graveyard." + ); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + private IcebergCancrix(final IcebergCancrix card) { + super(card); + } + + @Override + public IcebergCancrix copy() { + return new IcebergCancrix(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index ca643a27d3e..3c85f6a54f4 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -115,6 +115,7 @@ public final class ModernHorizons extends ExpansionSet { cards.add(new SetCardInfo("Hogaak, Arisen Necropolis", 202, Rarity.RARE, mage.cards.h.HogaakArisenNecropolis.class)); cards.add(new SetCardInfo("Hollowhead Sliver", 132, Rarity.UNCOMMON, mage.cards.h.HollowheadSliver.class)); cards.add(new SetCardInfo("Ice-Fang Coatl", 203, Rarity.RARE, mage.cards.i.IceFangCoatl.class)); + cards.add(new SetCardInfo("Iceberg Cancrix", 54, Rarity.COMMON, mage.cards.i.IcebergCancrix.class)); cards.add(new SetCardInfo("Icehide Golem", 224, Rarity.UNCOMMON, mage.cards.i.IcehideGolem.class)); cards.add(new SetCardInfo("Impostor of the Sixth Pride", 14, Rarity.COMMON, mage.cards.i.ImpostorOfTheSixthPride.class)); cards.add(new SetCardInfo("Ingenious Infiltrator", 204, Rarity.UNCOMMON, mage.cards.i.IngeniousInfiltrator.class));