GetTownUnitCount
- Parameters
id integerRawcode to specify unit type to count
tn integerID of target town
dn booleanIf 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 = -1and 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