Menu

Submission for Torch Song

222

Config

name=Torch Song
image=http://magiccards.info/scans/en/us/222.jpg
value=2.500
rarity=U
type=Enchantment
cost={2}{R}
ability=At the beginning of your upkeep, you may put a verse counter on SN.
timing=enchantment
requires_groovy_code
oracle=At the beginning of your upkeep, you may put a verse counter on Torch Song.\n{2}{R}, Sacrifice Torch Song: Torch Song deals X damage to target creature or player, where X is the number of verse counters on Torch Song.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Damage"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source, "{2}{R}"),
                new MagicSacrificeEvent(source)
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                NEG_TARGET_CREATURE_OR_PLAYER,
                this,
                "SN deals X damage to target creature or player, where X is the number of verse counters on SN."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTarget(game, {
                final int amount = event.getPermanent().getCounters(MagicCounterType.Verse);
                game.doAction(new DealDamageAction(event.getSource(),it,amount));
            });
        }
    }
]
Pushed