Menu

Submission for Terra Ravager

126

Config

name=Terra Ravager
image=http://mtgimage.com/card/terra%20ravager.jpg
value=2.500
rarity=U
type=Creature
subtype=Elemental,Beast
cost={2}{R}{R}
pt=0/4
timing=main
requires_groovy_code
oracle=Whenever Terra Ravager attacks, it gets +X/+0 until end of turn, where X is the number of lands defending player controls.

Script

[
    new MagicWhenSelfAttacksTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent attacker) {
            return new MagicEvent(
                permanent,
                this,
                "SN gets +X/+0 until end of turn, where X is the number of lands defending player controls."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int X = game.getDefendingPlayer().getNrOfPermanents(MagicType.Land);
            game.doAction(new MagicChangeTurnPTAction(event.getPermanent(), +X, 0));
        }
    }
]
Pushed