|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CharState
An object to access and change fields representing the most variable aspects of a MOB
MOB
Field Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
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 |
setThirst(int newVal)
Set the number of thirst points |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
---|
copyOf, ID, initializeClass, name, newInstance |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable |
---|
getSaveStatIndex, getStat, getStatCodes, isStat, setStat |
Field Detail |
---|
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
Method Detail |
---|
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 reach
int getHitPoints()
void setHitPoints(int newVal)
newVal
- number of hit pointsint adjTicksThirsty(boolean bumpUp)
bumpUp
- true to bump the number by one
int adjTicksHungry(boolean bumpUp)
bumpUp
- true to bump the number by one
boolean adjHitPoints(int byThisMuch, CharState max)
byThisMuch
- a positive or negative change in valuemax
- the highest amount to allow the hit points number to reach
int 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 reach
int maxHunger(int baseWeight)
baseWeight
- the base weight of the mob
int 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 reach
int maxThirst(int baseWeight)
baseWeight
- the base weight of the mob
int 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 reach
int 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 reach
void setAllValues(int def)
def
- the value to give to allvoid reset()
void copyInto(CharState intoState)
intoState
- another CharState object.boolean sameAs(CharState E)
E
- the object to compare this one to
Modifiable.getStatCodes()
,
Modifiable.getStat(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |