Menu

Submission for Myojin of Cleansing Fire

35

Config

name=Myojin of Cleansing Fire
image=http://magiccards.info/scans/en/chk/35.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Spirit
cost={5}{W}{W}{W}
pt=4/6
ability=SN has indestructible as long as it has a divinity counter on it.
timing=main
requires_groovy_code
oracle=Myojin of Cleansing Fire enters the battlefield with a divinity counter on it if you cast it from your hand. Myojin of Cleansing Fire has indestructible as long as it has a divinity counter on it. Remove a divinity counter from Myojin of Cleansing Fire: Destroy all other creatures.

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),
        "Destroy"
    ) {

        @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,
                "Destroy all other creatures."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final Collection<MagicPermanent> targets= game.filterPermanents(
                event.getPermanent().getController(),
                CREATURE.except(event.getPermanent())
            );
            game.doAction(new MagicDestroyAction(targets));
        }
    }
]
Pushed