Axis & Allies Wiki
Advertisement

Units are the stuff that move around (usually) and do stuff in the game. Units are defined in the unitList. Here is an example of a unit definition

<unit name="fighter"/>

  <productionRule name="buyFighter">
      <cost resource="PUs" quantity="10" />
      <result resourceOrUnit="fighter" quantity="1"/>
</productionRule>                                                                                                                                                                                         

The actual capabilities of a unit are defined in the unitAttatchment section.

Example:


<attatchment name="unitAttatchment" attatchTo="fighter" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                        <option name="movement" value="4"/>
                        <option name="carrierCost" value="1"/>
                        <option name="isAir" value="true"/>
                        <option name="attack" value="3"/>
                        <option name="defense" value="4"/>
                   </attatchment>


Below is an incomplete list of unit properties.


movement Integer The allowed movement points
transportCost Integer The cost for being loaded onto a transport ship
carrierCost Integer The cost for being loaded onto an air-craft carrier
transportCapacity Integer The maximum number of items a transport ship can load
carrierCapacity Integer The maximum number of items an air-craft carrier can load
canBlitz Boolean Allows a unit to capture an undefended territory while moving on to the next
canBombard Boolean Allows an air unit to have bombardment capabilities
isAir Boolean Specifies if this unit can fly in the air or not
isSea Boolean Specifies of this unit can go in water or not
isFactory Boolean Specifies if this unit is a factory
isDestroyer Boolean Specifies if this unit is a destroyer
isAA Boolean Specifies if this unit is an anti-aircraft gun
isSub Boolean Specifies if this is a submersible unit
isTwoHit Boolean Allows a unit to absorb one extra attack hits before being destroyed
isStrategicBomber Boolean Specifies if an air-craft can perform strategic bombing
artillerySupportable Boolean Specifies if this unit can be supported by artillery or not
artillery Boolean Specifies if this is an artillery unit or not
attack Integer The attack value
defense Integer The defense value
Advertisement