From 173e563a91fa46cbb92f8f1c623bff27419e631e Mon Sep 17 00:00:00 2001 From: theelk801 Date: Mon, 1 Apr 2024 16:41:04 -0400 Subject: [PATCH] [OTJ] Implement Take for a Ride --- Mage.Sets/src/mage/cards/t/TakeForARide.java | 55 +++++++++++++++++++ .../mage/sets/OutlawsOfThunderJunction.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TakeForARide.java diff --git a/Mage.Sets/src/mage/cards/t/TakeForARide.java b/Mage.Sets/src/mage/cards/t/TakeForARide.java new file mode 100644 index 00000000000..f295722e9ab --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TakeForARide.java @@ -0,0 +1,55 @@ +package mage.cards.t; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CommittedCrimeCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.CommittedCrimeWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TakeForARide extends CardImpl { + + public TakeForARide(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); + + // Take for a Ride has flash as long as you've committed a crime this turn. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, + new ConditionalContinuousEffect(new GainAbilitySourceEffect( + FlashAbility.getInstance(), Duration.WhileOnBattlefield, true + ), CommittedCrimeCondition.instance, "{this} has flash as long as you've committed a crime this turn") + ).setRuleAtTheTop(true).addHint(CommittedCrimeCondition.getHint()), new CommittedCrimeWatcher()); + + // Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect( + HasteAbility.getInstance(), Duration.EndOfTurn + ).setText("It gains haste until end of turn.")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private TakeForARide(final TakeForARide card) { + super(card); + } + + @Override + public TakeForARide copy() { + return new TakeForARide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java index 6b4dba659f2..dbca3b65efa 100644 --- a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java +++ b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java @@ -214,6 +214,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet { cards.add(new SetCardInfo("Stoic Sphinx", 71, Rarity.RARE, mage.cards.s.StoicSphinx.class)); cards.add(new SetCardInfo("Stubborn Burrowfiend", 184, Rarity.UNCOMMON, mage.cards.s.StubbornBurrowfiend.class)); cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Take for a Ride", 148, Rarity.UNCOMMON, mage.cards.t.TakeForARide.class)); cards.add(new SetCardInfo("Terror of the Peaks", 149, Rarity.MYTHIC, mage.cards.t.TerrorOfThePeaks.class)); cards.add(new SetCardInfo("The Key to the Vault", 54, Rarity.RARE, mage.cards.t.TheKeyToTheVault.class)); cards.add(new SetCardInfo("This Town Ain't Big Enough", 74, Rarity.UNCOMMON, mage.cards.t.ThisTownAintBigEnough.class));