Menu

Submission for Mtenda Lion

128

Config

name=Mtenda Lion
image=http://mtgimage.com/card/mtenda%20lion.jpg
value=2.500
rarity=C
type=Creature
subtype=Cat
cost={G}
pt=2/1
timing=main
requires_groovy_code
oracle=Whenever Mtenda Lion attacks, defending player may pay {U}. If that player does, prevent all combat damage that would be dealt by Mtenda Lion this turn.

Script

[
    new MagicWhenSelfAttacksTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent creature) {
            return new MagicEvent(
                    permanent,
                    game.getDefendingPlayer(),
                    new MagicMayChoice(
                        "Pay {U}?",
                        new MagicPayManaCostChoice(MagicManaCost.create("{U}"))
                    ),
                    this,
                    "PN may\$ pay {U}\$. If PN does, prevent all combat damage that would be dealt by SN this turn."
                );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if (event.isYes()) {
                game.doAction(MagicChangeStateAction.Set(
                        event.getPermanent(),
                        MagicPermanentState.NoCombatDamage
                    ));
            }
        }
    }
]
Pushed