Menu

Submission for Skarrg Guildmage

196

Comment

tested in magarena 1.43

Config

name=Skarrg Guildmage
url=http://magiccards.info/gtc/en/196.html
image=http://magiccards.info/scans/en/gtc/196.jpg
value=3.867
rarity=U
type=Creature
subtype=Human,Shaman
cost={R}{G}
pt=2/2
ability=pay {R}{G}: Creatures PN controls gain trample until end of turn.
timing=main
requires_groovy_code

Script

def PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) {
    @Override
    public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
        pt.set(4,4);
    }
};
def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
    @Override
    public int getTypeFlags(final MagicPermanent permanent,final int flags) {
        return flags|MagicType.Creature.getMask();
    }
};
def SU = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
	@Override
	public void modSubTypeFlags(final MagicPermanent permanent, final Set<MagicSubType> flags) {
		flags.add(MagicSubType.Elemental);
	}
};
[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Animate),
        "Animate"
    ) {

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

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_LAND,
                this,
                "Target land\$ becomes a 4/4 Elemental creature until end of turn."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                final MagicPermanent land ->
                game.doAction(new MagicBecomesCreatureAction(land,PT,ST,SU));
            } as MagicPermanentAction);
        }
    }
]
Pushed