this.color.setGreen(true);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Jagged-Scar Archers's power and toughness are each equal to the number of Elves you control.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(controlledElvesFilter), Duration.EndOfGame)));
// {tap}: Jagged-Scar Archers deals damage equal to its power to target creature with flying.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(flyingCreatureFilter));
this.addAbility(ability);
}