Menu

Submission for Myojin of Night's Reach

126

Config

name=Myojin of Night's Reach
image=http://magiccards.info/scans/en/chk/126.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Spirit
cost={5}{B}{B}{B}
pt=5/2
ability=SN has indestructible as long as it has a divinity counter on it.
timing=main
requires_groovy_code
oracle=Myojin of Night's Reach enters the battlefield with a divinity counter on it if you cast it from your hand. Myojin of Night's Reach has indestructible as long as it has a divinity counter on it. Remove a divinity counter from Myojin of Night's Reach: Each opponent discards his or her hand.

Script

[
    new MagicComesIntoPlayWithCounterTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) {
            if (permanent.hasState(MagicPermanentState.CastFromHand)) {
                game.doAction(new MagicChangeCountersAction(permanent, MagicCounterType.Divinity, 1));
            } 
            return MagicEvent.NONE;
        }
    },
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Discards"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicRemoveCounterEvent(source,MagicCounterType.Divinity,1)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "Each opponent discards his or her hand."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.addEvent(new MagicDiscardEvent(
                event.getSource(),
                event.getPlayer().getOpponent(),
                event.getPlayer().getOpponent().getHandSize()
            ));
        }
    }
]
Pushed