|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.Tension
public class Tension
| Nested Class Summary | |
|---|---|
static class |
Tension.Level
Constants for describing alarm levels. |
| Field Summary | |
|---|---|
static int |
ALLIANCE_MODIFIER
|
static int |
CEASE_FIRE_MODIFIER
|
static int |
CONTACT_MODIFIER
|
static int |
DELTA
|
static int |
DROP_ALLIANCE_MODIFIER
|
static int |
PEACE_TREATY_MODIFIER
|
static int |
RESUME_WAR_MODIFIER
|
static int |
SURRENDERED
Tension level to set when surrendering. |
static int |
TENSION_ADD_CAPITAL_ATTACKED
|
static int |
TENSION_ADD_LAND_TAKEN
|
static int |
TENSION_ADD_MAJOR
|
static int |
TENSION_ADD_MINOR
|
static int |
TENSION_ADD_NORMAL
|
static int |
TENSION_ADD_SETTLEMENT_ATTACKED
|
static int |
TENSION_ADD_UNIT_DESTROYED
|
static int |
TENSION_ADD_WAR_INCITER
|
static int |
TENSION_MAX
|
static int |
TENSION_MIN
|
private int |
value
|
static int |
WAR_MODIFIER
|
| Constructor Summary | |
|---|---|
Tension()
Constructor. |
|
Tension(int newTension)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getKey()
Gets a string suitable for use in a message id. |
Tension.Level |
getLevel()
Get the current tension level. |
int |
getValue()
Get the current tension value. |
void |
modify(int newTension)
Modify the tension by the given amount. |
void |
setValue(int newValue)
Sets the current tension value. |
java.lang.String |
toString()
Returns the current tension level as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TENSION_MIN
public static final int TENSION_MAX
public static final int DELTA
public static final int TENSION_ADD_MINOR
public static final int TENSION_ADD_NORMAL
public static final int TENSION_ADD_MAJOR
public static final int TENSION_ADD_LAND_TAKEN
public static final int TENSION_ADD_UNIT_DESTROYED
public static final int TENSION_ADD_SETTLEMENT_ATTACKED
public static final int TENSION_ADD_CAPITAL_ATTACKED
public static final int TENSION_ADD_WAR_INCITER
public static final int CONTACT_MODIFIER
public static final int ALLIANCE_MODIFIER
public static final int DROP_ALLIANCE_MODIFIER
public static final int PEACE_TREATY_MODIFIER
public static final int CEASE_FIRE_MODIFIER
public static final int WAR_MODIFIER
public static final int RESUME_WAR_MODIFIER
public static final int SURRENDERED
private int value
| Constructor Detail |
|---|
public Tension()
public Tension(int newTension)
| Method Detail |
|---|
public int getValue()
Tension.public void setValue(int newValue)
newValue - The new value of the tension.public Tension.Level getLevel()
public void modify(int newTension)
newTension - The amount to modify tension by.public java.lang.String getKey()
public java.lang.String toString()
toString in class java.lang.ObjectString-representation of the
current tension level.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||