Menu

Submission for

Config

name=Corrupt
url=http://magiccards.info/m14/en/91.html
image=http://mtgimage.com/card/corrupt.jpg
value=2.854
removal=3
rarity=U
type=Sorcery
cost={5}{B}
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_CREATURE_OR_PLAYER,
                this,
                "SN deals damage to target creature or player\$ equal to the number of Swamps PN controls."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPlayer player = event.getPlayer();
            final int amount = player.getNrOfPermanents(MagicSubType.Swamp);
            event.processTarget(game, {
                final MagicTarget target ->
                final MagicDamage damage = new MagicDamage(
                    event.getSource(),
                    target,
                    amount
                );
                game.doAction(new MagicDealDamageAction(damage));
		game.doAction(new MagicChangeLifeAction(event.getPlayer(),amount));
            });
        }
    }
]
Pushed