From 9e950b66cd007a666a532b276cd1e77a89849df5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 31 May 2021 08:55:08 -0400 Subject: [PATCH] [MH2] Implemented Sanctum Weaver --- Mage.Sets/src/mage/cards/s/SanctumWeaver.java | 52 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons2.java | 1 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SanctumWeaver.java diff --git a/Mage.Sets/src/mage/cards/s/SanctumWeaver.java b/Mage.Sets/src/mage/cards/s/SanctumWeaver.java new file mode 100644 index 0000000000..f2368e149b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SanctumWeaver.java @@ -0,0 +1,52 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.Mana; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.mana.DynamicManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledEnchantmentPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SanctumWeaver extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledEnchantmentPermanent(); + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + private static final Hint hint = new ValueHint("Enchantments you control", xValue); + + public SanctumWeaver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.DRYAD); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // {T}: Add X mana of any one color, where X is the number of enchantments you control. + this.addAbility(new DynamicManaAbility( + new Mana(0, 0, 0, 0, 0, 0, 1, 0), + xValue, new TapSourceCost(), "Add X mana of any one color, " + + "where X is the number of enchantments you control", true + ).addHint(hint)); + } + + private SanctumWeaver(final SanctumWeaver card) { + super(card); + } + + @Override + public SanctumWeaver copy() { + return new SanctumWeaver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index ae28f9129c..f6f3c25ddb 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -125,6 +125,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Rustvale Bridge", 253, Rarity.COMMON, mage.cards.r.RustvaleBridge.class)); cards.add(new SetCardInfo("Sanctuary Raptor", 233, Rarity.UNCOMMON, mage.cards.s.SanctuaryRaptor.class)); cards.add(new SetCardInfo("Sanctum Prelate", 491, Rarity.MYTHIC, mage.cards.s.SanctumPrelate.class)); + cards.add(new SetCardInfo("Sanctum Weaver", 171, Rarity.RARE, mage.cards.s.SanctumWeaver.class)); cards.add(new SetCardInfo("Scalding Tarn", 254, Rarity.RARE, mage.cards.s.ScaldingTarn.class)); cards.add(new SetCardInfo("Scurry Oak", 172, Rarity.UNCOMMON, mage.cards.s.ScurryOak.class)); cards.add(new SetCardInfo("Scuttletide", 61, Rarity.UNCOMMON, mage.cards.s.Scuttletide.class));