mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Implemented Dryad Greenseeker
This commit is contained in:
parent
5328b84089
commit
1be596e108
2 changed files with 88 additions and 0 deletions
87
Mage.Sets/src/mage/cards/d/DryadGreenseeker.java
Normal file
87
Mage.Sets/src/mage/cards/d/DryadGreenseeker.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DryadGreenseeker extends CardImpl {
|
||||
|
||||
public DryadGreenseeker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
||||
this.subtype.add(SubType.DRYAD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}: Look at the top card of your library. If it's a land card, you may reveal it and put it into your hand.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new DryadGreenseekerEffect(),
|
||||
new TapSourceCost()
|
||||
));
|
||||
}
|
||||
|
||||
public DryadGreenseeker(final DryadGreenseeker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DryadGreenseeker copy() {
|
||||
return new DryadGreenseeker(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DryadGreenseekerEffect extends OneShotEffect {
|
||||
|
||||
public DryadGreenseekerEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Look at the top card of your library. "
|
||||
+ "If it's a land card, you may reveal it and put it into your hand.";
|
||||
}
|
||||
|
||||
public DryadGreenseekerEffect(final DryadGreenseekerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DryadGreenseekerEffect copy() {
|
||||
return new DryadGreenseekerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
player.lookAtCards(null, card, game);
|
||||
if (!card.isLand()) {
|
||||
return true;
|
||||
}
|
||||
if (!player.chooseUse(outcome, "Reveal " + card.getName() + " and put it into your hand?", source, game)) {
|
||||
return true;
|
||||
}
|
||||
player.revealCards(source, new CardsImpl(card), game);
|
||||
return player.moveCards(card, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
|
@ -78,6 +78,7 @@ public final class CoreSet2019 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Divination", 51, Rarity.COMMON, mage.cards.d.Divination.class));
|
||||
cards.add(new SetCardInfo("Draconic Disciple", 215, Rarity.UNCOMMON, mage.cards.d.DraconicDisciple.class));
|
||||
cards.add(new SetCardInfo("Druid of the Cowl", 177, Rarity.COMMON, mage.cards.d.DruidOfTheCowl.class));
|
||||
cards.add(new SetCardInfo("Dryad Greenseeker", 178, Rarity.UNCOMMON, mage.cards.d.DryadGreenseeker.class));
|
||||
cards.add(new SetCardInfo("Dwarven Priest", 11, Rarity.COMMON, mage.cards.d.DwarvenPriest.class));
|
||||
cards.add(new SetCardInfo("Dwindle", 53, Rarity.COMMON, mage.cards.d.Dwindle.class));
|
||||
cards.add(new SetCardInfo("Electrify", 139, Rarity.COMMON, mage.cards.e.Electrify.class));
|
||||
|
|
Loading…
Reference in a new issue