From dd1c7c0f7833a9498e51538e1cee230f89ff9c98 Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Sat, 19 Dec 2020 08:41:56 -0600 Subject: [PATCH] [KHM] Implemented Giant's Grasp --- Mage.Sets/src/mage/cards/g/GiantsGrasp.java | 57 +++++++++++++++++++++ Mage.Sets/src/mage/sets/Kaldheim.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GiantsGrasp.java diff --git a/Mage.Sets/src/mage/cards/g/GiantsGrasp.java b/Mage.Sets/src/mage/cards/g/GiantsGrasp.java new file mode 100644 index 0000000000..58dde06ee9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiantsGrasp.java @@ -0,0 +1,57 @@ +package mage.cards.g; + +import java.util.UUID; + +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.abilities.Ability; +import mage.abilities.effects.common.AttachEffect; +import mage.constants.Outcome; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author weirddan455 + */ +public final class GiantsGrasp extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.GIANT); + + public GiantsGrasp(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant Giant you control + TargetPermanent auraTarget = new TargetPermanent(filter); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.getSpellAbility().addTarget(auraTarget); + + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Giant's Grasp enters the battlefield, gain control of target nonland permanent for as long as Giant's Grasp remains on the battlefield. + GainControlTargetEffect controlEffect = new GainControlTargetEffect(Duration.UntilSourceLeavesBattlefield); + controlEffect.setText("gain control of target nonland permanent for as long as Giant's Grasp remains on the battlefield"); + ability = new EntersBattlefieldTriggeredAbility(controlEffect); + ability.addTarget(new TargetNonlandPermanent()); + this.addAbility(ability); + } + + private GiantsGrasp(final GiantsGrasp card) { + super(card); + } + + @Override + public GiantsGrasp copy() { + return new GiantsGrasp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 2b382519f9..a1c79a2634 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -35,6 +35,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Canopy Tactician", 378, Rarity.RARE, mage.cards.c.CanopyTactician.class)); cards.add(new SetCardInfo("Darkbore Pathway", 254, Rarity.RARE, mage.cards.d.DarkborePathway.class)); cards.add(new SetCardInfo("Elven Ambush", 391, Rarity.UNCOMMON, mage.cards.e.ElvenAmbush.class)); + cards.add(new SetCardInfo("Giant's Grasp", 384, Rarity.UNCOMMON, mage.cards.g.GiantsGrasp.class)); cards.add(new SetCardInfo("Gilded Assault Cart", 390, Rarity.UNCOMMON, mage.cards.g.GildedAssaultCart.class)); cards.add(new SetCardInfo("Gladewalker Ritualist", 392, Rarity.UNCOMMON, mage.cards.g.GladewalkerRitualist.class)); cards.add(new SetCardInfo("Hengegate Pathway", 260, Rarity.RARE, mage.cards.h.HengegatePathway.class));