Menu

Submission for Weight of Spires

78

Config

name=Weight of Spires
image=http://mtgimage.com/card/weight%20of%20spires.jpg
value=2.500
rarity=U
type=Instant
cost={R}
timing=removal
requires_groovy_code
oracle=Weight of Spires deals damage to target creature equal to the number of nonbasic lands that creature's controller controls.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.NEG_TARGET_CREATURE,
                this,
                "SN deals damage to target creature\$ equal to the number of nonbasic lands that creature's controller controls."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
		final int amount = it.getController().getNrOfPermanents(MagicTargetFilterFactory.NONBASIC_LAND)
                final MagicDamage damage = new MagicDamage(
                    event.getSource(),
                    it,
                    amount
                );
                game.doAction(new MagicDealDamageAction(damage));
            });
        }
    }
]
Pushed