From 0b49627fde1ba529fb349a64f1bd5dd929d1d7ba Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sun, 11 May 2025 21:38:00 -0400 Subject: [PATCH] [FIC] Implement Sephiroth, Fallen Hero --- .../src/mage/cards/s/SephirothFallenHero.java | 97 +++++++++++++++++++ .../src/mage/sets/FinalFantasyCommander.java | 2 + .../main/java/mage/counters/CounterType.java | 1 + 3 files changed, 100 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SephirothFallenHero.java diff --git a/Mage.Sets/src/mage/cards/s/SephirothFallenHero.java b/Mage.Sets/src/mage/cards/s/SephirothFallenHero.java new file mode 100644 index 00000000000..62be3e2c439 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SephirothFallenHero.java @@ -0,0 +1,97 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.ModifiedPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SephirothFallenHero extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent(); + private static final FilterPermanent filter2 = new FilterPermanent("a modified creature"); + + static { + filter.add(ModifiedPredicate.instance); + filter2.add(ModifiedPredicate.instance); + } + + public SephirothFallenHero(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.AVATAR); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(7); + this.toughness = new MageInt(5); + + // Jenova Cells -- Whenever Sephiroth attacks, you may put a cell counter on target creature. Until end of turn, each modified creature you control has base power and toughness 7/5. + Ability ability = new AttacksTriggeredAbility(new SephirothFallenHeroEffect()); + ability.addEffect(new SetBasePowerToughnessAllEffect(7, 5, Duration.EndOfTurn, filter)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability.withFlavorWord("Jenova Cells")); + + // The Reunion -- {3}, Sacrifice a modified creature: Return this card from your graveyard to the battlefield tapped. + ability = new SimpleActivatedAbility( + Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new GenericManaCost(3) + ); + ability.addCost(new SacrificeTargetCost(filter2)); + this.addAbility(ability.withFlavorWord("The Reunion")); + } + + private SephirothFallenHero(final SephirothFallenHero card) { + super(card); + } + + @Override + public SephirothFallenHero copy() { + return new SephirothFallenHero(this); + } +} + +class SephirothFallenHeroEffect extends OneShotEffect { + + SephirothFallenHeroEffect() { + super(Outcome.Benefit); + staticText = "you may put a cell counter on target creature"; + } + + private SephirothFallenHeroEffect(final SephirothFallenHeroEffect effect) { + super(effect); + } + + @Override + public SephirothFallenHeroEffect copy() { + return new SephirothFallenHeroEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + return player != null && permanent != null + && player.chooseUse(outcome, "Put a cell counter on " + permanent.getIdName() + "?", source, game) + && permanent.addCounters(CounterType.CELL.createInstance(), source, game); + } +} diff --git a/Mage.Sets/src/mage/sets/FinalFantasyCommander.java b/Mage.Sets/src/mage/sets/FinalFantasyCommander.java index f0f0990fe78..8f9fa40e581 100644 --- a/Mage.Sets/src/mage/sets/FinalFantasyCommander.java +++ b/Mage.Sets/src/mage/sets/FinalFantasyCommander.java @@ -36,6 +36,8 @@ public final class FinalFantasyCommander extends ExpansionSet { cards.add(new SetCardInfo("Secret Rendezvous", 218, Rarity.UNCOMMON, mage.cards.s.SecretRendezvous.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Secret Rendezvous", 219, Rarity.UNCOMMON, mage.cards.s.SecretRendezvous.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Secret Rendezvous", 253, Rarity.UNCOMMON, mage.cards.s.SecretRendezvous.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sephiroth, Fallen Hero", 182, Rarity.RARE, mage.cards.s.SephirothFallenHero.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sephiroth, Fallen Hero", 92, Rarity.RARE, mage.cards.s.SephirothFallenHero.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Terra, Herald of Hope", 186, Rarity.MYTHIC, mage.cards.t.TerraHeraldOfHope.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Terra, Herald of Hope", 204, Rarity.MYTHIC, mage.cards.t.TerraHeraldOfHope.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Terra, Herald of Hope", 212, Rarity.MYTHIC, mage.cards.t.TerraHeraldOfHope.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index 31da045ff90..6cd4529ef60 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -38,6 +38,7 @@ public enum CounterType { BURDEN("burden"), CAGE("cage"), CARRION("carrion"), + CELL("cell"), CHARGE("charge"), CHIP("chip"), CHORUS("chorus"),