[MOC] Implement Vivien's Talent

This commit is contained in:
theelk801 2023-04-16 09:16:45 -04:00
parent 56a4ef5443
commit f6d9b37530
2 changed files with 64 additions and 0 deletions

View file

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

View file

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