<?xml version="1.0" encoding="utf-8"?>
<s1 title="getAvailableTroop"><p></p>
<s2 id="getAvailableTroop()" title="getAvailableTroop()">
<table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.getAvailableTroop([Optional boolian]) </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example 1: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.getAvailableTroop() </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example 2: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>city.getAvailableTroop(true) </p>
</td></tr></table><p>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. </p>
<p>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. </p>
<ul><li><source><![CDATA[echo "I have a total of {city.getAvailableTroop().carriage} transports assigned to this city."
echo "Of that {city.getAvailableTroop().carriage} transporters, {city.getAvailableTroop(true).carriage} are currently in the city."]]></source></li>
</ul>
<p>The available properties for the object are: </p>
<p></p>
<source><![CDATA[foodConsumeRate
peasants
militia
scouter
pikemen
swordsmen
archer
lightCavalry
heavyCavalry
carriage
ballista
batteringRam
catapult]]></source><p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> <jump href="/wiki/CategoryFunctions">CategoryFunctions</jump> </p>
</s2></s1>