[SNC] Implemented Glittering Stockpile

This commit is contained in:
Daniel Bomar 2022-04-16 12:02:57 -05:00
parent 243b48ba83
commit 441c3dffa3
No known key found for this signature in database
GPG key ID: C86C8658F4023918
3 changed files with 57 additions and 0 deletions

View file

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

View file

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

View file

@ -163,6 +163,7 @@ public enum CounterType {
SOUL("soul"),
SPITE("spite"),
SPORE("spore"),
STASH("stash"),
STORAGE("storage"),
STRIFE("strife"),
STUDY("study"),