Menu

Submission for Wildfire

228

Config

name=Wildfire
image=http://mtgimage.com/card/wildfire.jpg
value=2.500
rarity=R
type=Sorcery
cost={4}{R}{R}
timing=main
requires_groovy_code
oracle=Each player sacrifices four lands. Wildfire deals 4 damage to each creature.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                this,
                "Each player sacrifices 4 lands. SN deals 4 damage to each creature."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final Collection<MagicPermanent> targets = game.filterPermanents(MagicTargetFilterFactory.CREATURE);
            final MagicSource source = event.getSource();
            for (final MagicPermanent target : targets) {
                final MagicDamage damage=new MagicDamage(source,target,4);
                game.doAction(new MagicDealDamageAction(damage));
            }
            for (final MagicPlayer player : game.getAPNAP()) {
                game.addEvent(new MagicSacrificePermanentEvent(event.getSource(),player,MagicTargetChoice.SACRIFICE_LAND));
		game.addEvent(new MagicSacrificePermanentEvent(event.getSource(),player,MagicTargetChoice.SACRIFICE_LAND));
		game.addEvent(new MagicSacrificePermanentEvent(event.getSource(),player,MagicTargetChoice.SACRIFICE_LAND));
		game.addEvent(new MagicSacrificePermanentEvent(event.getSource(),player,MagicTargetChoice.SACRIFICE_LAND));
	    }
        }
    }
]
Pushed