Menu

Submission for Emberwilde Caliph

322

Config

name=Emberwilde Caliph
image=http://magiccards.info/scans/en/mr/322.jpg
value=2.500
rarity=R
type=Creature
subtype=Djinn
cost={2}{U}{R}
pt=4/4
ability=Flying; trample;\
SN attacks each turn if able.
timing=main
requires_groovy_code
oracle=Flying, trample. Emberwilde Caliph attacks each turn if able. Whenever Emberwilde Caliph deals damage, you lose that much life.

Script

[
    new MagicWhenDamageIsDealtTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
            return damage.isSource(permanent) ?
                new MagicEvent(
                    permanent,
                    damage.getDealtAmount(),
                    this,
                    "Whenever SN deals damage, you lose that much life."
                ):
                MagicEvent.NONE;
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicChangeLifeAction(event.getPlayer(),-event.getRefInt()));
        }
    }
]
Pushed