Menu

Submission for Granger Guildmage

118

Comment

tested in magarena 1.43

Config

name=Granger Guildmage
url=http://magiccards.info/mi/en/.html
image=http://magiccards.info/scans/en/mi/.jpg
value=2.500
rarity=C
type=Creature
subtype=Human,Wizard
cost={G}
pt=1/1
timing=main
name=Granger Guildmage
url=http://magiccards.info/mr/en/118.html
image=http://magiccards.info/scans/en/mr/118.jpg
value=3.430
rarity=C
type=Creature
subtype=Human,Wizard
cost={G}
pt=1/1
ability=pay {W},{T}: Target creature gains first strike until end of turn.
timing=main
requires_groovy_code

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Damage"
    ) {

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

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
                new MagicDamageTargetPicker(1),
                this,
                "SN deals 1 damage to target creature or player\$ and 1 damage to PN."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicSource source=event.getSource();
            event.processTarget(game,new MagicTargetAction() {
                public void doAction(final MagicTarget target) {
                    final MagicDamage damage1=new MagicDamage(source,target,1);
                    game.doAction(new MagicDealDamageAction(damage1));
                    final MagicDamage damage2=new MagicDamage(source,event.getPlayer(),1);
                    game.doAction(new MagicDealDamageAction(damage2));
                }
            });
        }
    }
]
Pushed