• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages
    • Diff for "getAvailableTroop"
    Differences between revisions 4 and 5
    Revision 4 as of 2015-04-23 04:36:20
    Size: 1100
    Editor: Inanna
    Comment:
    Revision 5 as of 2015-04-23 04:42:19
    Size: 1346
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 6: Line 6:
    This function returns the total count of all troops or a specific troop attached to a city. It does not just count the troops in the city, but includes troops marching to or returning from somewhere. 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.
    Line 11: Line 11:

    The available properties for the object are:

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

    getAvailableTroop()

    Usage:

    city.getAvailableTroop()

    Example:

    city.getAvailableTroop()

    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.

    • echo "I have a total of  {city.getAvailableTroop().carriage} transports assigned to this city"

    The available properties for the object are:

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


    CategoryFunctions

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