| Modifier and Type | Field | Description | 
|---|---|---|
| protected static int[] | DEFAULT_STATES | |
| protected long | fatigue | |
| protected int[] | states | 
ANNOYANCE_DEFAULT_TICKS, DEATH_HUNGER_TICKS, DEATH_THIRST_TICKS, FATIGUED_EXHAUSTED_MILLIS, FATIGUED_MILLIS, REAL_TICK_ADJUST_FACTOR, REST_PER_SIT, REST_PER_SLEEP, STAT_DESCS, STAT_HITPOINTS, STAT_HUNGER, STAT_MANA, STAT_MOVE, STAT_NUMSTATS, STAT_THIRST, STAT_TICKSHUNGRY, STAT_TICKSTHIRSTYidConverter| Constructor | Description | 
|---|---|
| DefaultCharState() | 
| Modifier and Type | Method | Description | 
|---|---|---|
| boolean | adjFatigue(long byThisMuch,
          CharState max) | Set the number of fatigue points, respecting boundaries. | 
| boolean | adjHitPoints(int byThisMuch,
            CharState max) | Set the number of hit points, respecting boundaries. | 
| boolean | adjHunger(int byThisMuch,
         int max) | Set the number of hunger points, respecting boundaries. | 
| boolean | adjMana(int byThisMuch,
       CharState max) | Set the number of mana points, respecting boundaries. | 
| boolean | adjMovement(int byThisMuch,
           CharState max) | Set the number of movement points, respecting boundaries. | 
| boolean | adjThirst(int byThisMuch,
         int max) | Set the number of thirst points, respecting boundaries. | 
| int | adjTicksHungry(boolean bumpUp) | Used to bump and/or read the number of ticks
 that this user has been consecutively hungry | 
| int | adjTicksThirsty(boolean bumpUp) | Used to bump and/or read the number of ticks
 that this user has been consecutively thirsty | 
| int | compareTo(CMObject o) | |
| void | copyInto(CharState intoState) | Copies the internal data of this object into another of kind. | 
| CMObject | copyOf() | Similar to Cloneable.clone(), but does its best to make sure that
 any internal objects to this class are also copyOfed. | 
| protected int | getCodeNum(java.lang.String code) | |
| java.lang.String | getCombatStats() | Get primary combat stats as displayable code string | 
| long | getFatigue() | Get the number of fatigue points for the player | 
| int | getHitPoints() | Get the number of hit points for the player | 
| int | getHunger() | Get the number of hunger points for the player | 
| int | getMana() | Get the number of mana points for the player | 
| int | getMovement() | Get the number of movement points for the player | 
| int | getSaveStatIndex() | Returns the index into the stat codes array where extra savable fields begins. | 
| int | getStat(int statNum) | Get the value of one of the STAT_ constants from the CharState interface. | 
| java.lang.String | getStat(java.lang.String code) | An alternative means of retreiving the values of those fields on this object which are modifiable at
 run-time by builders. | 
| java.lang.String[] | getStatCodes() | Returns an array of the string names of those fields which are modifiable on this object at run-time by
 builders. | 
| int | getThirst() | Get the number of thirst points for the player | 
| java.lang.String | ID() | The CoffeeMud Java Class ID shared by all instances of
 this object. | 
| void | initializeClass() | Called ONCE after all objects are loaded, but before the map is read in
 during initialization. | 
| boolean | isStat(java.lang.String code) | An alternative means of retreiving the values of those fields on this object which are modifiable at
 run-time by builders. | 
| int | maxHunger(int baseWeight) | This method is used to recalculate the maximum thirhungerst for a mob, based
 on their weight and the default maximum hunger | 
| int | maxThirst(int baseWeight) | This method is used to recalculate the maximum thirst for a mob, based
 on their weight and the default maximum thirst | 
| java.lang.String | name() | The displayable name of this object. | 
| CMObject | newInstance() | Returns a new instance of this class. | 
| void | reset() | Resets all the stats in this object to their factory defaults. | 
| boolean | sameAs(CharState E) | Whether this object instance is functionally identical to the object passed in. | 
| void | setAllValues(int def) | Sets all the values in this object to a single given value | 
| void | setFatigue(long newVal) | Set the number of fatigue points | 
| void | setHitPoints(int newVal) | Set the number of hit points | 
| void | setHunger(int newVal) | Set the number of hunger points | 
| void | setMana(int newVal) | Set the number of mana points | 
| void | setMovement(int newVal) | Set the number of movement points | 
| void | setStat(int statNum,
       int value) | Set the value of one of the STAT_ constants from the CharState interface. | 
| void | setStat(java.lang.String code,
       java.lang.String val) | An alternative means of setting the values of those fields on this object which are modifiable at
 run-time by builders. | 
| void | setThirst(int newVal) | Set the number of thirst points | 
protected static final int[] DEFAULT_STATES
protected int[] states
protected long fatigue
public java.lang.String ID()
CMObjectpublic java.lang.String name()
CMObjectname in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObjectnewInstance in interface CMObjectpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic void setAllValues(int def)
CharStatesetAllValues in interface CharStatedef - the value to give to allpublic void reset()
CharStatepublic void copyInto(CharState intoState)
CharStatepublic int getHitPoints()
CharStategetHitPoints in interface CharStatepublic void setHitPoints(int newVal)
CharStatesetHitPoints in interface CharStatenewVal - number of hit pointspublic boolean adjHitPoints(int byThisMuch,
                            CharState max)
CharStateadjHitPoints in interface CharStatebyThisMuch - a positive or negative change in valuemax - the highest amount to allow the hit points number to reachpublic long getFatigue()
CharStategetFatigue in interface CharStatepublic void setFatigue(long newVal)
CharStatesetFatigue in interface CharStatenewVal - number of fatigue pointspublic boolean adjFatigue(long byThisMuch,
                          CharState max)
CharStateadjFatigue in interface CharStatebyThisMuch - a positive or negative change in valuemax - the highest amount to allow the fatigue number to reachpublic int getHunger()
CharStatepublic void setHunger(int newVal)
CharStatepublic int adjTicksHungry(boolean bumpUp)
CharStateadjTicksHungry in interface CharStatebumpUp - true to bump the number by onepublic boolean adjHunger(int byThisMuch,
                         int max)
CharStatepublic int maxHunger(int baseWeight)
CharStatepublic int getThirst()
CharStatepublic void setThirst(int newVal)
CharStatepublic int adjTicksThirsty(boolean bumpUp)
CharStateadjTicksThirsty in interface CharStatebumpUp - true to bump the number by onepublic boolean adjThirst(int byThisMuch,
                         int max)
CharStatepublic int maxThirst(int baseWeight)
CharStatepublic java.lang.String getCombatStats()
CharStategetCombatStats in interface CharStatepublic int getMana()
CharStatepublic void setMana(int newVal)
CharStatepublic boolean adjMana(int byThisMuch,
                       CharState max)
CharStatepublic int getMovement()
CharStategetMovement in interface CharStatepublic void setMovement(int newVal)
CharStatesetMovement in interface CharStatenewVal - number of movement pointspublic boolean adjMovement(int byThisMuch,
                           CharState max)
CharStateadjMovement in interface CharStatebyThisMuch - a positive or negative change in valuemax - the highest amount to allow the movement number to reachpublic int getStat(int statNum)
CharStatepublic void setStat(int statNum,
                    int value)
CharStatepublic int getSaveStatIndex()
ModifiablegetSaveStatIndex in interface ModifiableModifiable.getStatCodes(), 
Modifiable.getStat(String), 
Modifiable.setStat(String, String)public java.lang.String[] getStatCodes()
ModifiablegetStatCodes in interface ModifiableModifiable.getStat(String), 
Modifiable.setStat(String, String)public boolean isStat(java.lang.String code)
ModifiableisStat in interface Modifiablecode - the name of the field to read.Modifiable.getStatCodes()protected int getCodeNum(java.lang.String code)
public boolean sameAs(CharState E)
CharStatesameAs in interface CharStateE - the object to compare this one toModifiable.getStatCodes(), 
Modifiable.getStat(String)public void setStat(java.lang.String code,
                    java.lang.String val)
ModifiablesetStat in interface Modifiablecode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()public java.lang.String getStat(java.lang.String code)
ModifiablegetStat in interface Modifiablecode - the name of the field to read.Modifiable.getStatCodes()public CMObject copyOf()
CMObject