Menu

Submission for Gaze of Granite

72

Comment

tested in magarena 1.43

Config

name=Gaze of Granite
url=http://magiccards.info/dgm/en/72.html
image=http://magiccards.info/scans/en/dgm/72.jpg
value=4.121
removal=2
rarity=R
type=Sorcery
cost={X}{B}{B}{G}
timing=main
requires_groovy_code

Script

[
	new MagicSpellCardEvent() {

        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            final int amount=payedCost.getX();
			return new MagicEvent(
                cardOnStack,
				amount,
                this,
                "Destroy each nonland permanent with converted mana cost RN or less."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
			final int amount=event.getRefInt();
            final Collection<MagicPermanent> targets=
                game.filterPermanents(
                    event.getSource().getController(),
                    new MagicTargetFilter.MagicCMCPermanentFilter(
                        MagicTargetFilter.TARGET_NONLAND_PERMANENT,
                        MagicTargetFilter.Operator.LESS_THAN_OR_EQUAL,
                        amount
                    )
                );
            game.doAction(new MagicDestroyAction(targets));
        }
    }
]
Pushed