Method to test valid ranged target without unit?

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
Hard to condense sensible question in thread title.

Basically, I want to test whether one plot is a potential ranged target for another plot, assuming a ranged unit without indirect fire. The complication is I want to do this before placing the ranged unit, so I can't do the test on a unit object.

Does anyone know if there is a reasonable way to do this? The code will run in Lua, although I can mod dll to expose new Lua method if it helps.
 
The code to determine if a unit can range strike at another plot, after removing all the checks for being a ranged unit, there being a target unit in the target plot, being at war with the target unit, etc, etc, boils down to

Code:
pFromPlot:CanSeePlot(pToPlot, iMyTeam, iMaxRange, -1)
 
Top Bottom