Menu

Submission for Chain Lightning

26

Config

name=Chain Lightning
image=http://magiccards.info/scans/en/vma/153.jpg
value=2.500
rarity=C
type=Sorcery
cost={R}
timing=main
requires_groovy_code
oracle=Chain Lightning deals 3 damage to target creature or player. Then that player or that creature's controller may pay {R}{R}. If the player does, he or she may copy this spell and may choose a new target for that copy.

Script

def action = {
    final MagicGame game, final MagicEvent event ->
    if (event.isYes()) {
        game.doAction(new MagicCopyCardOnStackAction(event.getPlayer(),event.getRefCardOnStack()));
    }
}

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
                this,
                "SN deals 3 damage to target creature or player\$."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTarget(game, {
                game.addEvent(new MagicEvent(
                    event.getSource(),
                    event.getPlayer().getOpponent(),
                    new MagicMayChoice(
                        "Pay {R}{R}?",
                        new MagicPayManaCostChoice(MagicManaCost.create("{R}{R}"))
                    ),
                    event.getCardOnStack(),
                    action,
                    "PN may\$ pay {R}{R}\$. If you do, copy this spell and may choose a new target for that copy."
                ));
                game.doAction(new MagicDealDamageAction(event.getSource(),it,3));
            });
        }
    }
]
Pushed