Menu

Submission for Skyreaping

140

Config

name=Skyreaping
url=http://magiccards.info/bng/en/140.html
image=http://magiccards.info/scans/en/bng/140.jpg
value=2.581
rarity=U
type=Sorcery
cost={1}{G}
timing=main
requires_groovy_code

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                this,
                "SN deals damage equal to PN's devotion to green to each creature with flying. ("+cardOnStack.getController().getDevotion(MagicColor.Green)+")"
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int amount = event.getPlayer().getDevotion(MagicColor.Green);
            final MagicSource source = event.getSource();
            final Collection<MagicPermanent> targets=
                game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_WITH_FLYING);
            for (final MagicPermanent target : targets) {
                final MagicDamage damage=new MagicDamage(source,target,amount);
                game.doAction(new MagicDealDamageAction(damage));
            }
        }
    }
]
Pushed