diff --git a/Mage.Sets/src/mage/cards/t/TazeemRaptor.java b/Mage.Sets/src/mage/cards/t/TazeemRaptor.java new file mode 100644 index 0000000000..0a150869ea --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TazeemRaptor.java @@ -0,0 +1,79 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TazeemRaptor extends CardImpl { + + public TazeemRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.BIRD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Tazeem Raptor enters the battlefield, you may return a land you control to its owner's hand. + this.addAbility(new EntersBattlefieldTriggeredAbility(new TazeemRaptorEffect(), true)); + } + + private TazeemRaptor(final TazeemRaptor card) { + super(card); + } + + @Override + public TazeemRaptor copy() { + return new TazeemRaptor(this); + } +} + +class TazeemRaptorEffect extends OneShotEffect { + + TazeemRaptorEffect() { + super(Outcome.Benefit); + staticText = "return a land you control to its owner's hand"; + } + + private TazeemRaptorEffect(final TazeemRaptorEffect effect) { + super(effect); + } + + @Override + public TazeemRaptorEffect copy() { + return new TazeemRaptorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + TargetPermanent target = new TargetControlledPermanent( + 0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND, true + ); + player.choose(outcome, target, source.getSourceId(), game); + return player.moveCards(game.getCard(target.getFirstTarget()), Zone.HAND, source, game); + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarRising.java b/Mage.Sets/src/mage/sets/ZendikarRising.java index 42b48c9b28..a2d7581dbb 100644 --- a/Mage.Sets/src/mage/sets/ZendikarRising.java +++ b/Mage.Sets/src/mage/sets/ZendikarRising.java @@ -286,6 +286,7 @@ public final class ZendikarRising extends ExpansionSet { cards.add(new SetCardInfo("Tangled Florahedron", 211, Rarity.UNCOMMON, mage.cards.t.TangledFlorahedron.class)); cards.add(new SetCardInfo("Tangled Vale", 211, Rarity.UNCOMMON, mage.cards.t.TangledVale.class)); cards.add(new SetCardInfo("Taunting Arbormage", 212, Rarity.UNCOMMON, mage.cards.t.TauntingArbormage.class)); + cards.add(new SetCardInfo("Tazeem Raptor", 43, Rarity.COMMON, mage.cards.t.TazeemRaptor.class)); cards.add(new SetCardInfo("Tazri, Beacon of Unity", 44, Rarity.MYTHIC, mage.cards.t.TazriBeaconOfUnity.class)); cards.add(new SetCardInfo("Teeterpeak Ambusher", 169, Rarity.COMMON, mage.cards.t.TeeterpeakAmbusher.class)); cards.add(new SetCardInfo("Thwart the Grave", 130, Rarity.UNCOMMON, mage.cards.t.ThwartTheGrave.class));