From 37cfaafc495c58acf03153167d33db6c074e7cad Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 20 May 2025 09:11:34 -0400 Subject: [PATCH] [FIN] Implement From Father to Son --- .../src/mage/cards/f/FromFatherToSon.java | 53 +++++++++++++++++++ Mage.Sets/src/mage/sets/FinalFantasy.java | 1 + Utils/mtg-cards-data.txt | 1 + 3 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FromFatherToSon.java diff --git a/Mage.Sets/src/mage/cards/f/FromFatherToSon.java b/Mage.Sets/src/mage/cards/f/FromFatherToSon.java new file mode 100644 index 00000000000..5efb5d11515 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FromFatherToSon.java @@ -0,0 +1,53 @@ +package mage.cards.f; + +import mage.abilities.condition.common.CastFromGraveyardSourceCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FromFatherToSon extends CardImpl { + + private static final FilterCard filter = new FilterCard("Vehicle card"); + + static { + filter.add(SubType.VEHICLE.getPredicate()); + } + + public FromFatherToSon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}"); + + // Search your library for a Vehicle card, reveal it, and put it into your hand. If this spell was cast from a graveyard, put that card onto the battlefield instead. Then shuffle. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), + CastFromGraveyardSourceCondition.instance, "search your library for a Vehicle card, " + + "reveal it, and put it into your hand. If this spell was cast from a graveyard, " + + "put that card onto the battlefield instead. Then shuffle" + )); + + // Flashback {4}{W}{W}{W} + this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{4}{W}{W}{W}"))); + } + + private FromFatherToSon(final FromFatherToSon card) { + super(card); + } + + @Override + public FromFatherToSon copy() { + return new FromFatherToSon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/FinalFantasy.java b/Mage.Sets/src/mage/sets/FinalFantasy.java index 61ac01f18f5..7ebcdd07b06 100644 --- a/Mage.Sets/src/mage/sets/FinalFantasy.java +++ b/Mage.Sets/src/mage/sets/FinalFantasy.java @@ -130,6 +130,7 @@ public final class FinalFantasy extends ExpansionSet { cards.add(new SetCardInfo("Forest", 576, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Freya Crescent", 138, Rarity.UNCOMMON, mage.cards.f.FreyaCrescent.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Freya Crescent", 460, Rarity.UNCOMMON, mage.cards.f.FreyaCrescent.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("From Father to Son", 20, Rarity.RARE, mage.cards.f.FromFatherToSon.class)); cards.add(new SetCardInfo("Galian Beast", 125, Rarity.RARE, mage.cards.g.GalianBeast.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Galian Beast", 383, Rarity.RARE, mage.cards.g.GalianBeast.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Galian Beast", 454, Rarity.RARE, mage.cards.g.GalianBeast.class, NON_FULL_USE_VARIOUS)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index e28ff88f594..be165df4cb5 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -57636,6 +57636,7 @@ The Crystal's Chosen|Final Fantasy|14|U|{5}{W}{W}|Sorcery|||Create four 1/1 colo Dragoon's Lance|Final Fantasy|17|U|{1}{W}|Artifact - Equipment|||Job select$Equipped creature gets +1/+0 and is a Knight in addition to its other types.$During your turn, equipped creature has flying.$Gae Bolg -- Equip {4}| Dwarven Castle Guard|Final Fantasy|18|C|{1}{W}|Creature - Dwarf Soldier|2|1|When this creature dies, create a 1/1 colorless Hero creature token.| Fate of the Sun-Cryst|Final Fantasy|19|C|{4}{W}|Instant|||This spell costs {2} less to cast if it targets a tapped creature.$Destroy target nonland permanent.| +From Father to Son|Final Fantasy|20|R|{1}{W}|Sorcery|||Search your library for a Vehicle card, reveal it, and put it into your hand. If this spell was cast from a graveyard, put that card onto the battlefield instead. Then shuffle.$Flashback {4}{W}{W}{W}| Machinist's Arsenal|Final Fantasy|23|R|{4}{W}|Artifact - Equipment|||Job select$Equipped creature gets +2/+2 for each artifact you control and is an Artificer in addition to its other types.$Machina -- Equip {4}| Moogles' Valor|Final Fantasy|27|R|{3}{W}{W}|Instant|||For each creature you control, create a 1/2 white Moogle creature token with lifelink. Then creatures you control gain indestructible until end of turn.| Paladin's Arms|Final Fantasy|28|C|{2}{W}|Artifact - Equipment|||Job select$Equipped creature gets +2/+1, has ward {1}, and is a Knight in addition to its other types.$Lightbringer and Hero's Shield -- Equip {4}|