Menu

Submission for Strength of Cedars

245

Config

name=Strength of Cedars
image=http://mtgimage.com/card/strength%20of%20cedars.jpg
value=2.500
rarity=U
type=Instant
subtype=Arcane
cost={4}{G}
timing=pump
requires_groovy_code
oracle=Target creature gets +X/+X until end of turn, where X is the number of lands you control.

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.POS_TARGET_CREATURE,
                MagicPumpTargetPicker.create(),
                this,
                "Target creature\$ gets +X/+X until end of turn, where X is the number of lands you control."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                final int X = event.getPlayer().getNrOfPermanents(MagicType.Land);
                game.doAction(new MagicChangeTurnPTAction(it, +X, +X));
            });
        }
    }
]
Pushed