Menu

Submission for Immaculate Magistrate

201

Comment

tested in magarena 1.44

Config

name=Immaculate Magistrate
url=http://magiccards.info/lw/en/219.html
image=http://magiccards.info/scans/en/lw/219.jpg
value=4.245
rarity=R
type=Creature
subtype=Elf,Shaman
cost={3}{G}
pt=2/2
timing=main
requires_groovy_code

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Pump"
    ) {
        @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.Positive("target creature"),
                this,
                "Put a +1/+1 counter on target creature\$ for each Elf creature you control."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int amount = event.getPlayer().getNrOfPermanents(MagicSubType.Elf);
			event.processTargetPermanent(game,new MagicPermanentAction() {
				public void doAction(final MagicPermanent target) {
					game.doAction(new MagicChangeCountersAction(
						target,
						MagicCounterType.PlusOne,
						amount,
						true
					));
				}
            });
        }
    }
]
Pushed