Menu

Submission for Voracious Cobra

288

Config

name=Voracious Cobra
image=http://mtgimage.com/card/voracious%20cobra.jpg
value=2.500
rarity=U
type=Creature
subtype=Snake
cost={2}{R}{G}
pt=2/2
ability=First strike
timing=main
requires_groovy_code
oracle=First strike. Whenever Voracious Cobra deals combat damage to a creature, destroy that creature.

Script

[
    new MagicWhenDamageIsDealtTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
            return (damage.isSource(permanent) && damage.isTargetCreature() && damage.isCombat()) ?
                new MagicEvent(
                    permanent,
                    damage.getTarget(),
                    this,
                    "Destroy RN."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processRefPermanent(game, {
                game.doAction(new MagicDestroyAction(it));
            });
        }
    }
]
Pushed