From 3140570486b2aaafb72f8d6f278e8f8a8fbb6d75 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 28 May 2025 07:26:35 -0400 Subject: [PATCH] [FIN] Implement Summon: G.F. Cerberus --- .../src/mage/cards/s/SummonGFCerberus.java | 93 +++++++++++++++++++ Mage.Sets/src/mage/sets/FinalFantasy.java | 2 + 2 files changed, 95 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SummonGFCerberus.java diff --git a/Mage.Sets/src/mage/cards/s/SummonGFCerberus.java b/Mage.Sets/src/mage/cards/s/SummonGFCerberus.java new file mode 100644 index 00000000000..65592498f6d --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SummonGFCerberus.java @@ -0,0 +1,93 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SagaAbility; +import mage.abilities.common.delayed.CopyNextSpellDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.keyword.SurveilEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SagaChapter; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.stack.Spell; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SummonGFCerberus extends CardImpl { + + public SummonGFCerberus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.SAGA); + this.subtype.add(SubType.DOG); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.) + SagaAbility sagaAbility = new SagaAbility(this); + + // I -- Surveil 1. + sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new SurveilEffect(1)); + + // II -- Double -- When you next cast an instant or sorcery spell this turn, copy it. You may choose new targets for the copy. + sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, ability -> { + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new CopyNextSpellDelayedTriggeredAbility())); + ability.withFlavorWord("Double"); + }); + + // III -- Triple -- When you next cast an instant or sorcery spell this turn, copy it twice. You may choose new targets for the copies. + sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, ability -> { + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new CopyNextSpellDelayedTriggeredAbility( + StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, new SummonGFCerberusEffect(), + "When you next cast an instant or sorcery spell this turn, " + + "copy it twice. You may choose new targets for the copies." + ))); + ability.withFlavorWord("Triple"); + }); + this.addAbility(sagaAbility); + } + + private SummonGFCerberus(final SummonGFCerberus card) { + super(card); + } + + @Override + public SummonGFCerberus copy() { + return new SummonGFCerberus(this); + } +} + +class SummonGFCerberusEffect extends OneShotEffect { + + SummonGFCerberusEffect() { + super(Outcome.Benefit); + } + + private SummonGFCerberusEffect(final SummonGFCerberusEffect effect) { + super(effect); + } + + @Override + public SummonGFCerberusEffect copy() { + return new SummonGFCerberusEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = (Spell) getValue("spellCast"); + if (spell != null) { + spell.createCopyOnStack(game, source, source.getControllerId(), true, 2); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/FinalFantasy.java b/Mage.Sets/src/mage/sets/FinalFantasy.java index b21f641adce..ff16aaa7ea4 100644 --- a/Mage.Sets/src/mage/sets/FinalFantasy.java +++ b/Mage.Sets/src/mage/sets/FinalFantasy.java @@ -479,6 +479,8 @@ public final class FinalFantasy extends ExpansionSet { cards.add(new SetCardInfo("Summon: Esper Maduin", 370, Rarity.RARE, mage.cards.s.SummonEsperMaduin.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Summon: Esper Ramuh", 161, Rarity.UNCOMMON, mage.cards.s.SummonEsperRamuh.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Summon: Esper Ramuh", 367, Rarity.UNCOMMON, mage.cards.s.SummonEsperRamuh.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Summon: G.F. Cerberus", 162, Rarity.RARE, mage.cards.s.SummonGFCerberus.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Summon: G.F. Cerberus", 368, Rarity.RARE, mage.cards.s.SummonGFCerberus.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Summon: Knights of Round", 359, Rarity.MYTHIC, mage.cards.s.SummonKnightsOfRound.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Summon: Knights of Round", 36, Rarity.MYTHIC, mage.cards.s.SummonKnightsOfRound.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Summon: Leviathan", 361, Rarity.RARE, mage.cards.s.SummonLeviathan.class, NON_FULL_USE_VARIOUS));