From 8f91a2884ef068868c41b1bcede5740e1c14c9bd Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 11 Apr 2019 22:16:28 -0400 Subject: [PATCH] Implemented Gideon's Battle Cry --- .../src/mage/cards/g/GideonsBattleCry.java | 46 +++++++++++++++++++ Mage.Sets/src/mage/sets/WarOfTheSpark.java | 1 + 2 files changed, 47 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GideonsBattleCry.java diff --git a/Mage.Sets/src/mage/cards/g/GideonsBattleCry.java b/Mage.Sets/src/mage/cards/g/GideonsBattleCry.java new file mode 100644 index 0000000000..7a48f5008d --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GideonsBattleCry.java @@ -0,0 +1,46 @@ +package mage.cards.g; + +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.effects.common.search.SearchLibraryGraveyardPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.predicate.mageobject.NamePredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GideonsBattleCry extends CardImpl { + + private static final FilterCard filter = new FilterCard("Gideon, the Oathsworn"); + + static { + filter.add(new NamePredicate("Gideon, the Oathsworn")); + } + + public GideonsBattleCry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); + + // Put a +1/+1 counter on each creature you control. You may search your library and/or graveyard for a card named Gideon, the Oathsworn, reveal it, and put it into your hand. If you search your library this way, shuffle it. + this.getSpellAbility().addEffect(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE + )); + this.getSpellAbility().addEffect(new SearchLibraryGraveyardPutInHandEffect( + filter, false, true + )); + } + + private GideonsBattleCry(final GideonsBattleCry card) { + super(card); + } + + @Override + public GideonsBattleCry copy() { + return new GideonsBattleCry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index 32608b098c..162d9e5864 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -76,6 +76,7 @@ public final class WarOfTheSpark extends ExpansionSet { cards.add(new SetCardInfo("Forest", 262, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 264, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Giant Growth", 162, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); + cards.add(new SetCardInfo("Gideon's Battle Cry", 267, Rarity.RARE, mage.cards.g.GideonsBattleCry.class)); cards.add(new SetCardInfo("Gideon's Company", 268, Rarity.UNCOMMON, mage.cards.g.GideonsCompany.class)); cards.add(new SetCardInfo("Gideon's Triumph", 15, Rarity.UNCOMMON, mage.cards.g.GideonsTriumph.class)); cards.add(new SetCardInfo("Gleaming Overseer", 198, Rarity.UNCOMMON, mage.cards.g.GleamingOverseer.class));