Menu

Submission for Dragon Mage

124

Config

name=Dragon Mage
image=http://magiccards.info/scans/en/sc/87.jpg
value=2.500
rarity=R
type=Creature
subtype=Dragon,Wizard
cost={5}{R}{R}
pt=5/5
ability=Flying
timing=main
requires_groovy_code
oracle=Flying\nWhenever Dragon Mage deals combat damage to a player, each player discards his or her hand, then draws seven cards.

Script

[
    new MagicWhenSelfCombatDamagePlayerTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
            return new MagicEvent(
                permanent,
                damage.getTargetPlayer(),
                this,
                "Each player discards his or her hand, then draws seven cards."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            for (final MagicPlayer player : game.getAPNAP()) {
                final MagicCardList hand = new MagicCardList(player.getHand());
                for (final MagicCard card : hand) {
                    game.doAction(new DiscardCardAction(player,card));
                }
            }
            for (final MagicPlayer player : game.getAPNAP()) {
                game.doAction(new DrawAction(player, 7));
            }
        }
    }
]
Pushed