Menu

Submission for Nivix Guildmage

186

Comment

tested in magarena 1.43

Config

name=Nivix Guildmage
url=http://magiccards.info/rtr/en/182.html
image=http://magiccards.info/scans/en/rtr/182.jpg
value=3.750
rarity=U
type=Creature
subtype=Human,Wizard
cost={U}{R}
pt=2/2
timing=main
requires_groovy_code

Script

[
     new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Draw),
        "Draw"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicPayManaCostEvent(source,"{1}{U}{R}")];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "PN draws a card, then discards a card."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPlayer player = event.getPlayer();
            game.doAction(new MagicDrawAction(player));
            game.addEvent(new MagicDiscardEvent(event.getPermanent(),player));
        }
    },
	new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Spell),
        "Copy"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicPayManaCostEvent(source,"{2}{U}{R}")];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_INSTANT_OR_SORCERY_SPELL,
                this,
                "Copy target instant or sorcery spell\$. You may choose new targets for the copy."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
                public void doAction(final MagicCardOnStack targetSpell) {
                    game.doAction(new MagicCopyCardOnStackAction(event.getPlayer(),targetSpell));  
                }
            });
        }
    }	
]
Pushed