From b7dba21e9ca6f48ef1d8c62396ba9483512343e0 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 8 Jan 2020 21:05:12 -0500 Subject: [PATCH] Implemented Dreamshaper Shaman --- .../src/mage/cards/d/DreamshaperShaman.java | 63 +++++++++++++++++++ .../src/mage/sets/TherosBeyondDeath.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DreamshaperShaman.java diff --git a/Mage.Sets/src/mage/cards/d/DreamshaperShaman.java b/Mage.Sets/src/mage/cards/d/DreamshaperShaman.java new file mode 100644 index 0000000000..e842ce5f62 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DreamshaperShaman.java @@ -0,0 +1,63 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.costs.CompositeCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.Predicates; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DreamshaperShaman extends CardImpl { + + private static final FilterCard filter = new FilterPermanentCard("nonland permanent card"); + + static { + filter.add(Predicates.not(CardType.LAND.getPredicate())); + } + + public DreamshaperShaman(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{5}{R}"); + + this.subtype.add(SubType.MINOTAUR); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // At the beginning of your end step, you may pay {2}{R} and sacrifice a nonland permanent. If you do, reveal cards from the top of your library until you reveal a nonland permanent card. Put that card onto the battlefield and the rest on the bottom of your library in a random order. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new DoIfCostPaid( + new RevealCardsFromLibraryUntilEffect(filter, Zone.BATTLEFIELD, Zone.LIBRARY), + new CompositeCost( + new ManaCostsImpl("{2}{R}"), + new SacrificeTargetCost(new TargetControlledPermanent( + StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND + )), "pay {2}{R} and sacrifice a nonland permanent" + ) + ), TargetController.YOU, false)); + } + + private DreamshaperShaman(final DreamshaperShaman card) { + super(card); + } + + @Override + public DreamshaperShaman copy() { + return new DreamshaperShaman(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index c5ebb386dd..a338e25fb9 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -54,6 +54,7 @@ public final class TherosBeyondDeath extends ExpansionSet { cards.add(new SetCardInfo("Demon of Loathing", 292, Rarity.RARE, mage.cards.d.DemonOfLoathing.class)); cards.add(new SetCardInfo("Devourer of Memory", 213, Rarity.UNCOMMON, mage.cards.d.DevourerOfMemory.class)); cards.add(new SetCardInfo("Drag to the Underworld", 89, Rarity.UNCOMMON, mage.cards.d.DragToTheUnderworld.class)); + cards.add(new SetCardInfo("Dreamshaper Shaman", 130, Rarity.UNCOMMON, mage.cards.d.DreamshaperShaman.class)); cards.add(new SetCardInfo("Dryad of Ilysian Grove", 169, Rarity.RARE, mage.cards.d.DryadOfIlysianGrove.class)); cards.add(new SetCardInfo("Eat to Extinction", 90, Rarity.RARE, mage.cards.e.EatToExtinction.class)); cards.add(new SetCardInfo("Eidolon of Obstruction", 12, Rarity.RARE, mage.cards.e.EidolonOfObstruction.class));