Menu

Submission for Lust for War

157

Config

name=Lust for War
image=http://mtgimage.com/card/lust%20for%20war.jpg
value=2.500
rarity=U
type=Enchantment
subtype=Aura
cost={2}{R}
ability=Enchanted creature attacks each turn if able.
timing=aura
enchant=must attack,neg creature
requires_groovy_code
oracle=Enchant creature. Whenever enchanted creature becomes tapped, Lust for War deals 3 damage to that creature's controller. Enchanted creature attacks each turn if able.

Script

[
    new MagicWhenBecomesTappedTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent tapped) {
            final MagicPermanent enchantedCreature = permanent.getEnchantedPermanent();
            return (enchantedCreature.isCreature() && enchantedCreature==tapped) ?
                new MagicEvent(
                    permanent,
                    tapped.getController(),
                    this,
                    "SN deals 3 damage to PN."
                ) :
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game,final MagicEvent event) {
            final MagicDamage damage=new MagicDamage(event.getSource(),event.getPlayer(),3);
            game.doAction(new MagicDealDamageAction(damage));
        }
    }
]
Pushed