Menu

Submission for Shockmaw Dragon

114

Config

name=Shockmaw Dragon
image=http://mtgimage.com/card/shockmaw%20dragon.jpg
value=2.500
rarity=U
type=Creature
subtype=Dragon
cost={4}{R}{R}
pt=4/4
ability=Flying
timing=main
requires_groovy_code
oracle=Flying. Whenever Shockmaw Dragon deals combat damage to a player, it deals 1 damage to each creature that player controls.

Script

[
    new MagicWhenSelfCombatDamagePlayerTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
            return new MagicEvent(
                permanent,
                damage.getTargetPlayer(),
                this,
                "SN deals 1 damage to each creature RN controls."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final Collection<MagicPermanent> creatures =
            game.filterPermanents(event.getRefPlayer(),MagicTargetFilterFactory.CREATURE_YOU_CONTROL);
            for (final MagicPermanent creature : creatures) {
                final MagicDamage damage = new MagicDamage(event.getSource(),creature,1);
                game.doAction(new MagicDealDamageAction(damage));
            }
        }
    }
]
Pushed