From 8174be99266ce4b1b9b4e3d928d962e28e4ba4d0 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Sat, 17 Feb 2024 19:57:15 +0000 Subject: [PATCH] [MKC] Implement Follow the Bodies --- .../src/mage/cards/f/FollowTheBodies.java | 34 +++++++++++++++++++ .../sets/MurdersAtKarlovManorCommander.java | 2 ++ .../abilities/keyword/GravestormAbility.java | 24 +++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FollowTheBodies.java diff --git a/Mage.Sets/src/mage/cards/f/FollowTheBodies.java b/Mage.Sets/src/mage/cards/f/FollowTheBodies.java new file mode 100644 index 00000000000..0dd15afbf63 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FollowTheBodies.java @@ -0,0 +1,34 @@ +package mage.cards.f; + +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.abilities.keyword.GravestormAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class FollowTheBodies extends CardImpl { + + public FollowTheBodies(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); + + // Gravestorm + this.addAbility(new GravestormAbility()); + + // Investigate + this.getSpellAbility().addEffect(new InvestigateEffect()); + } + + private FollowTheBodies(final FollowTheBodies card) { + super(card); + } + + @Override + public FollowTheBodies copy() { + return new FollowTheBodies(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java index b617e453b02..2c891ffbc15 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java @@ -98,6 +98,8 @@ public final class MurdersAtKarlovManorCommander extends ExpansionSet { cards.add(new SetCardInfo("Fetid Pools", 261, Rarity.RARE, mage.cards.f.FetidPools.class)); cards.add(new SetCardInfo("Fiendish Duo", 153, Rarity.MYTHIC, mage.cards.f.FiendishDuo.class)); cards.add(new SetCardInfo("Finale of Revelation", 106, Rarity.MYTHIC, mage.cards.f.FinaleOfRevelation.class)); + cards.add(new SetCardInfo("Follow the Bodies", 23, Rarity.RARE, mage.cards.f.FollowTheBodies.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Follow the Bodies", 333, Rarity.RARE, mage.cards.f.FollowTheBodies.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Fortified Village", 262, Rarity.RARE, mage.cards.f.FortifiedVillage.class)); cards.add(new SetCardInfo("Frontier Warmonger", 154, Rarity.RARE, mage.cards.f.FrontierWarmonger.class)); cards.add(new SetCardInfo("Fumigate", 66, Rarity.RARE, mage.cards.f.Fumigate.class)); diff --git a/Mage/src/main/java/mage/abilities/keyword/GravestormAbility.java b/Mage/src/main/java/mage/abilities/keyword/GravestormAbility.java index 98dd328dedb..9e082ec4b65 100644 --- a/Mage/src/main/java/mage/abilities/keyword/GravestormAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/GravestormAbility.java @@ -3,8 +3,10 @@ package mage.abilities.keyword; import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.hint.ValueHint; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; @@ -21,6 +23,9 @@ public class GravestormAbility extends TriggeredAbilityImpl { public GravestormAbility() { super(Zone.STACK, new GravestormEffect()); this.addWatcher(new GravestormWatcher()); + this.addHint(new ValueHint( + "Permanents put into graveyards from the battlefield this turn", PermanentsDestroyedThisTurnValue.instance + )); } private GravestormAbility(final GravestormAbility ability) { @@ -95,3 +100,22 @@ class GravestormEffect extends OneShotEffect { return new GravestormEffect(this); } } + +enum PermanentsDestroyedThisTurnValue implements DynamicValue { + instance; + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + return game.getState().getWatcher(GravestormWatcher.class).getGravestormCount(); + } + + @Override + public PermanentsDestroyedThisTurnValue copy() { + return instance; + } + + @Override + public String getMessage() { + return ""; + } +}