Menu

Submission for Book Burning

80

Config

name=Book Burning
image=http://magiccards.info/scans/en/ju/80.jpg
value=2.500
rarity=C
type=Sorcery
cost={1}{R}
timing=main
requires_groovy_code
oracle=Any player may have Book Burning deal 6 damage to him or her. If no one does, target player puts the top six cards of his or her library into his or her graveyard.

Script

def action = {
    final MagicGame game, final MagicEvent event ->
    if (event.isYes()) {
        game.doAction(new MagicDealDamageAction(event.getSource(),event.getPlayer(),6));
    } else {
        game.doAction(new MagicMillLibraryAction(event.getRefPlayer(),6));
    }
}

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.TARGET_PLAYER,
                this,
                "Unless opponent has SN deal 6 damage to him or her, " +
                "target player\$ puts the top six cards of his or her library into his or her graveyard."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game, {
                game.addEvent(new MagicEvent(
                    event.getSource(),
                    event.getPlayer().getOpponent(),
                    new MagicMayChoice("have SN deal 6 damage to you?"),
                    it,
                    action,
                    "PN may\$ have SN deal 6 damage to you. If you don't, " +
                    "RN puts the top six cards of his or her library into his or her graveyard."
                ));
            });
        }
    }
]
Pushed