From ef25f9566e15566822dae09a6a7f9299f209fd7b Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:46:50 +0200 Subject: [PATCH] [OTJ] Implement Claim Jumper --- Mage.Sets/src/mage/cards/c/ClaimJumper.java | 76 +++++++++++++++++++ .../mage/sets/OutlawsOfThunderJunction.java | 1 + 2 files changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ClaimJumper.java diff --git a/Mage.Sets/src/mage/cards/c/ClaimJumper.java b/Mage.Sets/src/mage/cards/c/ClaimJumper.java new file mode 100644 index 00000000000..505e293e3cc --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ClaimJumper.java @@ -0,0 +1,76 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.OpponentControlsMoreCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class ClaimJumper extends CardImpl { + + private static final FilterCard filter = new FilterCard("Plains card"); + + static { + filter.add(SubType.PLAINS.getPredicate()); + } + + public ClaimJumper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.RABBIT); + this.subtype.add(SubType.MERCENARY); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // When Claim Jumper enters the battlefield, if an opponent controls more lands than you, you may search your library for a Plains card and put it onto the battlefield tapped. Then if an opponent controls more lands than you, repeat this process once. If you search your library this way, shuffle. + Ability ability = new ConditionalInterveningIfTriggeredAbility( + new EntersBattlefieldTriggeredAbility( + new SearchLibraryPutInPlayEffect( + new TargetCardInLibrary(0, 1, filter), true + ), + true + ), + new OpponentControlsMoreCondition(StaticFilters.FILTER_LANDS), + "When Claim Jumper enters the battlefield, if an opponent controls more lands than you, " + + "you may search your library for a Plains card and put it onto the battlefield tapped. " + + "Then if an opponent controls more lands than you, repeat this process once. " + + "If you search your library this way, shuffle." + ); + ability.addEffect( + new ConditionalOneShotEffect( + new SearchLibraryPutInPlayEffect( + new TargetCardInLibrary(0, 1, filter), true, false, true + ), + new OpponentControlsMoreCondition(StaticFilters.FILTER_LANDS) + ) + ); + this.addAbility(ability); + } + + private ClaimJumper(final ClaimJumper card) { + super(card); + } + + @Override + public ClaimJumper copy() { + return new ClaimJumper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java index 27a7b4b5a00..c2cc5ecdba7 100644 --- a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java +++ b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java @@ -61,6 +61,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet { cards.add(new SetCardInfo("Canyon Crab", 40, Rarity.UNCOMMON, mage.cards.c.CanyonCrab.class)); cards.add(new SetCardInfo("Caught in the Crossfire", 117, Rarity.UNCOMMON, mage.cards.c.CaughtInTheCrossfire.class)); cards.add(new SetCardInfo("Caustic Bronco", 82, Rarity.RARE, mage.cards.c.CausticBronco.class)); + cards.add(new SetCardInfo("Claim Jumper", 8, Rarity.RARE, mage.cards.c.ClaimJumper.class)); cards.add(new SetCardInfo("Colossal Rattlewurm", 159, Rarity.RARE, mage.cards.c.ColossalRattlewurm.class)); cards.add(new SetCardInfo("Concealed Courtyard", 268, Rarity.RARE, mage.cards.c.ConcealedCourtyard.class)); cards.add(new SetCardInfo("Congregation Gryff", 200, Rarity.UNCOMMON, mage.cards.c.CongregationGryff.class));