From 21d65a5e9475570518614ff9da1b313220f39f85 Mon Sep 17 00:00:00 2001 From: Matei Date: Wed, 4 Oct 2006 04:49:17 +0000 Subject: [PATCH] Added minimum range to archers as well as ProjectileSpeed property to all ranged units. This was SVN commit r4482. --- .../entities/template_unit_infantry_ranged.xml | 1 + .../template_unit_infantry_ranged_archer.xml | 12 +++++++++++- .../data/mods/official/scripts/entity_functions.js | 4 +++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/binaries/data/mods/official/entities/template_unit_infantry_ranged.xml b/binaries/data/mods/official/entities/template_unit_infantry_ranged.xml index e79c257b3a..7714cd920c 100644 --- a/binaries/data/mods/official/entities/template_unit_infantry_ranged.xml +++ b/binaries/data/mods/official/entities/template_unit_infantry_ranged.xml @@ -24,6 +24,7 @@ 0.5 24.0 1500 + 12.0 diff --git a/binaries/data/mods/official/entities/template_unit_infantry_ranged_archer.xml b/binaries/data/mods/official/entities/template_unit_infantry_ranged_archer.xml index 871eefe9cd..6416de69b9 100644 --- a/binaries/data/mods/official/entities/template_unit_infantry_ranged_archer.xml +++ b/binaries/data/mods/official/entities/template_unit_infantry_ranged_archer.xml @@ -16,6 +16,16 @@ They tended to be lightly armoured. They usually only participated in the first stage of a battle, sending a volley of arrows raining down the enemy. Of course they would have to stop shooting once the melee units closed in. This means their job was largely over once the 'true battle' was underway. They spent hours training with a bow, but if you were hit by an arrow it was more likely an act of random chance than being specifically targeted by an archer. - + + + + + + 8.0 + 18.0 + + + + \ No newline at end of file diff --git a/binaries/data/mods/official/scripts/entity_functions.js b/binaries/data/mods/official/scripts/entity_functions.js index e33b55a7ff..bae195e176 100644 --- a/binaries/data/mods/official/scripts/entity_functions.js +++ b/binaries/data/mods/official/scripts/entity_functions.js @@ -625,7 +625,9 @@ function performAttackRanged( evt ) // action (do nothing) is what we want. // Parameters 5, 6, and 7 are all optional. - projectile = new Projectile( this, this, evt.target, 12.0, this, projectileEventImpact ) + projectile = new Projectile( this, this, evt.target, + this.actions.attack.ranged.projectileSpeed, + this, projectileEventImpact ) // We'll attach the damage information to the projectile, just to show you can // do that like you can with most other objects. Could also do this by making