diff --git a/Mage.Sets/src/mage/cards/g/GlacialGrasp.java b/Mage.Sets/src/mage/cards/g/GlacialGrasp.java new file mode 100644 index 0000000000..d4dbd8f657 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GlacialGrasp.java @@ -0,0 +1,74 @@ +package mage.cards.g; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GlacialGrasp extends CardImpl { + + public GlacialGrasp(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // Tap target creature. Its controller mills two cards. That creature doesn't untap during its controller's next untap step. + this.getSpellAbility().addEffect(new GlacialGraspEffect()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + private GlacialGrasp(final GlacialGrasp card) { + super(card); + } + + @Override + public GlacialGrasp copy() { + return new GlacialGrasp(this); + } +} + +class GlacialGraspEffect extends OneShotEffect { + + GlacialGraspEffect() { + super(Outcome.Benefit); + staticText = "Tap target creature. Its controller mills two cards. " + + "That creature doesn't untap during its controller's next untap step."; + } + + private GlacialGraspEffect(final GlacialGraspEffect effect) { + super(effect); + } + + @Override + public GlacialGraspEffect copy() { + return new GlacialGraspEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + permanent.tap(game); + game.addEffect(new DontUntapInControllersNextUntapStepTargetEffect(), source); + Player player = game.getPlayer(permanent.getControllerId()); + if (player == null) { + return false; + } + player.millCards(2, source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarRising.java b/Mage.Sets/src/mage/sets/ZendikarRising.java index ea3c28888e..bc4f433ea1 100644 --- a/Mage.Sets/src/mage/sets/ZendikarRising.java +++ b/Mage.Sets/src/mage/sets/ZendikarRising.java @@ -138,6 +138,7 @@ public final class ZendikarRising extends ExpansionSet { cards.add(new SetCardInfo("Feed the Swarm", 102, Rarity.COMMON, mage.cards.f.FeedTheSwarm.class)); cards.add(new SetCardInfo("Fissure Wizard", 140, Rarity.COMMON, mage.cards.f.FissureWizard.class)); cards.add(new SetCardInfo("Forest", 278, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Glacial Grasp", 59, Rarity.COMMON, mage.cards.g.GlacialGrasp.class)); cards.add(new SetCardInfo("Gnarlid Colony", 185, Rarity.COMMON, mage.cards.g.GnarlidColony.class)); cards.add(new SetCardInfo("Goma Fada Vanguard", 141, Rarity.UNCOMMON, mage.cards.g.GomaFadaVanguard.class)); cards.add(new SetCardInfo("Grimclimb Pathway", 259, Rarity.RARE, mage.cards.g.GrimclimbPathway.class));