Menu

Submission for Floodchaser

34

Config

name=Floodchaser
image=http://mtgimage.com/card/floodchaser.jpg
value=2.500
rarity=C
type=Creature
subtype=Elemental
cost={5}{U}
pt=0/0
ability=SN enters the battlefield with six +1/+1 counters on it.;\
        SN can't attack unless defending player controls an Island.
timing=main
requires_groovy_code
oracle=Floodchaser enters the battlefield with six +1/+1 counters on it. Floodchaser can't attack unless defending player controls an Island. {U}, Remove a +1/+1 counter from Floodchaser: Target land becomes an Island 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("{U}")));
	}
};

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

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Island"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
            new MagicPayManaCostEvent(source,"{U}"),
            new MagicRemoveCounterEvent(source,MagicCounterType.PlusOne,1)
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.TARGET_LAND,
                this,
                "Target land\$ becomes an Island 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