From 0d582aa764c5742d18720eeecfd4cae6ee938ee9 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 7 Jan 2026 10:11:45 -0500 Subject: [PATCH] [ECL] Implement Tend the Sprigs --- Mage.Sets/src/mage/cards/t/TendTheSprigs.java | 66 +++++++++++++++++++ Mage.Sets/src/mage/sets/LorwynEclipsed.java | 1 + .../permanent/token/TreefolkReachToken.java | 31 +++++++++ 3 files changed, 98 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TendTheSprigs.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/TreefolkReachToken.java diff --git a/Mage.Sets/src/mage/cards/t/TendTheSprigs.java b/Mage.Sets/src/mage/cards/t/TendTheSprigs.java new file mode 100644 index 00000000000..05fc76ffd4d --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TendTheSprigs.java @@ -0,0 +1,66 @@ +package mage.cards.t; + +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.game.permanent.token.TreefolkReachToken; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TendTheSprigs extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(Predicates.or( + CardType.LAND.getPredicate(), + SubType.TREEFOLK.getPredicate() + )); + } + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 6); + private static final Hint hint = new ValueHint( + "Lands and Treefolk you control", new PermanentsOnBattlefieldCount(filter) + ); + + public TendTheSprigs(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); + + // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle. Then if you control seven or more lands and/or Treefolk, create a 3/4 green Treefolk creature token with reach. + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect( + new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true) + ); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new CreateTokenEffect(new TreefolkReachToken()), condition, "Then if you control seven " + + "or more lands and/or Treefolk, create a 3/4 green Treefolk creature token with reach" + )); + this.getSpellAbility().addHint(hint); + } + + private TendTheSprigs(final TendTheSprigs card) { + super(card); + } + + @Override + public TendTheSprigs copy() { + return new TendTheSprigs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/LorwynEclipsed.java b/Mage.Sets/src/mage/sets/LorwynEclipsed.java index 0f8543a10c9..1ceee757207 100644 --- a/Mage.Sets/src/mage/sets/LorwynEclipsed.java +++ b/Mage.Sets/src/mage/sets/LorwynEclipsed.java @@ -155,6 +155,7 @@ public final class LorwynEclipsed extends ExpansionSet { cards.add(new SetCardInfo("Temple Garden", 268, Rarity.RARE, mage.cards.t.TempleGarden.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Temple Garden", 351, Rarity.RARE, mage.cards.t.TempleGarden.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Temporal Cleansing", 78, Rarity.COMMON, mage.cards.t.TemporalCleansing.class)); + cards.add(new SetCardInfo("Tend the Sprigs", 197, Rarity.COMMON, mage.cards.t.TendTheSprigs.class)); cards.add(new SetCardInfo("Thoughtweft Lieutenant", 246, Rarity.UNCOMMON, mage.cards.t.ThoughtweftLieutenant.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Thoughtweft Lieutenant", 343, Rarity.UNCOMMON, mage.cards.t.ThoughtweftLieutenant.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Tweeze", 162, Rarity.COMMON, mage.cards.t.Tweeze.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/TreefolkReachToken.java b/Mage/src/main/java/mage/game/permanent/token/TreefolkReachToken.java new file mode 100644 index 00000000000..3cb64f2faef --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/TreefolkReachToken.java @@ -0,0 +1,31 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.ReachAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class TreefolkReachToken extends TokenImpl { + + public TreefolkReachToken() { + super("Treefolk Token", "3/4 green Treefolk creature token with reach"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.TREEFOLK); + power = new MageInt(3); + toughness = new MageInt(4); + + addAbility(ReachAbility.getInstance()); + } + + private TreefolkReachToken(final TreefolkReachToken token) { + super(token); + } + + public TreefolkReachToken copy() { + return new TreefolkReachToken(this); + } +}