From 8a707ea975b59a48d157f09e4db157ac47e18610 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 30 Oct 2022 21:34:25 -0400 Subject: [PATCH] [BRO] Implemented Hurkyl's Final Meditation --- .../mage/cards/h/HurkylsFinalMeditation.java | 57 +++++++++++++++++++ Mage.Sets/src/mage/sets/TheBrothersWar.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HurkylsFinalMeditation.java diff --git a/Mage.Sets/src/mage/cards/h/HurkylsFinalMeditation.java b/Mage.Sets/src/mage/cards/h/HurkylsFinalMeditation.java new file mode 100644 index 00000000000..6d03bf05e7c --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HurkylsFinalMeditation.java @@ -0,0 +1,57 @@ +package mage.cards.h; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.CostAdjuster; +import mage.abilities.effects.common.EndTurnEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.util.CardUtil; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HurkylsFinalMeditation extends CardImpl { + + public HurkylsFinalMeditation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{U}{U}{U}"); + + // As long as its not your turn, this spell costs {3} more to cast. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, new InfoEffect("as long as its not your turn, this spell costs {3} more to cast") + )); + this.getSpellAbility().setCostAdjuster(HurkylsFinalMeditationAdjuster.instance); + + // Return all nonland permanents to their owner's hands. End the turn. + this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_PERMANENTS_NON_LAND)); + this.getSpellAbility().addEffect(new EndTurnEffect()); + } + + private HurkylsFinalMeditation(final HurkylsFinalMeditation card) { + super(card); + } + + @Override + public HurkylsFinalMeditation copy() { + return new HurkylsFinalMeditation(this); + } +} + +enum HurkylsFinalMeditationAdjuster implements CostAdjuster { + instance; + + @Override + public void adjustCosts(Ability ability, Game game) { + if (!game.isActivePlayer(ability.getControllerId())) { + CardUtil.increaseCost(ability, 3); + } + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index 85604aa3b80..f0833268a4b 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -42,6 +42,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Go for the Throat", 102, Rarity.UNCOMMON, mage.cards.g.GoForTheThroat.class)); cards.add(new SetCardInfo("Hall of Tagsin", 263, Rarity.RARE, mage.cards.h.HallOfTagsin.class)); cards.add(new SetCardInfo("Harbin, Vanguard Aviator", 212, Rarity.RARE, mage.cards.h.HarbinVanguardAviator.class)); + cards.add(new SetCardInfo("Hurkyl's Final Meditation", 52, Rarity.RARE, mage.cards.h.HurkylsFinalMeditation.class)); cards.add(new SetCardInfo("Hurkyl, Master Wizard", 51, Rarity.RARE, mage.cards.h.HurkylMasterWizard.class)); cards.add(new SetCardInfo("Island", 280, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Llanowar Wastes", 264, Rarity.RARE, mage.cards.l.LlanowarWastes.class));