Menu

Submission for Breaching Leviathan

12

Config

name=Breaching Leviathan
image=http://magiccards.info/scans/en/c14/12.jpg
value=2.500
rarity=R
type=Creature
subtype=Leviathan
cost={7}{U}{U}
pt=9/9
timing=main
requires_groovy_code
oracle=When Breaching Leviathan enters the battlefield, if you cast it from your hand, tap all nonblue creatures. Those creatures don't untap during their controllers' next untap steps.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return permanent.hasState(MagicPermanentState.CastFromHand) ? 
                new MagicEvent(
                    permanent,
                    this,
                    "Tap all nonblue creatures. Those creatures don't untap during their controllers' next untap steps."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            NONBLUE_CREATURE.filter(game) each {
                game.doAction(new MagicTapAction(it));
                game.doAction(MagicChangeStateAction.Set(
                    it,
                    MagicPermanentState.DoesNotUntapDuringNext
                ));     
            }
        }
    }
]
Pushed