Menu

Submission for Festercreep

110

Config

name=Festercreep
image=http://mtgimage.com/card/festercreep.jpg
value=2.500
rarity=C
type=Creature
subtype=Elemental
cost={1}{B}
pt=0/0
ability=SN enters the battlefield with a +1/+1 counter on it.
timing=main
requires_groovy_code
oracle=Festercreep enters the battlefield with a +1/+1 counter on it. {1}{B}, Remove a +1/+1 counter from Festercreep: All other creatures get -1/-1 until end of turn.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Weaken"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{1}{B}"), 
                new MagicRemoveCounterEvent(source,MagicCounterType.PlusOne,1)
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "All other creatures get -1/-1 until end of turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final Collection<MagicPermanent> targets = game.filterPermanents(MagicTargetFilterFactory.CREATURE);
            for (final MagicPermanent creature : targets) {
                if (creature != event.getPermanent()) {           
                    game.doAction(new MagicChangeTurnPTAction(creature, -1, -1));
                }
            }
        }
    }
]
Pushed