From e0599439d069adc3e4d5e0f4f5b0a0ad4ec15a08 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 7 Apr 2020 22:03:58 -0400 Subject: [PATCH] Implemented Shiny Impetus --- Mage.Sets/src/mage/cards/s/ShinyImpetus.java | 58 +++++++++++++++++++ .../src/mage/sets/Commander2020Edition.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/ShinyImpetus.java diff --git a/Mage.Sets/src/mage/cards/s/ShinyImpetus.java b/Mage.Sets/src/mage/cards/s/ShinyImpetus.java new file mode 100644 index 0000000000..f02de1301c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShinyImpetus.java @@ -0,0 +1,58 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.common.AttacksAttachedTriggeredAbility; +import mage.abilities.common.GoadAttachedAbility; +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.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.permanent.token.TreasureToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ShinyImpetus extends CardImpl { + + public ShinyImpetus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + 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 +2/+2 and is goaded. + this.addAbility(new GoadAttachedAbility(new BoostEnchantedEffect(2, 2))); + + // Whenever enchanted creature attacks, you create a Treasure token. + this.addAbility(new AttacksAttachedTriggeredAbility( + new CreateTokenEffect(new TreasureToken()) + .setText("you create a Treasure token"), + AttachmentType.AURA, false + )); + } + + private ShinyImpetus(final ShinyImpetus card) { + super(card); + } + + @Override + public ShinyImpetus copy() { + return new ShinyImpetus(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Commander2020Edition.java b/Mage.Sets/src/mage/sets/Commander2020Edition.java index eb44d2a17e..cc6b929878 100644 --- a/Mage.Sets/src/mage/sets/Commander2020Edition.java +++ b/Mage.Sets/src/mage/sets/Commander2020Edition.java @@ -101,6 +101,7 @@ public final class Commander2020Edition extends ExpansionSet { cards.add(new SetCardInfo("Rashmi, Eternities Crafter", 229, Rarity.RARE, mage.cards.r.RashmiEternitiesCrafter.class)); cards.add(new SetCardInfo("Shabraz, the Skyshark", 14, Rarity.MYTHIC, mage.cards.s.ShabrazTheSkyshark.class)); cards.add(new SetCardInfo("Shared Animosity", 158, Rarity.RARE, mage.cards.s.SharedAnimosity.class)); + cards.add(new SetCardInfo("Shiny Impetus", 55, Rarity.UNCOMMON, mage.cards.s.ShinyImpetus.class)); cards.add(new SetCardInfo("Silent Arbiter", 250, Rarity.RARE, mage.cards.s.SilentArbiter.class)); cards.add(new SetCardInfo("Silvar, Devourer of the Free", 15, Rarity.MYTHIC, mage.cards.s.SilvarDevourerOfTheFree.class)); cards.add(new SetCardInfo("Sol Ring", 252, Rarity.UNCOMMON, mage.cards.s.SolRing.class));