Menu

Submission for Tectonic Instability

173

Config

name=Tectonic Instability
image=http://magiccards.info/scans/en/in/173.jpg
value=2.500
rarity=R
type=Enchantment
cost={2}{R}
timing=enchantment
requires_groovy_code
oracle=Whenever a land enters the battlefield, tap all lands its controller controls.

Script

[
    new MagicWhenOtherComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent otherPermanent) {
            return otherPermanent.hasType(MagicType.Land) ?
                new MagicEvent(
                    permanent,
                    otherPermanent,
                    this,
                    "Tap all lands RN's controller controls."
                ):
                MagicEvent.NONE;
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPlayer player = event.getRefPermanent().getController()
            final Collection<MagicPermanent> lands = player.filterPermanents(MagicTargetFilterFactory.LAND);
                for (final MagicPermanent land : lands) {
                    game.doAction(new MagicTapAction(land))
            }
        }
    }
]
Pushed