Menu

Submission for Slimy Kavu

170

Config

name=Slimy Kavu
image=http://mtgimage.com/card/slimy%20kavu.jpg
value=2.500
rarity=C
type=Creature
subtype=Kavu
cost={2}{R}
pt=2/2
timing=main
requires_groovy_code
oracle={T}: Target land becomes a Swamp until end of turn.

Script

def ST1 = new MagicStatic(MagicLayer.Ability, MagicStatic.UntilEOT) {
    @Override
    public void modAbilityFlags(final MagicPermanent source, final MagicPermanent permanent, final Set<MagicAbility> flags) {
            permanent.loseAllAbilities();
            permanent.addAbility(new MagicTapManaActivation(MagicManaType.getList("{B}")));
	}
};

def ST2 = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
    @Override
    public void modSubTypeFlags(final MagicPermanent permanent,final Set<MagicSubType> flags) {
            flags.clear();
            flags.add(MagicSubType.Swamp);
	}
}

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Swamp"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicTapEvent(source)];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_LAND,
                this,
                "Target land\$ becomes a Swamp until end of turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicAddStaticAction(it, ST1));
			game.doAction(new MagicAddStaticAction(it, ST2));
            });
        }
    }
]
Pushed