Menu

Submission for Ebon Praetor

89

Config

name=Ebon Praetor
image=http://mtgimage.com/card/ebon%20praetor.jpg
value=2.500
rarity=R
type=Creature
subtype=Avatar,Praetor
cost={4}{B}{B}
pt=5/5
ability=First strike; trample;\
At the beginning of your upkeep, put a -2/-2 counter on SN.
timing=main
requires_groovy_code
oracle=First strike, trample. At the beginning of your upkeep, put a -2/-2 counter on Ebon Praetor. Sacrifice a creature: Remove a -2/-2 counter from Ebon Praetor. If the sacrificed creature was a Thrull, put a +1/+0 counter on Ebon Praetor. Activate this ability only during your upkeep and only once each turn.

Script

[
    new MagicPermanentActivation(
        [MagicCondition.YOUR_UPKEEP_CONDITION],
        new MagicActivationHints(MagicTiming.Pump),
        "Sacrifice"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_CREATURE),
                new MagicPlayAbilityEvent(source)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                payedCost.getTarget(),
                this,
                "Remove a -2/-2 counter from SN. " +
                "If the sacrificed creature was a Thrull, put a +1/+0 counter on SN."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicPermanent sacrificed = event.getRefPermanent();
            new MagicRemoveCounterEvent(
            event.getPermanent(),
            MagicCounterType.MinusTwo,
            1
            );
            if (sacrificed.hasSubType(MagicSubType.Thrull)) { 
                game.doAction(new MagicChangeCountersAction(
                event.getPermanent(),
                MagicCounterType.PlusOnePlusZero,
                1
                ));
            }
        }
    }
]

Pushed