Menu

Submission for Swirling Sandstorm

102

Config

name=Swirling Sandstorm
image=http://mtgimage.com/card/swirling%20sandstorm.jpg
value=2.500
rarity=C
type=Sorcery
cost={3}{R}
timing=main
requires_groovy_code
oracle=Threshold — Swirling Sandstorm deals 5 damage to each creature without flying if seven or more cards are in your graveyard.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                this,
                "SN deals 5 damage to each creature without flying if you have 7 or more cards in your graveyard."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
                if (MagicCondition.THRESHOLD_CONDITION.accept(event.getSource())) {
            final Collection<MagicPermanent> targets=
                game.filterPermanents(event.getPlayer(),MagicTargetFilterFactory.CREATURE_WITHOUT_FLYING);
            for (final MagicPermanent target : targets) {
                game.doAction(new MagicDealDamageAction(event.getSource(),target,5));
        }
            }
        }
    }
]
Pushed