From f6d9b37530da209e00972d5c185bb18c903aea9e Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sun, 16 Apr 2023 09:16:45 -0400 Subject: [PATCH] [MOC] Implement Vivien's Talent --- Mage.Sets/src/mage/cards/v/ViviensTalent.java | 63 +++++++++++++++++++ .../mage/sets/MarchOfTheMachineCommander.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/ViviensTalent.java diff --git a/Mage.Sets/src/mage/cards/v/ViviensTalent.java b/Mage.Sets/src/mage/cards/v/ViviensTalent.java new file mode 100644 index 0000000000..2aaa8ca8f3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/ViviensTalent.java @@ -0,0 +1,63 @@ +package mage.cards.v; + +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; +import mage.target.common.TargetPlaneswalkerPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ViviensTalent extends CardImpl { + + public ViviensTalent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant planeswalker + TargetPermanent auraTarget = new TargetPlaneswalkerPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // Enchanted planeswalker has "[+1]: Look at the top four cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in a random order." + this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect( + new LoyaltyAbility(new LookLibraryAndPickControllerEffect( + 4, 1, + StaticFilters.FILTER_CARD_CREATURE_OR_LAND, + PutCards.HAND, PutCards.BOTTOM_RANDOM + ), 1), AttachmentType.AURA, + Duration.WhileOnBattlefield, null, "planeswalker" + ))); + + // Whenever a nontoken creature enters the battlefield under your control, put a loyalty counter on enchanted planeswalker. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + new AddCountersAttachedEffect( + CounterType.LOYALTY.createInstance(), "enchanted planeswalker" + ), StaticFilters.FILTER_CREATURE_NON_TOKEN + )); + } + + private ViviensTalent(final ViviensTalent card) { + super(card); + } + + @Override + public ViviensTalent copy() { + return new ViviensTalent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachineCommander.java b/Mage.Sets/src/mage/sets/MarchOfTheMachineCommander.java index 115a6122de..ce9912dec1 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachineCommander.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachineCommander.java @@ -323,6 +323,7 @@ public final class MarchOfTheMachineCommander extends ExpansionSet { cards.add(new SetCardInfo("Victimize", 270, Rarity.UNCOMMON, mage.cards.v.Victimize.class)); cards.add(new SetCardInfo("Village Bell-Ringer", 216, Rarity.COMMON, mage.cards.v.VillageBellRinger.class)); cards.add(new SetCardInfo("Vineglimmer Snarl", 444, Rarity.RARE, mage.cards.v.VineglimmerSnarl.class)); + cards.add(new SetCardInfo("Vivien's Talent", 78, Rarity.RARE, mage.cards.v.ViviensTalent.class)); cards.add(new SetCardInfo("Vodalian Wave-Knight", 43, Rarity.RARE, mage.cards.v.VodalianWaveKnight.class)); cards.add(new SetCardInfo("Vona, Butcher of Magan", 342, Rarity.MYTHIC, mage.cards.v.VonaButcherOfMagan.class)); cards.add(new SetCardInfo("Wayfarer's Bauble", 389, Rarity.COMMON, mage.cards.w.WayfarersBauble.class));