Menu

Submission for Wit's End

117

Config

name=Wit's End
image=http://mtgimage.com/card/wit%27s%20end.jpg
value=2.500
rarity=R
type=Sorcery
cost={5}{B}{B}
timing=main
requires_groovy_code
oracle=Target player discards his or her hand.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.NEG_TARGET_PLAYER,
                this,
                "Target player\$ discards his or her hand."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game, {
	    final int amount = it.getHandSize();
                game.addEvent(new MagicDiscardEvent(event.getSource(),it,amount));
            });
        }
    }
]
Pushed