Menu

Submission for Burning Palm Efreet

161

Comment

Adapted from Goblin Skycutter. Copied note as well.

Config

name=Burning Palm Efreet
image=http://mtgimage.com/card/burning%20palm%20efreet.jpg
value=2.500
rarity=U
type=Creature
subtype=Efreet
cost={2}{R}{R}
pt=2/2
timing=main
requires_groovy_code
oracle={1}{R}{R}: Burning Palm Efreet deals 2 damage to target creature with flying and that creature loses flying until end of turn.
# May need further tweaking - Damage priority or lose evasion priority?

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.LoseEvasion),
        "Damage"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicPayManaCostEvent(source, "{1}{R}{R}")];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_CREATURE_WITH_FLYING,
                MagicLoseAbilityTargetPicker.create(MagicAbility.Flying),
                this,
                "SN deals 2 damage to target creature with flying\$. That creature loses flying until end of turn."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                final MagicDamage damage = new MagicDamage(event.getSource(),it,2);
                game.doAction(new MagicDealDamageAction(damage));
                game.doAction(new MagicLoseAbilityAction(it,MagicAbility.Flying));
            });
        }
    }
]
Pushed