Menu

Submission for Cinder Shade

240

Comment

Adapted from Hellhole Flailer

Config

name=Cinder Shade
image=http://mtgimage.com/card/cinder%20shade.jpg
value=2.500
rarity=U
type=Creature
subtype=Shade
cost={1}{B}{R}
pt=1/1
ability={B}: SN gets +1/+1 until end of turn.
timing=main
requires_groovy_code
oracle={B}: Cinder Shade gets +1/+1 until end of turn. {R}, Sacrifice Cinder Shade: Cinder Shade deals damage equal to its power to target creature.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Damage"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            final MagicPermanent permanent=source;
            return [
                new MagicPayManaCostEvent(source,"{R}"),
                new MagicSacrificeEvent(permanent)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(
                final MagicPermanent source,
                final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_CREATURE,
                new MagicDamageTargetPicker(source.getPower()),
                this,
                "SN deals damage equal to its power to target creature\$."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTarget(game, {
                final MagicPermanent source=event.getPermanent();
                final int amount=source.getPower();
                final MagicDamage damage=new MagicDamage(source,it,amount);
                game.doAction(new MagicDealDamageAction(damage));
            });
        }
    }
]
Pushed