[ZNR] Implemented Glacial Grasp

This commit is contained in:
Evan Kranzler 2020-09-07 11:30:23 -04:00
parent c9e4040867
commit 2bee92355c
2 changed files with 75 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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));