Menu

Submission for Death Charmer

61

Config

name=Death Charmer
image=http://mtgimage.com/card/death%20charmer.jpg
value=2.500
rarity=C
type=Creature
subtype=Worm,Mercenary
cost={2}{B}
pt=2/2
timing=main
requires_groovy_code
oracle=Whenever Death Charmer deals combat damage to a creature, that creature's controller loses 2 life unless he or she pays {2}.

Script

[
    new MagicWhenDamageIsDealtTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
            return (damage.isSource(permanent) && damage.isTargetCreature() && damage.isCombat()) ?
                new MagicEvent(
                    permanent,
                    damage.getTarget().getController(),
                    new MagicMayChoice(
                        "Pay {2}?",
                        new MagicPayManaCostChoice(MagicManaCost.create("{2}"))
                    ),
                    damage.getTarget().getController(),
                    this,
                    "PN may\$ pay {2}\$. If PN doesn't, PN loses 2 life."
                ):
                    MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isNo()) {
                game.doAction(new MagicChangeLifeAction(event.getRefPlayer(), -2));
            }
        }
    }
]
Pushed