Menu

Submission for Ojutai, Soul of Winter

187

Config

name=Ojutai, Soul of Winter
image=http://mtgimage.com/card/ojutai%2C%20soul%20of%20winter.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Dragon
cost={5}{W}{U}
pt=5/6
ability=Flying; vigilance
timing=main
requires_groovy_code
oracle=Flying, vigilance. Whenever a Dragon you control attacks, tap target nonland permanent an opponent controls. That permanent doesn't untap during its controller's next untap step.

Script

[
    new MagicWhenAttacksTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
            return (permanent.isFriend(creature) &&
                    permanent.hasSubType(MagicSubType.Dragon)) ?
                new MagicEvent(
                    permanent,
                    MagicTargetChoice.TARGET_NONLAND_PERMANENT_YOUR_OPPONENT_CONTROLS,
                    this,
                    "Tap target nonland permanent an opponent controls. "+
                    "That permanent doesn't untap during its controller's next untap step."
                ):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicTapAction(it));
           
                game.doAction(MagicChangeStateAction.Set(
                    it,
                    MagicPermanentState.DoesNotUntapDuringNext
                ));       
            });
        }
    }
]
Pushed