Menu

Submission for Harpoon Sniper

19

Config

name=Harpoon Sniper
image=http://mtgimage.com/card/harpoon%20sniper.jpg
value=2.500
rarity=U
type=Creature
subtype=Merfolk,Archer
cost={2}{W}
pt=2/2
timing=main
requires_groovy_code
oracle={W}, {T}: Harpoon Sniper deals X damage to target attacking or blocking creature, where X is the number of Merfolk you control.

Script

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

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

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            final int X = source.getController().getNrOfPermanents(MagicSubType.Merfolk);
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_ATTACKING_OR_BLOCKING_CREATURE,
                new MagicDamageTargetPicker(X),
                this,
                "SN deals X damage to target attacking or blocking creature\$, "+
                "where X is the number of Merfolks you control."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game,{
                final int X = event.getPlayer().getNrOfPermanents(MagicSubType.Merfolk);
                final MagicDamage damage=new MagicDamage(event.getSource(),it,X);
                game.doAction(new MagicDealDamageAction(damage));
            });
        }
    }
]
Pushed