Menu

Submission for Gulf Squid

35

Config

name=Gulf Squid
image=http://mtgimage.com/card/gulf%20squid.jpg
value=2.500
rarity=C
type=Creature
subtype=Squid,Beast
cost={3}{U}
pt=2/2
timing=main
requires_groovy_code
oracle=When Gulf Squid enters the battlefield, tap all lands target player controls.

Script

[
    new MagicWhenComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            return new MagicEvent(
                permanent,
                MagicTargetChoice.NEG_TARGET_PLAYER,
                this,
                "Tap all lands target player\$ controls."
            );
        }

         @Override
         public void executeEvent(final MagicGame game, final MagicEvent event) {
             event.processTargetPlayer(game, {
                final Collection<MagicPermanent> targets = it.filterPermanents(MagicTargetFilterFactory.LAND_YOU_CONTROL);
                for (final MagicPermanent land : targets) {
                    game.doAction(new MagicTapAction(land));
                }
             });
        }
    }
]
Pushed