From 072401243f273b62a4873b61573088f54e650f30 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 25 Mar 2021 20:31:27 -0400 Subject: [PATCH] [STX] Implemented Vineglimmer Snarl --- .../src/mage/cards/v/VineglimmerSnarl.java | 56 +++++++++++++++++++ .../mage/sets/StrixhavenSchoolOfMages.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/VineglimmerSnarl.java diff --git a/Mage.Sets/src/mage/cards/v/VineglimmerSnarl.java b/Mage.Sets/src/mage/cards/v/VineglimmerSnarl.java new file mode 100644 index 0000000000..a23a4411ed --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VineglimmerSnarl.java @@ -0,0 +1,56 @@ +package mage.cards.v; + +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.effects.common.TapSourceUnlessPaysEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.target.common.TargetCardInHand; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class VineglimmerSnarl extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Forest or Island card from your hand"); + + static { + filter.add(Predicates.or( + SubType.FOREST.getPredicate(), + SubType.ISLAND.getPredicate() + )); + } + + public VineglimmerSnarl(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // As Vineglimmer Snarl enters the battlefield, you may reveal a Forest or Island card from your hand. If you don't, Vineglimmer Snarl enters the battlefield tapped. + this.addAbility(new AsEntersBattlefieldAbility( + new TapSourceUnlessPaysEffect( + new RevealTargetFromHandCost(new TargetCardInHand(filter)) + ), "you may reveal a Forest or Island card from your hand. " + + "If you don't, {this} enters the battlefield tapped" + )); + + // {T}: Add {G} or {U}. + this.addAbility(new GreenManaAbility()); + this.addAbility(new BlueManaAbility()); + } + + private VineglimmerSnarl(final VineglimmerSnarl card) { + super(card); + } + + @Override + public VineglimmerSnarl copy() { + return new VineglimmerSnarl(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index 300c3e079a..5b9c175083 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -44,6 +44,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { cards.add(new SetCardInfo("Silverquill Apprentice", 231, Rarity.UNCOMMON, mage.cards.s.SilverquillApprentice.class)); cards.add(new SetCardInfo("Silverquill Command", 232, Rarity.RARE, mage.cards.s.SilverquillCommand.class)); cards.add(new SetCardInfo("Storm-Kiln Artist", 115, Rarity.UNCOMMON, mage.cards.s.StormKilnArtist.class)); + cards.add(new SetCardInfo("Vineglimmer Snarl", 274, Rarity.RARE, mage.cards.v.VineglimmerSnarl.class)); cards.add(new SetCardInfo("Witherbloom Command", 248, Rarity.RARE, mage.cards.w.WitherbloomCommand.class)); } }