getAvailableTroop()

Usage:

city.getAvailableTroop([Optional boolian])

Example 1:

city.getAvailableTroop()

Example 2:

city.getAvailableTroop(true)

This function returns an object with information about the troops attached to a city. It can give the total of all troops, a specific troop, or the troop upkeep in a city. It counts marching troops as well as those idle.

This function also supports an optional boolean value (true/false). if this is true, the function will return only troops that are currently in the city. This is like the city.troops object, though this is editable.

The available properties for the object are:

foodConsumeRate
peasants
militia
scouter
pikemen
swordsmen
archer
lightCavalry
heavyCavalry
carriage
ballista
batteringRam
catapult


CategoryFunctions

getAvailableTroop (last edited 2016-01-09 10:48:40 by LKD70)