Menu

Submission for

Config

name=Goblin War Strike
url=http://magiccards.info/sc/en/96.html
image=http://mtgimage.com/card/goblin%20war%20strike.jpg
value=1.854
removal=3
rarity=C
type=Sorcery
cost={R}
timing=removal
requires_groovy_code

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.NEG_TARGET_PLAYER,
                this,
                "SN deals damage to target player\$ equal to the number of Goblins PN controls."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPlayer player = event.getPlayer();
            final int amount = player.getNrOfPermanents(MagicSubType.Goblin);
            event.processTarget(game, {
                final MagicTarget target ->
                final MagicDamage damage = new MagicDamage(
                    event.getSource(),
                    target,
                    amount
                );
                game.doAction(new MagicDealDamageAction(damage));
            });
        }
    }
]
Pushed