Menu

Submission for City of Solitude

102

Config

name=City of Solitude
image=http://magiccards.info/scans/en/vi/52.jpg
value=2.500
rarity=R
type=Enchantment
cost={2}{G}
timing=enchantment
requires_groovy_code
oracle=Players can cast spells and activate abilities only during their own turns.

Script

[
    new MagicStatic(MagicLayer.Player) {
        @Override
        public void modPlayer(final MagicPermanent source, final MagicPlayer player) {
            source.getController().setState(MagicPlayerState.CantCastSpells);
            source.getController().setState(MagicPlayerState.CantActivateAbilities);

        }
        @Override
        public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return game.getTurnPlayer() == source.getOpponent();
        }
    },
    new MagicStatic(MagicLayer.Player) {
        @Override
        public void modPlayer(final MagicPermanent source, final MagicPlayer player) {
            source.getOpponent().setState(MagicPlayerState.CantCastSpells);
            source.getOpponent().setState(MagicPlayerState.CantActivateAbilities);

        }
        @Override
        public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
            return game.getTurnPlayer() == source.getController();
        }
    }
]
Pushed