GetTownUnitCount

Parameters
idinteger

Rawcode to specify unit type to count

tninteger

ID of target town

dnboolean

If true: only count finished units

comment

Counts buildings of specific type for the AI player in a town.

note

This will return 0 for tn = -1 and will only work for buildings; normal units will always return 0.

patch

1.00

Source
common.ai (raise an issue to discuss on Github or submit a PR)
return type
integer
Source code
native GetTownUnitCount     takes integer id, integer tn, boolean dn    returns integer