Menu

Submission for Gempalm Polluter

70

Config

name=Gempalm Polluter
image=http://mtgimage.com/card/gempalm%20polluter.jpg
value=2.500
rarity=C
type=Creature
subtype=Zombie
cost={5}{B}
pt=4/3
ability=Cycling {B}{B}
timing=main
requires_groovy_code
oracle=Cycling {B}{B}. When you cycle Gempalm Polluter, you may have target player lose life equal to the number of Zombies on the battlefield.

Script

[
    new MagicWhenCycleTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicCard card) {
            return new MagicEvent(
                card,
                MagicTargetChoice.NEG_TARGET_PLAYER,
                this,
                "When you cycle SN, you may have target player\$ lose X life, "+
                "where X is the number of Zombies on the battlefield."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game,{
                final int X = game.getNrOfPermanents(MagicSubType.Zombie);
                game.doAction(new MagicChangeLifeAction(it,-X));
            });
        }
    }
]
Pushed