From e09d32c3257444892fa9112161469ca2a0ad40d9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 28 Jan 2022 08:41:55 -0500 Subject: [PATCH] [NEO] Implemented Greater Tanuki --- Mage.Sets/src/mage/cards/g/GreaterTanuki.java | 45 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + .../abilities/keyword/ChannelAbility.java | 6 +-- 3 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/g/GreaterTanuki.java diff --git a/Mage.Sets/src/mage/cards/g/GreaterTanuki.java b/Mage.Sets/src/mage/cards/g/GreaterTanuki.java new file mode 100644 index 0000000000..8e068cc2e7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GreaterTanuki.java @@ -0,0 +1,45 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.keyword.ChannelAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GreaterTanuki extends CardImpl { + + public GreaterTanuki(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{4}{G}{G}"); + + this.subtype.add(SubType.DOG); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Channel — {2}{G}, Discard Greater Tanuki: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle. + this.addAbility(new ChannelAbility("{2}{G}", new SearchLibraryPutInPlayEffect( + new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true + ))); + } + + private GreaterTanuki(final GreaterTanuki card) { + super(card); + } + + @Override + public GreaterTanuki copy() { + return new GreaterTanuki(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index 866e502563..0057c7492c 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -26,6 +26,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Dokuchi Shadow-Walker", 94, Rarity.COMMON, mage.cards.d.DokuchiShadowWalker.class)); cards.add(new SetCardInfo("Forest", 301, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Goro-Goro, Disciple of Ryusei", 145, Rarity.RARE, mage.cards.g.GoroGoroDiscipleOfRyusei.class)); + cards.add(new SetCardInfo("Greater Tanuki", 189, Rarity.COMMON, mage.cards.g.GreaterTanuki.class)); cards.add(new SetCardInfo("Hidetsugu, Devouring Chaos", 99, Rarity.RARE, mage.cards.h.HidetsuguDevouringChaos.class)); cards.add(new SetCardInfo("Island", 295, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Kaito Shizuki", 226, Rarity.MYTHIC, mage.cards.k.KaitoShizuki.class)); diff --git a/Mage/src/main/java/mage/abilities/keyword/ChannelAbility.java b/Mage/src/main/java/mage/abilities/keyword/ChannelAbility.java index 78ed122452..3ca999b0b8 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ChannelAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ChannelAbility.java @@ -1,5 +1,3 @@ - - package mage.abilities.keyword; import mage.abilities.ActivatedAbilityImpl; @@ -18,7 +16,7 @@ public class ChannelAbility extends ActivatedAbilityImpl { } public ChannelAbility(String manaString, Effect effect, TimingRule timing) { - super(Zone.HAND, effect, new ManaCostsImpl(manaString)); + super(Zone.HAND, effect, new ManaCostsImpl<>(manaString)); this.addCost(new DiscardSourceCost()); this.timing = timing; this.setAbilityWord(AbilityWord.CHANNEL); @@ -40,6 +38,4 @@ public class ChannelAbility extends ActivatedAbilityImpl { } return super.getRule(); } - } -