Menu

Submission for Thawing Glaciers

318

Comment

Should return at cleanup rather than eot, but that doesn't seem to make much difference to me?

Config

name=Thawing Glaciers
image=http://mtgimage.com/card/thawing%20glaciers.jpg
value=2.500
rarity=R
type=Land
ability=SN enters the battlefield tapped.
timing=land
requires_groovy_code
oracle=Thawing Glaciers enters the battlefield tapped. {1}, {T}: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. Return Thawing Glaciers to its owner's hand at the beginning of the next cleanup step.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Main),
        "Search"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source, "{1}"),
                new MagicTapEvent(source)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "PN searches his or her library for a basic land card, puts that card onto the battlefield tapped, "+
                "then shuffles his or her library. Return SN to its owner's hand at the beginning of the next end step."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.addEvent(new MagicSearchOntoBattlefieldEvent(
                event,
                new MagicFromCardFilterChoice(
                    MagicTargetFilterFactory.BASIC_LAND_CARD_FROM_LIBRARY,
                    1, 
                    true, 
                    "to put onto the battlefield tapped"
                ),
                MagicPlayMod.TAPPED
            ));
            game.doAction(new MagicAddTriggerAction(event.getPermanent(),MagicAtEndOfTurnTrigger.Return))
        }
    }
]
Pushed