Menu

Submission for Fertilid

54

Config

name=Fertilid
image=http://mtgimage.com/card/fertilid.jpg
value=2.500
rarity=C
type=Creature
subtype=Elemental
cost={2}{G}
pt=0/0
ability=SN enters the battlefield with two +1/+1 counters on it.
timing=main
requires_groovy_code
oracle=Fertilid enters the battlefield with two +1/+1 counters on it. {1}{G}, Remove a +1/+1 counter from Fertilid: Target player searches his or her library for a basic land card and puts it onto the battlefield tapped. Then that player shuffles his or her library.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Draw),
        "Search"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{1}{G}"), 
                new MagicRemoveCounterEvent(source,MagicCounterType.PlusOne,1)
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.POS_TARGET_PLAYER,
                this,
                "Target player\$ searches his or her library for a basic land card and puts it onto the battlefield tapped. " +
                "Then that player shuffles his or her library."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game, {
                game.addEvent(new MagicSearchOntoBattlefieldEvent(
                event,
                new MagicFromCardFilterChoice(
                    MagicTargetFilterFactory.BASIC_LAND_CARD_FROM_LIBRARY,
                    1, 
                    true, 
                    "to put onto the battlefield tapped"
                ),
                MagicPlayMod.TAPPED
                ));
            });
        }
    }
]
Pushed