From 37158ffec9152047d64bab128c7669d04ac0c379 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 1 Jul 2021 08:48:38 -0400 Subject: [PATCH] [AFR] Implemented Find the Path --- Mage.Sets/src/mage/cards/f/FindThePath.java | 57 +++++++++++++++++++ .../sets/AdventuresInTheForgottenRealms.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FindThePath.java diff --git a/Mage.Sets/src/mage/cards/f/FindThePath.java b/Mage.Sets/src/mage/cards/f/FindThePath.java new file mode 100644 index 00000000000..b3d68b92d64 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FindThePath.java @@ -0,0 +1,57 @@ +package mage.cards.f; + +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.keyword.VentureIntoTheDungeonEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.target.TargetPermanent; +import mage.target.common.TargetLandPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FindThePath extends CardImpl { + + public FindThePath(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Find the Path enters the battlefield, venture into the dungeon. + this.addAbility(new EntersBattlefieldTriggeredAbility(new VentureIntoTheDungeonEffect())); + + // Enchanted land has "{T}: Add {G}{G}." + this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect( + new SimpleManaAbility( + Zone.BATTLEFIELD, new Mana(ManaType.GREEN, 2), new TapSourceCost() + ), AttachmentType.AURA + ))); + } + + private FindThePath(final FindThePath card) { + super(card); + } + + @Override + public FindThePath copy() { + return new FindThePath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java index 6de2a318b17..37a155a8b3e 100644 --- a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java +++ b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java @@ -53,6 +53,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet { cards.add(new SetCardInfo("Evolving Wilds", 256, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); cards.add(new SetCardInfo("Fates' Reversal", 102, Rarity.COMMON, mage.cards.f.FatesReversal.class)); cards.add(new SetCardInfo("Fifty Feet of Rope", 244, Rarity.UNCOMMON, mage.cards.f.FiftyFeetOfRope.class)); + cards.add(new SetCardInfo("Find the Path", 183, Rarity.COMMON, mage.cards.f.FindThePath.class)); cards.add(new SetCardInfo("Flumph", 15, Rarity.RARE, mage.cards.f.Flumph.class)); cards.add(new SetCardInfo("Forest", 278, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Gloom Stalker", 16, Rarity.COMMON, mage.cards.g.GloomStalker.class));