Menu

Submission for Dwarven Scorcher

86

Config

name=Dwarven Scorcher
image=http://magiccards.info/scans/en/ju/86.jpg
value=2.500
rarity=C
type=Creature
subtype=Dwarf
cost={R}
pt=1/1
timing=main
requires_groovy_code
oracle=Sacrifice Dwarven Scorcher: Dwarven Scorcher deals 1 damage to target creature unless that creature's controller has Dwarven Scorcher deal 2 damage to him or her.

Script

def action = {
    final MagicGame game, final MagicEvent event ->
    if (event.isYes()) {
        game.doAction(new MagicDealDamageAction(event.getSource(),event.getPlayer(),2));
    } else {
        game.doAction(new MagicDealDamageAction(event.getSource(),event.getRefPermanent(),1));
    }
}

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

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_CREATURE,
                this,
                "SN deals 1 damage to target creature\$ unless that creature's controller has SN deal 2 damage to him or her."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.addEvent(new MagicEvent(
                    event.getSource(),
                    it.getController(),
                    new MagicMayChoice("have SN deal 2 damage to you?"),
                    it,
                    action,
                    "PN may\$ have SN deal 2 damage to you. If you don't, SN deals 1 damage to RN."
                ));
            });
        }
    }
]
Pushed