game.military
Class AttackOrder

java.lang.Object
  |
  +--game.military.UnitOrder
        |
        +--game.military.AttackOrder

public class AttackOrder
extends UnitOrder

Order to attack a given square. Unit will move to the square and attack it if the odds are sufficient.


Field Summary
static AttackOrder ORDER
           
 
Fields inherited from class game.military.UnitOrder
FRONT, RESERVE, SUPPORT
 
Method Summary
 java.lang.String getName()
          Returns the order name.
 float getOddsToAttack()
          Attacks if odds are no worse than this.
 float healRate()
          Rate at which units heal.
 void setOddsToAttack(float newOdds)
           
 
Methods inherited from class game.military.UnitOrder
get, getDefenseBonus, getOddsToDefend, getPreferredPosition, setOddsToDefend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORDER

public static AttackOrder ORDER
Method Detail

setOddsToAttack

public void setOddsToAttack(float newOdds)

getOddsToAttack

public float getOddsToAttack()
Attacks if odds are no worse than this.

Overrides:
getOddsToAttack in class UnitOrder

healRate

public float healRate()
Rate at which units heal. It is the ratio of max health recovered at end of turn.

Specified by:
healRate in class UnitOrder

getName

public java.lang.String getName()
Returns the order name.

Specified by:
getName in class UnitOrder