From 834cb0a017ba9534ffcc628a95e2dae0c655c3e7 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 4 Apr 2023 19:34:02 -0400 Subject: [PATCH] [MOM] Implement Kami of Whispered Hopes --- .../src/mage/cards/h/HeronbladeElite.java | 4 +- .../mage/cards/k/KamiOfWhisperedHopes.java | 54 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 1 + 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/k/KamiOfWhisperedHopes.java diff --git a/Mage.Sets/src/mage/cards/h/HeronbladeElite.java b/Mage.Sets/src/mage/cards/h/HeronbladeElite.java index 68dc4b71964..0f0bf28e747 100644 --- a/Mage.Sets/src/mage/cards/h/HeronbladeElite.java +++ b/Mage.Sets/src/mage/cards/h/HeronbladeElite.java @@ -16,9 +16,9 @@ import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; import java.util.UUID; -import mage.filter.predicate.mageobject.AnotherPredicate; /** * @author TheElk801 @@ -51,7 +51,7 @@ public final class HeronbladeElite extends CardImpl { // {T}: Add X mana of any one color, where X is Heronblade Elite's power. this.addAbility(new DynamicManaAbility( - new Mana(0, 0, 0, 0, 0, 0, 1, 0), xValue, new TapSourceCost(), "Add X mana " + Mana.AnyMana(1), xValue, new TapSourceCost(), "Add X mana " + "of any one color, where X is {this}'s power", true )); } diff --git a/Mage.Sets/src/mage/cards/k/KamiOfWhisperedHopes.java b/Mage.Sets/src/mage/cards/k/KamiOfWhisperedHopes.java new file mode 100644 index 00000000000..9aaa50d94a5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KamiOfWhisperedHopes.java @@ -0,0 +1,54 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.Mana; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.replacement.ModifyCountersAddedEffect; +import mage.abilities.mana.DynamicManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KamiOfWhisperedHopes extends CardImpl { + + private static final DynamicValue xValue = new SourcePermanentPowerCount(); + + public KamiOfWhisperedHopes(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // If one or more +1/+1 counters would be put on a permanent you control, that many plus one +1/+1 counters are put on that permanent instead. + this.addAbility(new SimpleStaticAbility(new ModifyCountersAddedEffect( + StaticFilters.FILTER_CONTROLLED_PERMANENT, CounterType.P1P1 + ))); + + // {T}: Add X mana of any one color, where X is Kami of Whispered Hopes's power. + this.addAbility(new DynamicManaAbility( + Mana.AnyMana(1), xValue, new TapSourceCost(), "Add X mana " + + "of any one color, where X is {this}'s power", true + )); + } + + private KamiOfWhisperedHopes(final KamiOfWhisperedHopes card) { + super(card); + } + + @Override + public KamiOfWhisperedHopes copy() { + return new KamiOfWhisperedHopes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 31568d88652..e6def0f5f65 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -72,6 +72,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Island", 278, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Joyful Stormsculptor", 243, Rarity.UNCOMMON, mage.cards.j.JoyfulStormsculptor.class)); cards.add(new SetCardInfo("Jungle Hollow", 270, Rarity.COMMON, mage.cards.j.JungleHollow.class)); + cards.add(new SetCardInfo("Kami of Whispered Hopes", 196, Rarity.UNCOMMON, mage.cards.k.KamiOfWhisperedHopes.class)); cards.add(new SetCardInfo("Khenra Spellspear", 151, Rarity.UNCOMMON, mage.cards.k.KhenraSpellspear.class)); cards.add(new SetCardInfo("Kroxa and Kunoros", 245, Rarity.MYTHIC, mage.cards.k.KroxaAndKunoros.class)); cards.add(new SetCardInfo("Lithomantic Barrage", 152, Rarity.UNCOMMON, mage.cards.l.LithomanticBarrage.class));