Menu

Submission for Krovikan Elementalist

27

Config

name=Krovikan Elementalist
image=http://mtgimage.com/card/krovikan%20elementalist.jpg
value=2.500
rarity=U
type=Creature
subtype=Human,Wizard
cost={B}{B}
pt=1/1
ability={2}{R}: Target creature gets +1/+0 until end of turn.
timing=main
requires_groovy_code
oracle={2}{R}: Target creature gets +1/+0 until end of turn. {U}{U}: Target creature you control gains flying until end of turn. Sacrifice it at the beginning of the next end step.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Flying"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{U}{U}")
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
                this,
                "Target creature\$ you control gains flying until end of turn. " +
                "Sacrifice it at the beginning of the next end step."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicGainAbilityAction(it,MagicAbility.Flying));
            game.doAction(new MagicAddTriggerAction(it, MagicAtEndOfTurnTrigger.Sacrifice));
            });
        }
    }
]
Pushed