Menu

Submission for Questing Phelddagrif

119

Config

name=Questing Phelddagrif
image=http://mtgimage.com/card/questing%20phelddagrif.jpg
value=2.500
rarity=R
type=Creature
subtype=Phelddagrif
cost={1}{G}{W}{U}
pt=4/4
timing=main
requires_groovy_code
oracle={G}: Questing Phelddagrif gets +1/+1 until end of turn. Target opponent puts a 1/1 green Hippo creature token onto the battlefield. {W}: Questing Phelddagrif gains protection from black and from red until end of turn. Target opponent gains 2 life. {U}: Questing Phelddagrif gains flying until end of turn. Target opponent may draw a card.

Script

[
   new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Pump"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{G}")
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_OPPONENT,
                this,
                "SN gets +1/+1 until end of turn. " +
                "Target opponent\$ puts a 1/1 green Hippo creature token onto the battlefield."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicChangeTurnPTAction(event.getPermanent(), 1, 1));
            event.processTargetPlayer(game, {
                game.doAction(new MagicPlayTokensAction(
                    it,
                    TokenCardDefinitions.get("1/1 green Hippo creature token"),
                    1
                ));
            });
        }
    },
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Protection"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source, "{W}")
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_OPPONENT,
                this,
                "SN gains protection from black and from red until end of turn. Target opponent\$ gains 2 life."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicGainAbilityAction(event.getPermanent(),MagicAbility.ProtectionFromBlack));
            game.doAction(new MagicGainAbilityAction(event.getPermanent(),MagicAbility.ProtectionFromRed));
            event.processTargetPlayer(game, {
                game.doAction(new MagicChangeLifeAction(it,2));
            });
        }
    },
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Flying"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostEvent(source,"{U}")
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                source.getOpponent(),
                new MagicMayChoice("Draw a card?"),
                this,
                "SN gains flying until end of turn. Opponent may draw a card."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            game.doAction(new MagicGainAbilityAction(event.getPermanent(),MagicAbility.Flying));
            if (event.isYes()) {
                game.doAction(new MagicDrawAction(event.getPlayer(),1));
            }
        }
    }
]
Pushed