View Full Version : Spell scripting question
stecal
January 11th, 2005, 12:41 PM
How do make a spell caster cast certain protective/enhancing spells on specific units? Do they just cast it on the nearest unit or does the unit have to be under his command? Is there some routine that chooses the best target for such a spell?
Thanks,
Steve
Arralen
January 11th, 2005, 01:31 PM
.. mostly random. And don't forget about Murphy.
To get the best chances, make shure the unit is the only valid target in range. Could be difficult, though, as the mage may turn out to be a bit selfish.
Sometimes it works to put mage and target into the very same square, with some free space around them.
Wendigo
January 12th, 2005, 02:26 PM
stecal said:
How do make a spell caster cast certain protective/enhancing spells on specific units? Do they just cast it on the nearest unit or does the unit have to be under his command? Is there some routine that chooses the best target for such a spell?
The tactical spell Ai is pretty good for this:
-Area effect buffs will try to target the biggest concentration of troops in range (example: legions of steel)
So long as you are careful with troop placement and not place a big unit of archers next to the knights you want to buff you shall do fine.
-Area 1 and 1-unit buffs will however prioritize depending on hit points: pretenders & big monsters will be given preference even over the caster (example: luck).
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.