From 506c0e46ed1bfb0bd6f8d26b9b8c46bd6aa80708 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Mon, 26 May 2025 19:18:20 -0400 Subject: [PATCH] [FIN] Implement The Final Days --- Mage.Sets/src/mage/cards/t/TheFinalDays.java | 52 +++++++++++++++++++ Mage.Sets/src/mage/sets/FinalFantasy.java | 1 + .../game/permanent/token/Horror3Token.java | 28 ++++++++++ 3 files changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TheFinalDays.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/Horror3Token.java diff --git a/Mage.Sets/src/mage/cards/t/TheFinalDays.java b/Mage.Sets/src/mage/cards/t/TheFinalDays.java new file mode 100644 index 00000000000..9aee7221cfb --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheFinalDays.java @@ -0,0 +1,52 @@ +package mage.cards.t; + +import mage.abilities.condition.common.CastFromGraveyardSourceCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.Horror3Token; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TheFinalDays extends CardImpl { + + private static final DynamicValue xValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE); + private static final Hint hint = new ValueHint("Creature cards in your graveyard", xValue); + + public TheFinalDays(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + + // Create two tapped 2/2 black Horror creature tokens. If this spell was cast from a graveyard, instead create X of those tokens, where X is the number of creature cards in your graveyard. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new CreateTokenEffect(new Horror3Token(), xValue), new CreateTokenEffect(new Horror3Token(), 2), + CastFromGraveyardSourceCondition.instance, "create two tapped 2/2 black Horror creature tokens. " + + "If this spell was cast from a graveyard, instead create X of those tokens, " + + "where X is the number of creature cards in your graveyard" + )); + this.getSpellAbility().addHint(hint); + + // Flashback {4}{B}{B} + this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{4}{B}{B}"))); + } + + private TheFinalDays(final TheFinalDays card) { + super(card); + } + + @Override + public TheFinalDays copy() { + return new TheFinalDays(this); + } +} diff --git a/Mage.Sets/src/mage/sets/FinalFantasy.java b/Mage.Sets/src/mage/sets/FinalFantasy.java index f5bb8c6b009..9433e39c31a 100644 --- a/Mage.Sets/src/mage/sets/FinalFantasy.java +++ b/Mage.Sets/src/mage/sets/FinalFantasy.java @@ -443,6 +443,7 @@ public final class FinalFantasy extends ExpansionSet { cards.add(new SetCardInfo("The Earth Crystal", 342, Rarity.RARE, mage.cards.t.TheEarthCrystal.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("The Emperor of Palamecia", 219, Rarity.UNCOMMON, mage.cards.t.TheEmperorOfPalamecia.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("The Emperor of Palamecia", 484, Rarity.UNCOMMON, mage.cards.t.TheEmperorOfPalamecia.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The Final Days", 101, Rarity.UNCOMMON, mage.cards.t.TheFinalDays.class)); cards.add(new SetCardInfo("The Fire Crystal", 135, Rarity.RARE, mage.cards.t.TheFireCrystal.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("The Fire Crystal", 337, Rarity.RARE, mage.cards.t.TheFireCrystal.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("The Gold Saucer", 279, Rarity.UNCOMMON, mage.cards.t.TheGoldSaucer.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/Horror3Token.java b/Mage/src/main/java/mage/game/permanent/token/Horror3Token.java new file mode 100644 index 00000000000..a18c2b74d35 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/Horror3Token.java @@ -0,0 +1,28 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class Horror3Token extends TokenImpl { + + public Horror3Token() { + super("Horror Token", "2/2 black Horror creature token"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add(SubType.HORROR); + power = new MageInt(2); + toughness = new MageInt(2); + } + + private Horror3Token(final Horror3Token token) { + super(token); + } + + public Horror3Token copy() { + return new Horror3Token(this); + } +}