Menu

Submission for Jolrael, Empress of Beasts

81

Config

name=Jolrael, Empress of Beasts
image=http://mtgimage.com/card/jolrael%2C%20empress%20of%20beasts.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Human,Spellshaper
cost={3}{G}{G}
pt=3/3
timing=main
requires_groovy_code
oracle={2}{G}, {T}, Discard two cards: All lands target player controls become 3/3 creatures until end of turn. They're still lands.

Script

def PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) {
    @Override
    public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
        pt.set(3,3);
    }
};
def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
    @Override
    public int getTypeFlags(final MagicPermanent permanent,final int flags) {
        return flags|MagicType.Creature.getMask();
    }
};

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Lands"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicTapEvent(source), new MagicPayManaCostEvent(source, "{2}{G}"), new MagicDiscardEvent(source, 2)
            ];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_PLAYER,
                this,
                "All lands target player\$ controls become 3/3 creatures until end of turn. They're still lands."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game, {
            final Collection<MagicPermanent> targets = game.filterPermanents(it,MagicTargetFilterFactory.LAND_YOU_CONTROL);
            for (final MagicPermanent target : targets) {
                game.doAction(new MagicBecomesCreatureAction(target,PT,ST));
                }
            });
        }
    }
]
Pushed