Menu

Submission for Infernal Contract

139

Config

name=Infernal Contract
image=http://magiccards.info/scans/en/7e/143.jpg
value=2.500
rarity=R
type=Sorcery
cost={B}{B}{B}
timing=main
requires_groovy_code
oracle=Draw four cards. You lose half your life, rounded up.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                this,
                "Draw four cards. You lose half your life, rounded up."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicDrawAction(event.getPlayer(),4));
            game.doAction(new MagicChangeLifeAction(
                event.getPlayer(),
                -(int)Math.ceil(event.getPlayer().getLife()/2)
            ));
        }
    }
]
Pushed