mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[DFT] Implement Pothole Mole
This commit is contained in:
parent
e719cd03a3
commit
8d042af13c
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/p/PotholeMole.java
Normal file
80
Mage.Sets/src/mage/cards/p/PotholeMole.java
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.MillCardsControllerEffect;
|
||||
import mage.cards.Card;
|
||||
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.TargetCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PotholeMole extends CardImpl {
|
||||
|
||||
public PotholeMole(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
|
||||
this.subtype.add(SubType.MOLE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When this creature enters, mill three cards, then you may return a land card from your graveyard to your hand.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new MillCardsControllerEffect(3));
|
||||
ability.addEffect(new PotholeMoleEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private PotholeMole(final PotholeMole card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PotholeMole copy() {
|
||||
return new PotholeMole(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PotholeMoleEffect extends OneShotEffect {
|
||||
|
||||
PotholeMoleEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = ", then you may return a land card from your graveyard to your hand";
|
||||
}
|
||||
|
||||
private PotholeMoleEffect(final PotholeMoleEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PotholeMoleEffect copy() {
|
||||
return new PotholeMoleEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
TargetCard target = new TargetCardInYourGraveyard(
|
||||
0, 1, StaticFilters.FILTER_CARD_LAND, true
|
||||
);
|
||||
player.choose(outcome, player.getGraveyard(), target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
return card != null && player.moveCards(card, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -169,6 +169,7 @@ public final class Aetherdrift extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Plow Through", 174, Rarity.UNCOMMON, mage.cards.p.PlowThrough.class));
|
||||
cards.add(new SetCardInfo("Point the Way", 175, Rarity.UNCOMMON, mage.cards.p.PointTheWay.class));
|
||||
cards.add(new SetCardInfo("Possession Engine", 54, Rarity.RARE, mage.cards.p.PossessionEngine.class));
|
||||
cards.add(new SetCardInfo("Pothole Mole", 176, Rarity.COMMON, mage.cards.p.PotholeMole.class));
|
||||
cards.add(new SetCardInfo("Pride of the Road", 24, Rarity.UNCOMMON, mage.cards.p.PrideOfTheRoad.class));
|
||||
cards.add(new SetCardInfo("Prowcatcher Specialist", 142, Rarity.COMMON, mage.cards.p.ProwcatcherSpecialist.class));
|
||||
cards.add(new SetCardInfo("Pyrewood Gearhulk", 216, Rarity.MYTHIC, mage.cards.p.PyrewoodGearhulk.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue