From cab8724a7ddd822ceb51ee183f7f084a3104d68a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 6 Jan 2020 18:40:52 -0500 Subject: [PATCH] Implemented Mantle of the Wolf --- .../src/mage/cards/m/MantleOfTheWolf.java | 53 +++++++++++++++++++ .../src/mage/sets/TherosBeyondDeath.java | 1 + 2 files changed, 54 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MantleOfTheWolf.java diff --git a/Mage.Sets/src/mage/cards/m/MantleOfTheWolf.java b/Mage.Sets/src/mage/cards/m/MantleOfTheWolf.java new file mode 100644 index 00000000000..506012be652 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MantleOfTheWolf.java @@ -0,0 +1,53 @@ +package mage.cards.m; + +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.permanent.token.WolfToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MantleOfTheWolf extends CardImpl { + + public MantleOfTheWolf(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +4/+4. + this.addAbility(new SimpleStaticAbility(new BoostEnchantedEffect(4, 4))); + + // When Mantle of the Wolf is put into a graveyard from the battlefield, create two 2/2 green Wolf creature tokens. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CreateTokenEffect(new WolfToken(), 2))); + } + + private MantleOfTheWolf(final MantleOfTheWolf card) { + super(card); + } + + @Override + public MantleOfTheWolf copy() { + return new MantleOfTheWolf(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index 0860c25ac5d..9057c473537 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -77,6 +77,7 @@ public final class TherosBeyondDeath extends ExpansionSet { cards.add(new SetCardInfo("Klothys, God of Destiny", 220, Rarity.MYTHIC, mage.cards.k.KlothysGodOfDestiny.class)); cards.add(new SetCardInfo("Kunoros, Hound of Athreos", 222, Rarity.RARE, mage.cards.k.KunorosHoundOfAthreos.class)); cards.add(new SetCardInfo("Leonin of the Lost Pride", 28, Rarity.COMMON, mage.cards.l.LeoninOfTheLostPride.class)); + cards.add(new SetCardInfo("Mantle of the Wolf", 178, Rarity.RARE, mage.cards.m.MantleOfTheWolf.class)); cards.add(new SetCardInfo("Memory Drain", 54, Rarity.COMMON, mage.cards.m.MemoryDrain.class)); cards.add(new SetCardInfo("Mire Triton", 105, Rarity.UNCOMMON, mage.cards.m.MireTriton.class)); cards.add(new SetCardInfo("Mire's Grasp", 106, Rarity.COMMON, mage.cards.m.MiresGrasp.class));