diff --git a/Mage.Sets/src/mage/cards/m/MoonstoneHarshMistress.java b/Mage.Sets/src/mage/cards/m/MoonstoneHarshMistress.java new file mode 100644 index 000000000000..2a8bddf3c8ca --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MoonstoneHarshMistress.java @@ -0,0 +1,93 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DiscardCardControllerTriggeredAbility; +import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; +import mage.util.CardUtil; + +import java.util.UUID; + +/** + * @author muz + */ +public final class MoonstoneHarshMistress extends CardImpl { + + public MoonstoneHarshMistress(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DOCTOR); + this.subtype.add(SubType.VILLAIN); + + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever you discard a card, you may exile that card from your graveyard. If you do, until the end of your next turn, you may play that card. + this.addAbility(new DiscardCardControllerTriggeredAbility(new MoonstoneHarshMistressEffect(), true)); + } + + private MoonstoneHarshMistress(final MoonstoneHarshMistress card) { + super(card); + } + + @Override + public MoonstoneHarshMistress copy() { + return new MoonstoneHarshMistress(this); + } +} + +class MoonstoneHarshMistressEffect extends OneShotEffect { + + MoonstoneHarshMistressEffect() { + super(Outcome.Benefit); + staticText = "exile that card from your graveyard. If you do, " + + "until the end of your next turn, you may play that card"; + } + + private MoonstoneHarshMistressEffect(final MoonstoneHarshMistressEffect effect) { + super(effect); + } + + @Override + public MoonstoneHarshMistressEffect copy() { + return new MoonstoneHarshMistressEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Card card = (Card) getValue("discardedCard"); + if (card == null || player == null) { + return false; + } + + player.moveCardsToExile( + card, source, game, true, + CardUtil.getExileZoneId(game, source), + CardUtil.getSourceName(game, source) + ); + + game.addEffect(new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED,Duration.UntilEndOfYourNextTurn) + .setTargetPointer(new FixedTarget(card.getId(), game)), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/MarvelSuperHeroes.java b/Mage.Sets/src/mage/sets/MarvelSuperHeroes.java index 0c78fb74a146..a75b33958390 100644 --- a/Mage.Sets/src/mage/sets/MarvelSuperHeroes.java +++ b/Mage.Sets/src/mage/sets/MarvelSuperHeroes.java @@ -221,6 +221,8 @@ private MarvelSuperHeroes() { cards.add(new SetCardInfo("Monica Rambeau", 356, Rarity.MYTHIC, mage.cards.m.MonicaRambeau.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Moon Girl and Devil Dinosaur", 223, Rarity.RARE, mage.cards.m.MoonGirlAndDevilDinosaur.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Moon Girl and Devil Dinosaur", 421, Rarity.RARE, mage.cards.m.MoonGirlAndDevilDinosaur.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Moonstone, Harsh Mistress", 107, Rarity.UNCOMMON, mage.cards.m.MoonstoneHarshMistress.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Moonstone, Harsh Mistress", 447, Rarity.UNCOMMON, mage.cards.m.MoonstoneHarshMistress.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 440, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Mountain", 439, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Mountain", 284, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));