diff --git a/Mage.Sets/src/mage/cards/c/ComponentPouch.java b/Mage.Sets/src/mage/cards/c/ComponentPouch.java new file mode 100644 index 0000000000..56db127dca --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ComponentPouch.java @@ -0,0 +1,53 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.RollDieWithResultTableEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.mana.AddManaOfTwoDifferentColorsEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ComponentPouch extends CardImpl { + + public ComponentPouch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // {T}, Remove a component counter from Component Pouch: Add two mana of different colors. + Ability ability = new SimpleManaAbility( + Zone.BATTLEFIELD, new AddManaOfTwoDifferentColorsEffect(), new TapSourceCost() + ); + ability.addCost(new RemoveCountersSourceCost(CounterType.COMPONENT.createInstance())); + this.addAbility(ability); + + // {T}: Roll a d20. + RollDieWithResultTableEffect effect = new RollDieWithResultTableEffect(); + this.addAbility(new SimpleActivatedAbility(effect, new TapSourceCost())); + + // 1-9 | Put a component counter on Component Pouch. + effect.addTableEntry(1, 9, new AddCountersSourceEffect(CounterType.COMPONENT.createInstance())); + + // 10-20 | Put two component counters on Component Pouch. + effect.addTableEntry(10, 20, new AddCountersSourceEffect(CounterType.COMPONENT.createInstance(2))); + } + + private ComponentPouch(final ComponentPouch card) { + super(card); + } + + @Override + public ComponentPouch copy() { + return new ComponentPouch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ForgottenRealmsCommander.java b/Mage.Sets/src/mage/sets/ForgottenRealmsCommander.java index 35dfdb9046..c33c58eccc 100644 --- a/Mage.Sets/src/mage/sets/ForgottenRealmsCommander.java +++ b/Mage.Sets/src/mage/sets/ForgottenRealmsCommander.java @@ -60,6 +60,7 @@ public final class ForgottenRealmsCommander extends ExpansionSet { cards.add(new SetCardInfo("Command Tower", 230, Rarity.COMMON, mage.cards.c.CommandTower.class)); cards.add(new SetCardInfo("Commander's Sphere", 203, Rarity.COMMON, mage.cards.c.CommandersSphere.class)); cards.add(new SetCardInfo("Commune with Lava", 118, Rarity.RARE, mage.cards.c.CommuneWithLava.class)); + cards.add(new SetCardInfo("Component Pouch", 59, Rarity.UNCOMMON, mage.cards.c.ComponentPouch.class)); cards.add(new SetCardInfo("Consuming Vapors", 96, Rarity.RARE, mage.cards.c.ConsumingVapors.class)); cards.add(new SetCardInfo("Crucible of the Spirit Dragon", 231, Rarity.RARE, mage.cards.c.CrucibleOfTheSpiritDragon.class)); cards.add(new SetCardInfo("Cultivate", 155, Rarity.UNCOMMON, mage.cards.c.Cultivate.class)); diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index c5bbda9d1a..9ca9156366 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -30,6 +30,7 @@ public enum CounterType { CHARGE("charge"), CHIP("chip"), COIN("coin"), + COMPONENT("component"), CORPSE("corpse"), CORRUPTION("corruption"), CREDIT("credit"),