Menu

Submission for Jagged-Scar Archers

222

Comment

tested in magarena 1.44

Config

name=Jagged-Scar Archers
url=http://magiccards.info/lw/en/222.html
image=http://magiccards.info/scans/en/lw/222.jpg
value=4.050
rarity=U
type=Creature
subtype=Elf,Archer
cost={1}{G}{G}
timing=main
requires_groovy_code

Script

[
    new MagicCDA() {
        @Override
        public void modPowerToughness(final MagicGame game,final MagicPlayer player,final MagicPowerToughness pt) {
            final int amount = player.getNrOfPermanents(MagicSubType.Elf);
            pt.set(amount,amount);
        }
    },
	new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Damage"
    ) {

        @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.NEG_TARGET_CREATURE_WITH_FLYING,
                new MagicDamageTargetPicker(source.getPower()),
                this,
                "SN deals damage equal to its power to target creature with flying." 
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game,new MagicPermanentAction() {
                public void doAction(final MagicPermanent target) {
                    game.doAction(new MagicDealDamageAction(
                        new MagicDamage(
                            event.getPermanent(),
                            target,
                            event.getPermanent().getPower()
                        )
                    )); 
                }
            });
        }
    }
]
Pushed