Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions Mage.Sets/src/mage/cards/m/MoonstoneHarshMistress.java
Original file line number Diff line number Diff line change
@@ -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;
}
}
2 changes: 2 additions & 0 deletions Mage.Sets/src/mage/sets/MarvelSuperHeroes.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Loading