Menu

Submission for Strength in Numbers

193

Config

name=Strength in Numbers
image=http://mtgimage.com/card/strength%20in%20numbers.jpg
value=2.500
rarity=C
type=Instant
cost={1}{G}
timing=pump
requires_groovy_code
oracle=Until end of turn, target creature gains trample and gets +X/+X, where X is the number of attacking creatures.

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\$ gains trample and gets +X/+X until end of turn, where X is the number of attacking creatures."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                game.doAction(new MagicGainAbilityAction(it, MagicAbility.Trample));
                game.doAction(new MagicChangeTurnPTAction(
                    it,
                    game.getNrOfPermanents(MagicTargetFilterFactory.ATTACKING_CREATURE),
                    game.getNrOfPermanents(MagicTargetFilterFactory.ATTACKING_CREATURE)
                ));
            });
        }
    }
]
Pushed