From 589bef53e5cf2ff3ef24aaf88fc49e241fe710b0 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 21 Jun 2018 15:08:34 -0400 Subject: [PATCH] Implemented Dragon's Hoard --- Mage.Sets/src/mage/cards/d/DragonsHoard.java | 55 ++++++++++++++++++++ Mage.Sets/src/mage/sets/CoreSet2019.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DragonsHoard.java diff --git a/Mage.Sets/src/mage/cards/d/DragonsHoard.java b/Mage.Sets/src/mage/cards/d/DragonsHoard.java new file mode 100644 index 0000000000..07c4e3c676 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DragonsHoard.java @@ -0,0 +1,55 @@ +package mage.cards.d; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; + +/** + * + * @author TheElk801 + */ +public final class DragonsHoard extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(SubType.DRAGON, "a Dragon"); + + public DragonsHoard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // Whenever a Dragon enters the battlefield under your control, put a gold counter on Dragon's Hoard. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + new AddCountersSourceEffect(CounterType.GOLD.createInstance()), filter + )); + + // {T}, Remove a gold counter from Dragon's Hoard: Draw a card. + Ability ability = new SimpleActivatedAbility( + new DrawCardSourceControllerEffect(1), + new TapSourceCost() + ); + ability.addCost(new RemoveCountersSourceCost(CounterType.GOLD.createInstance())); + this.addAbility(ability); + + // {T}: Add one mana of any color. + this.addAbility(new AnyColorManaAbility()); + } + + public DragonsHoard(final DragonsHoard card) { + super(card); + } + + @Override + public DragonsHoard copy() { + return new DragonsHoard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2019.java b/Mage.Sets/src/mage/sets/CoreSet2019.java index 3bd72ef1b0..f494a623c1 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2019.java +++ b/Mage.Sets/src/mage/sets/CoreSet2019.java @@ -82,6 +82,7 @@ public final class CoreSet2019 extends ExpansionSet { cards.add(new SetCardInfo("Divination", 51, Rarity.COMMON, mage.cards.d.Divination.class)); cards.add(new SetCardInfo("Djinn of Wishes", 52, Rarity.RARE, mage.cards.d.DjinnOfWishes.class)); cards.add(new SetCardInfo("Draconic Disciple", 215, Rarity.UNCOMMON, mage.cards.d.DraconicDisciple.class)); + cards.add(new SetCardInfo("Dragon's Hoard", 232, Rarity.RARE, mage.cards.d.DragonsHoard.class)); cards.add(new SetCardInfo("Druid of the Cowl", 177, Rarity.COMMON, mage.cards.d.DruidOfTheCowl.class)); cards.add(new SetCardInfo("Dryad Greenseeker", 178, Rarity.UNCOMMON, mage.cards.d.DryadGreenseeker.class)); cards.add(new SetCardInfo("Dwarven Priest", 11, Rarity.COMMON, mage.cards.d.DwarvenPriest.class));