Menu

Submission for Wellwisher

15

Config

name=Wellwisher
image=http://mtgimage.com/card/wellwisher.jpg
value=2.500
rarity=C
type=Creature
subtype=Elf
cost={1}{G}
pt=1/1
timing=main
requires_groovy_code
oracle={T}: You gain 1 life for each Elf on the battlefield.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Life"
    ) {

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

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "SN gains 1 life for each elf in play."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
                final int amount = game.getNrOfPermanents(MagicSubType.Elf);
                game.doAction(new MagicChangeLifeAction(event.getPlayer(), amount));
        }
    }
]
Pushed