Menu

Submission for Wormfang Behemoth

55

Config

name=Wormfang Behemoth
image=http://mtgimage.com/card/wormfang%20behemoth.jpg
value=2.500
rarity=R
type=Creature
subtype=Nightmare,Fish,Beast
cost={3}{U}{U}
pt=5/5
timing=main
requires_groovy_code
oracle=When Wormfang Behemoth enters the battlefield, exile all cards from your hand. When Wormfang Behemoth leaves the battlefield, return the exiled cards to their owner's hand.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return new MagicEvent(
                permanent,
                this,
                "Exile all cards from your hand."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicCardList hand = new MagicCardList(event.getPlayer().getHand());
            for (final MagicCard card : hand) {
                game.doAction(new MagicExileLinkAction(
                    event.getPermanent(),
                    card,
                    MagicLocationType.OwnersHand
                ));
        }
    }
},
    new MagicWhenLeavesPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicRemoveFromPlayAction act) {
            return new MagicEvent(
                permanent,
                this,
                "Return the exiled cards to their owner's hand."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicReturnLinkedExileAction(
                event.getPermanent(),
                MagicLocationType.OwnersHand,
                event.getPlayer()
            ));
        }
    }
]
Pushed