Menu

Submission for Borborygmos Enraged

147

Config

name=Borborygmos Enraged
image=http://mtgimage.com/card/borborygmos%20enraged.jpg
value=2.500
rarity=M
type=Legendary,Creature
subtype=Cyclops
cost={4}{R}{R}{G}{G}
pt=7/6
ability=Trample;\
        Discard a land card: SN deals 3 damage to target creature or player.
timing=main
requires_groovy_code
oracle=Trample. Whenever Borborygmos Enraged deals combat damage to a player, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard. Discard a land card: Borborygmos Enraged deals 3 damage to target creature or player.

Script

[
    new MagicWhenSelfCombatDamagePlayerTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
            return new MagicEvent(
                permanent,
                this,
                "Reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicCardList top3 = event.getPlayer().getLibrary().getCardsFromTop(3) ;
            for (final MagicCard top : top3) {
                game.doAction(new MagicRevealAction(top));
                game.doAction(new MagicRemoveCardAction(
                    top,
                    MagicLocationType.OwnersLibrary
                ));
                game.doAction(new MagicMoveCardAction(
                    top,
                    MagicLocationType.OwnersLibrary,
                    top.hasType(MagicType.Land) ?
                      MagicLocationType.OwnersHand :
                      MagicLocationType.Graveyard
                ));
            }
        }
    }
]
Pushed