From 75f4cb1159b430bdedffa9e57be208bf8b93c094 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sun, 31 Mar 2024 16:22:44 -0400 Subject: [PATCH] [OTJ] Implement Dance of the Tumbleweeds --- .../mage/cards/d/DanceOfTheTumbleweeds.java | 89 +++++++++++++++++++ .../mage/sets/OutlawsOfThunderJunction.java | 1 + 2 files changed, 90 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DanceOfTheTumbleweeds.java diff --git a/Mage.Sets/src/mage/cards/d/DanceOfTheTumbleweeds.java b/Mage.Sets/src/mage/cards/d/DanceOfTheTumbleweeds.java new file mode 100644 index 00000000000..4c962d3e219 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DanceOfTheTumbleweeds.java @@ -0,0 +1,89 @@ +package mage.cards.d; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.LandsYouControlCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.hint.common.LandsYouControlHint; +import mage.abilities.keyword.SpreeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.game.Game; +import mage.game.permanent.token.SeedGuardianToken; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DanceOfTheTumbleweeds extends CardImpl { + + private static final FilterCard filter = new FilterCard("basic land card or a Desert card"); + + static { + filter.add(Predicates.or( + Predicates.and( + SuperType.BASIC.getPredicate(), + CardType.LAND.getPredicate() + ), SubType.DESERT.getPredicate() + )); + } + + public DanceOfTheTumbleweeds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}"); + + // Spree + this.addAbility(new SpreeAbility(this)); + + // + {1} -- Search your library for a basic land card or a Desert card, put it onto the battlefield, then shuffle. + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect( + new TargetCardInLibrary(0, 1, filter), true + )); + this.getSpellAbility().withFirstModeCost(new GenericManaCost(1)); + + // + {3} -- Create an X/X green Elemental creature token, where X is the number of lands you control. + this.getSpellAbility().addMode(new Mode(new DanceOfTheTumbleweedsEffect()).withCost(new GenericManaCost(3))); + this.getSpellAbility().addHint(LandsYouControlHint.instance); + } + + private DanceOfTheTumbleweeds(final DanceOfTheTumbleweeds card) { + super(card); + } + + @Override + public DanceOfTheTumbleweeds copy() { + return new DanceOfTheTumbleweeds(this); + } +} + +class DanceOfTheTumbleweedsEffect extends OneShotEffect { + + DanceOfTheTumbleweedsEffect() { + super(Outcome.Benefit); + staticText = "create an X/X green Elemental creature token, where X is the number of lands you control"; + } + + private DanceOfTheTumbleweedsEffect(final DanceOfTheTumbleweedsEffect effect) { + super(effect); + } + + @Override + public DanceOfTheTumbleweedsEffect copy() { + return new DanceOfTheTumbleweedsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return new SeedGuardianToken(LandsYouControlCount.instance.calculate(game, source, this)) + .putOntoBattlefield(1, game, source); + } +} diff --git a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java index d542fbe9ddd..b1118e764d3 100644 --- a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java +++ b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java @@ -66,6 +66,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet { cards.add(new SetCardInfo("Congregation Gryff", 200, Rarity.UNCOMMON, mage.cards.c.CongregationGryff.class)); cards.add(new SetCardInfo("Creosote Heath", 255, Rarity.COMMON, mage.cards.c.CreosoteHeath.class)); cards.add(new SetCardInfo("Cunning Coyote", 118, Rarity.UNCOMMON, mage.cards.c.CunningCoyote.class)); + cards.add(new SetCardInfo("Dance of the Tumbleweeds", 160, Rarity.COMMON, mage.cards.d.DanceOfTheTumbleweeds.class)); cards.add(new SetCardInfo("Deepmuck Desperado", 42, Rarity.UNCOMMON, mage.cards.d.DeepmuckDesperado.class)); cards.add(new SetCardInfo("Demonic Ruckus", 120, Rarity.UNCOMMON, mage.cards.d.DemonicRuckus.class)); cards.add(new SetCardInfo("Desperate Bloodseeker", 86, Rarity.COMMON, mage.cards.d.DesperateBloodseeker.class));