diff --git a/Mage.Sets/src/mage/cards/g/GlitteringStockpile.java b/Mage.Sets/src/mage/cards/g/GlitteringStockpile.java new file mode 100644 index 00000000000..b80abdd7c07 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GlitteringStockpile.java @@ -0,0 +1,55 @@ +package mage.cards.g; + +import java.util.UUID; + +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.DynamicManaAbility; +import mage.abilities.mana.RedManaAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; + +/** + * + * @author weirddan455 + */ +public final class GlitteringStockpile extends CardImpl { + + private static final DynamicValue xValue = new CountersSourceCount(CounterType.STASH); + + public GlitteringStockpile(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{R}"); + + this.subtype.add(SubType.TREASURE); + + // {T}: Add {R}. Put a stash counter on Glittering Stockpile. + Ability ability = new RedManaAbility(); + ability.addEffect(new AddCountersSourceEffect(CounterType.STASH.createInstance())); + this.addAbility(ability); + + // {T}, Sacrifice Glittering Stockpile: Add X mana of any one color, where X is the number of stash counters on Glittering Stockpile. + ability = 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 stash counters on {this}", true + ); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + private GlitteringStockpile(final GlitteringStockpile card) { + super(card); + } + + @Override + public GlitteringStockpile copy() { + return new GlitteringStockpile(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java index 0c63948932e..416751a6ce4 100644 --- a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java +++ b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java @@ -110,6 +110,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet { cards.add(new SetCardInfo("Gathering Throng", 13, Rarity.COMMON, mage.cards.g.GatheringThrong.class)); cards.add(new SetCardInfo("Getaway Car", 237, Rarity.RARE, mage.cards.g.GetawayCar.class)); cards.add(new SetCardInfo("Gilded Pinions", 238, Rarity.COMMON, mage.cards.g.GildedPinions.class)); + cards.add(new SetCardInfo("Glittering Stockpile", 107, Rarity.UNCOMMON, mage.cards.g.GlitteringStockpile.class)); cards.add(new SetCardInfo("Glittermonger", 149, Rarity.COMMON, mage.cards.g.Glittermonger.class)); cards.add(new SetCardInfo("Goldhound", 108, Rarity.COMMON, mage.cards.g.Goldhound.class)); cards.add(new SetCardInfo("Graveyard Shift", 81, Rarity.UNCOMMON, mage.cards.g.GraveyardShift.class)); diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index bed3ddb320b..2bccc276e73 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -163,6 +163,7 @@ public enum CounterType { SOUL("soul"), SPITE("spite"), SPORE("spore"), + STASH("stash"), STORAGE("storage"), STRIFE("strife"), STUDY("study"),