diff --git a/Mage.Sets/src/mage/cards/s/SandScout.java b/Mage.Sets/src/mage/cards/s/SandScout.java new file mode 100644 index 00000000000..0380fa02aae --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SandScout.java @@ -0,0 +1,65 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.OpponentControlsMoreCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.game.permanent.token.HazezonTamarSandWarriorToken; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class SandScout extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Desert card"); + + static { + filter.add(SubType.DESERT.getPredicate()); + } + + private static final Condition condition = new OpponentControlsMoreCondition(StaticFilters.FILTER_LAND); + + public SandScout(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Sand Scout enters the battlefield, if an opponent controls more lands than you, search your library for a Desert card, put it onto the battlefield tapped, then shuffle. + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true)), + condition, "When {this} enters the battlefield, if an opponent controls more lands than you, " + + "search your library for a Desert card, put it onto the battlefield tapped, then shuffle." + )); + + // Whenever one or more land cards are put into your graveyard from anywhere, create a 1/1 red, green, and white Sand Warrior creature token. This ability triggers only once each turn. + this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility( + new CreateTokenEffect(new HazezonTamarSandWarriorToken()), false, StaticFilters.FILTER_CARD_LAND, TargetController.YOU + ).setTriggersOnceEachTurn(true)); + } + + private SandScout(final SandScout card) { + super(card); + } + + @Override + public SandScout copy() { + return new SandScout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunctionCommander.java b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunctionCommander.java index 26c600b7b28..a4c343a1807 100644 --- a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunctionCommander.java +++ b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunctionCommander.java @@ -215,6 +215,7 @@ public final class OutlawsOfThunderJunctionCommander extends ExpansionSet { cards.add(new SetCardInfo("Rugged Prairie", 314, Rarity.RARE, mage.cards.r.RuggedPrairie.class)); cards.add(new SetCardInfo("Rumbleweed", 32, Rarity.RARE, mage.cards.r.Rumbleweed.class)); cards.add(new SetCardInfo("Sage of the Beyond", 111, Rarity.RARE, mage.cards.s.SageOfTheBeyond.class)); + cards.add(new SetCardInfo("Sand Scout", 11, Rarity.RARE, mage.cards.s.SandScout.class)); cards.add(new SetCardInfo("Satyr Wayfinder", 204, Rarity.COMMON, mage.cards.s.SatyrWayfinder.class)); cards.add(new SetCardInfo("Scaretiller", 266, Rarity.COMMON, mage.cards.s.Scaretiller.class)); cards.add(new SetCardInfo("Scattered Groves", 315, Rarity.RARE, mage.cards.s.ScatteredGroves.class));