|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjurpe.characters.PrimaryStats
public class PrimaryStats
Utility class to hold character's primary statistics for PC and NPC (ST,DX,HT,IQ)
Constructor Summary | |
---|---|
PrimaryStats()
Default Primary Statistics |
|
PrimaryStats(int s,
int d,
int h,
int i)
Primary Statistics |
|
PrimaryStats(int s,
int d,
int h,
int i,
int hp)
Primary Statistics |
Method Summary | |
---|---|
void |
addFatigue(int f)
Add f points of fatigue to character. |
void |
addToHP(int points)
Add points to current hit points. |
boolean |
equals(java.lang.Object e)
Equals condition for PrimaryStats |
int |
getCurrentHitPoints()
Current Hit Points |
int |
getDX()
Get character's DX |
int |
getFatigue()
Get Fatigue |
java.lang.String |
getHPvsHPMAX()
Get a string [current HP]/[HP max] |
int |
getHT()
Get character's HT |
int |
getInitialHitPoints()
Initial Hit Points = Hit Points may differ from HT if character is non-human |
int |
getIQ()
Get character's IQ |
int |
getMove()
Movement. |
float |
getSpeed()
Get character's speed (HP+DX)/4 |
int |
getST()
Get character's ST |
int |
getSTminusFatigue()
Get character's ST computing fatigue |
int |
hashCode()
Hash code. |
void |
restoreHitPoints()
Set current hit points to initial hit points (full health) |
void |
setCurrentHitPoints(int hp)
Set Hit Points |
void |
setDX(int d)
Set character's DX |
void |
setFatigue(int f)
Set Fatigue. |
void |
setHitPoints(int hp)
Set Hit Points (remaining points before death) |
void |
setHT(int h)
Set character's HT |
void |
setIQ(int i)
Set character's IQ |
void |
setST(int s)
Set character's ST (do not compute fatigue here. |
java.lang.String |
toString()
To string |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PrimaryStats()
public PrimaryStats(int s, int d, int h, int i)
s
- Strengthd
- Dexterityh
- Healthi
- Intelligencepublic PrimaryStats(int s, int d, int h, int i, int hp)
s
- Strengthd
- Dexterityh
- Healthi
- Intelligencehp
- Hit PointsMethod Detail |
---|
public void addFatigue(int f)
f
- Fatigue points to add to current fatiguepublic void setFatigue(int f)
f
- Character fatigue.public int getFatigue()
public void setHitPoints(int hp)
hp
- Hit Pointspublic int getInitialHitPoints()
public int getCurrentHitPoints()
public java.lang.String getHPvsHPMAX()
public void setCurrentHitPoints(int hp)
hp
- Character's hit pointspublic void restoreHitPoints()
public void addToHP(int points)
points
- Points to add to current hit points. If points to be added
will result in current HP > than initial HP, HP will be
restored to initial HP.public void setST(int s)
s
- Character overall strengthpublic void setDX(int d)
d
- Dexteritypublic void setHT(int h)
h
- Healthpublic void setIQ(int i)
i
- Intelligencepublic int getST()
public int getSTminusFatigue()
public int getDX()
public int getHT()
public int getIQ()
public float getSpeed()
public int getMove()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object e)
equals
in class java.lang.Object
e
- Object to confront with
public java.lang.String toString()
toString
in class java.lang.Object
|
Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |