java.lang.Cloneable
, CMCommon
, CMObject
, java.lang.Comparable<CMObject>
, Modifiable
DefaultCharState
public interface CharState extends CMCommon, Modifiable
MOB
Modifier and Type | Field | Description |
---|---|---|
static int |
ANNOYANCE_DEFAULT_TICKS |
constant representing how many ticks between hunger/thirst messages
|
static int |
DEATH_HUNGER_TICKS |
constant representing how many ticks a MOB can be hungry before death
|
static int |
DEATH_THIRST_TICKS |
constant representing how many ticks a MOB can be thirsty before death
|
static long |
FATIGUED_EXHAUSTED_MILLIS |
constant for how many fatigue points are required to be considered exhausted
|
static long |
FATIGUED_MILLIS |
constant for how many fatigue points are required to be considered fatigued
|
static int |
REAL_TICK_ADJUST_FACTOR |
constant representing something
|
static long |
REST_PER_SIT |
constant for how many fatigue points are lost per tick of rest
|
static long |
REST_PER_SLEEP |
constant for how many fatigue points are lost per tick of rest
|
static java.lang.String[] |
STAT_DESCS |
stat constant descriptions
|
static int |
STAT_HITPOINTS |
stat constant for hit points
|
static int |
STAT_HUNGER |
stat constant for hunger
|
static int |
STAT_MANA |
stat constant for mana
|
static int |
STAT_MOVE |
stat constant for movement
|
static int |
STAT_NUMSTATS |
stat constant for number of other stat constants
|
static int |
STAT_THIRST |
stat constant for thirst
|
static int |
STAT_TICKSHUNGRY |
stat constant for thirst
|
static int |
STAT_TICKSTHIRSTY |
stat constant for thirst
|
idConverter
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 maxHunger) |
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 maxThirst) |
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
|
void |
copyInto(CharState intoState) |
Copies the internal data of this object into another of kind.
|
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 |
getStat(int statNum) |
Get the value of one of the STAT_ constants from the CharState interface.
|
int |
getThirst() |
Get the number of thirst points for the player
|
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
|
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 |
setThirst(int newVal) |
Set the number of thirst points
|
copyOf, ID, initializeClass, name, newInstance
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
static final int STAT_HITPOINTS
static final int STAT_MANA
static final int STAT_MOVE
static final int STAT_HUNGER
static final int STAT_THIRST
static final int STAT_TICKSHUNGRY
static final int STAT_TICKSTHIRSTY
static final int STAT_NUMSTATS
static final java.lang.String[] STAT_DESCS
static final int ANNOYANCE_DEFAULT_TICKS
static final int REAL_TICK_ADJUST_FACTOR
static final int DEATH_THIRST_TICKS
static final int DEATH_HUNGER_TICKS
static final long REST_PER_SLEEP
static final long REST_PER_SIT
static final long FATIGUED_MILLIS
static final long FATIGUED_EXHAUSTED_MILLIS
java.lang.String getCombatStats()
long getFatigue()
void setFatigue(long newVal)
newVal
- number of fatigue pointsboolean adjFatigue(long byThisMuch, CharState max)
byThisMuch
- a positive or negative change in valuemax
- the highest amount to allow the fatigue number to reachint getHitPoints()
void setHitPoints(int newVal)
newVal
- number of hit pointsint adjTicksThirsty(boolean bumpUp)
bumpUp
- true to bump the number by oneint adjTicksHungry(boolean bumpUp)
bumpUp
- true to bump the number by oneboolean adjHitPoints(int byThisMuch, CharState max)
byThisMuch
- a positive or negative change in valuemax
- the highest amount to allow the hit points number to reachint getHunger()
void setHunger(int newVal)
newVal
- number of hunger pointsboolean adjHunger(int byThisMuch, int maxHunger)
byThisMuch
- a positive or negative change in valuemaxHunger
- the highest amount to allow the hunger number to reachint maxHunger(int baseWeight)
baseWeight
- the base weight of the mobint getThirst()
void setThirst(int newVal)
newVal
- number of thirst pointsboolean adjThirst(int byThisMuch, int maxThirst)
byThisMuch
- a positive or negative change in valuemaxThirst
- the highest amount to allow the thirst number to reachint maxThirst(int baseWeight)
baseWeight
- the base weight of the mobint getMana()
void setMana(int newVal)
newVal
- number of mana pointsboolean adjMana(int byThisMuch, CharState max)
byThisMuch
- a positive or negative change in valuemax
- the highest amount to allow the mana number to reachint getMovement()
void setMovement(int newVal)
newVal
- number of movement pointsboolean adjMovement(int byThisMuch, CharState max)
byThisMuch
- a positive or negative change in valuemax
- the highest amount to allow the movement number to reachvoid setAllValues(int def)
def
- the value to give to allint getStat(int statNum)
statNum
- which STAT_ constant to get a value forCharState
void setStat(int statNum, int value)
statNum
- which STAT_ constant to get a value forvalue
- the value of the given STATCharState
void reset()
void copyInto(CharState intoState)
intoState
- another CharState object.boolean sameAs(CharState E)
E
- the object to compare this one toModifiable.getStatCodes()
,
Modifiable.getStat(String)