Menu

Submission for Harvest Wurm

72

Config

name=Harvest Wurm
image=http://magiccards.info/scans/en/wl/72.jpg
value=2.500
rarity=C
type=Creature
subtype=Wurm
cost={1}{G}
pt=3/2
timing=main
requires_groovy_code
oracle=When Harvest Wurm enters the battlefield, sacrifice it unless you return a basic land card from your graveyard to your hand.

Script

def effect = MagicRuleEventAction.create("return a basic land card from your graveyard to your hand.");

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return new MagicEvent(
                permanent,
                new MagicMayChoice("Return a basic land card to your hand?"),
                this,
                "PN may\$ return a basic land card from his or her graveyard to PN's hand. " +
                "If he or she doesn't, sacrifice SN."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes() && BASIC_LAND_CARD_FROM_YOUR_GRAVEYARD.filter(game).size() >= 1) {
                game.addEvent(effect.getEvent(event));
            } else {
                game.doAction(new SacrificeAction(event.getPermanent()));
            }
        }
    }
]
Pushed