|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultCharStats
public class DefaultCharStats
| Field Summary | |
|---|---|
protected short[] |
bodyAlterations
|
protected java.lang.String |
displayClassLevel
|
protected java.lang.String |
displayClassName
|
protected java.lang.String |
genderName
|
protected CharClass[] |
myClasses
|
protected java.lang.Integer[] |
myLevels
|
protected Race |
myRace
|
protected java.lang.String |
raceName
|
protected short[] |
stats
|
protected long |
unwearableBitmap
|
| Constructor Summary | |
|---|---|
DefaultCharStats()
|
|
| Method Summary | |
|---|---|
int |
ageCategory()
Returns the age category for this mob, based on the age stat constant stored here. |
java.lang.String |
ageName()
Returns the string name of the age category for this mob, based on the age stat constant stored here. |
void |
alterBodypart(int racialPartNumber,
int deviation)
Alter the number of a given body part which this mob has. |
int |
combinedLevels()
|
int |
combinedSubLevels()
Returns the combined number of class levels the mob has in all of his classes, except for the current one. |
int |
compareTo(CMObject o)
|
void |
copyInto(CharStats intoStats)
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. |
java.lang.String |
displayClassLevel(MOB mob,
boolean shortForm)
Returns a combination of the displayClassName and displayClassLevel for the given mob. |
java.lang.String |
displayClassLevelOnly(MOB mob)
Returns either the given mobs authentic classlevel/total level, or the value set through setDisplayClassLevel method. |
java.lang.String |
displayClassName()
Returns the displayable name of this mobs current class. |
java.lang.String |
genderName()
Returns the apparant gender of the mob. |
int |
getBodyPart(int racialPartNumber)
Return the number of a given body part which this mob has. |
int |
getBodypartAlteration(int racialPartNumber)
Check the difference between the number of a given body part which this mob has and the number he or she should have. |
java.lang.String |
getBodyPartsAsString()
Returns the entire current body part situation as a string list. |
int |
getClassLevel(CharClass aClass)
Returns the number of levels this mob has in the given character class. |
int |
getClassLevel(java.lang.String aClass)
Returns the number of levels this mob has in the given character class by name. |
int |
getCode(java.lang.String abilityName)
This method cross-references the given stat name string with the STAT_DESCS string list in the CharStats interface to return the STAT_ constant which the given string represents. |
CharClass |
getCurrentClass()
Returns the CharClass object for this mob which corresponds to the the final index. |
int |
getCurrentClassLevel()
Returns the number of levels that this mob has in the CharClass object which corresponds to the final index. |
CharClass |
getMyClass(int i)
Returns the CharClass object for this mob which corresponds to the the given index. |
java.lang.String |
getMyClassesStr()
Returns the enumerated set of character class names stored here as a semicolon list of string names |
java.lang.String |
getMyLevelsStr()
Returns the enumerated set of character class levels stored here as a semicolon list of levels. |
Race |
getMyRace()
Returns the race of the mob. |
int |
getSave(int which)
Uses the saving throw stats stored here the the mob, modified by basic attributes, to return a final Saving Throw value for this mob. |
java.lang.String |
getSavesAsString()
Get saving throw and max stat info as an semicolon string list. |
int |
getStat(int abilityCode)
Get the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface. |
int |
getStat(java.lang.String abilityName)
Get the value of one of the mob stats, representing attributes, saving throws, and max attributes, from the CharStats interface. |
long |
getWearableRestrictionsBitmap()
Returns the sum of local and race-based unwearability codes. |
java.lang.String |
heshe()
Based on the apparant gender of the mob, return the appropriate word "he", "she", or "it". |
java.lang.String |
HeShe()
Based on the apparant gender of the mob, return the appropriate word "He", "She", or "It". |
java.lang.String |
himher()
Based on the apparant gender of the mob, return the appropriate word "him", "her", or "it". |
java.lang.String |
hisher()
Based on the apparant gender of the mob, return the appropriate word "his", "her", or "its". |
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 |
isLevelCapped(CharClass C)
Returns true if this user is capped by the given classes level cap (if one exists) |
CMObject |
newInstance()
Returns a new instance of this class. |
int |
numClasses()
Returns the number of character classes that this mob has 0 or more levels in. |
java.lang.String |
raceName()
Returns the displayable name of this mobs current race. |
void |
setAllBaseValues(int def)
Resets all of the basic 1-6 stats in this object, to the same given value |
void |
setAllValues(int def)
Resets all of the stats in this object, attributes and saves alike, to the same given value |
void |
setBodyPartsFromStringAfterRace(java.lang.String str)
Sets the body part situation for this mob from a string list. |
void |
setClassLevel(CharClass aClass,
int level)
Changes the number of class levels the mob has in the given character class to the given level. |
void |
setCurrentClass(CharClass aClass)
Adds the character class to the mob to the given class, automatically making the class level 0, and making the class current. |
void |
setCurrentClassLevel(int level)
Sets the current class level for the mob to the given level. |
void |
setDisplayClassLevel(java.lang.String newLevel)
Changes the apparant level of ths mob by setting a new name. |
void |
setDisplayClassName(java.lang.String newName)
Changes the apparant char class of ths mob by setting a new name. |
void |
setGenderName(java.lang.String gname)
Sets the apparant gender of the mob. |
void |
setMyClasses(java.lang.String classes)
Creates the enumerated set of character class objects stored here from a semicolon list of string names |
void |
setMyLevels(java.lang.String levels)
Creates the enumerated set of character class levels stored here from a semicolon list of levels. |
void |
setMyRace(Race newVal)
Sets the race of the mob. |
void |
setPermanentStat(int abilityCode,
int value)
Set one of the basic attributes to a given value. |
void |
setRaceName(java.lang.String newRaceName)
Changes the apparant race of ths mob by setting a new name. |
void |
setRacialStat(int abilityCode,
int racialMax)
Set one of the basic attributes to approx the value. |
void |
setSavesFromString(java.lang.String str)
set saving throw and max stat info from a semicolon string list. |
void |
setStat(int abilityCode,
int value)
Set the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface. |
void |
setWearableRestrictionsBitmap(long bitmap)
Sets the sum of local and race-based unwearability codes. |
java.lang.String |
sirmadam()
Based on the apparant gender of the mob, return the appropriate word "sir", "madam", or "sir". |
java.lang.String |
SirMadam()
Based on the apparant gender of the mob, return the appropriate word "Sir", "Madam", or "Sir". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected short[] stats
protected CharClass[] myClasses
protected java.lang.Integer[] myLevels
protected Race myRace
protected java.lang.String raceName
protected java.lang.String genderName
protected java.lang.String displayClassName
protected java.lang.String displayClassLevel
protected short[] bodyAlterations
protected long unwearableBitmap
| Constructor Detail |
|---|
public DefaultCharStats()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic void setAllBaseValues(int def)
CharStats
setAllBaseValues in interface CharStatsdef - the value to set all stats to.public void setAllValues(int def)
CharStats
setAllValues in interface CharStatsdef - the value to set all stats to.public void copyInto(CharStats intoStats)
CharStats
copyInto in interface CharStatsintoStats - another CharStats object.public void setMyClasses(java.lang.String classes)
CharStats
setMyClasses in interface CharStatsclasses - the semicolon list of character class namespublic void setMyLevels(java.lang.String levels)
CharStats
setMyLevels in interface CharStatslevels - the semicolon list of levelspublic java.lang.String getMyClassesStr()
CharStats
getMyClassesStr in interface CharStatspublic java.lang.String getMyLevelsStr()
CharStats
getMyLevelsStr in interface CharStatspublic long getWearableRestrictionsBitmap()
CharStats
getWearableRestrictionsBitmap in interface CharStatsItempublic void setWearableRestrictionsBitmap(long bitmap)
CharStats
setWearableRestrictionsBitmap in interface CharStatsbitmap - a bitmap of unwearable locationsItempublic int numClasses()
CharStats
numClasses in interface CharStatspublic int combinedSubLevels()
CharStats
combinedSubLevels in interface CharStatspublic int combinedLevels()
public void setDisplayClassName(java.lang.String newName)
CharStats
setDisplayClassName in interface CharStatsnewName - the name of the mobs apparant current classCharClass,
CharStats.displayClassName(),
CharStats.displayClassLevel(MOB, boolean),
CharStats.displayClassLevelOnly(MOB)public java.lang.String displayClassName()
CharStats
displayClassName in interface CharStatsCharClass,
CharStats.setDisplayClassName(String),
CharStats.displayClassLevel(MOB, boolean),
CharStats.displayClassLevelOnly(MOB)public void setDisplayClassLevel(java.lang.String newLevel)
CharStats
setDisplayClassLevel in interface CharStatsnewLevel - the name of the mobs apparant levelCharClass,
CharStats.displayClassName(),
CharStats.displayClassLevel(MOB, boolean),
CharStats.displayClassLevelOnly(MOB),
CharStats.setDisplayClassName(String)
public java.lang.String displayClassLevel(MOB mob,
boolean shortForm)
CharStats
displayClassLevel in interface CharStatsmob - the mob whose class and overall level to displayshortForm - if true, display only the class and level, no extra wording
CharClass,
CharStats.displayClassName(),
CharStats.setDisplayClassName(String),
CharStats.displayClassLevelOnly(MOB)public java.lang.String displayClassLevelOnly(MOB mob)
CharStats
displayClassLevelOnly in interface CharStatsmob - the mob whose class and overall level to display
CharClass,
CharStats.displayClassName(),
CharStats.setDisplayClassName(String),
CharStats.displayClassLevel(MOB, boolean)public java.lang.String getSavesAsString()
CharStats
getSavesAsString in interface CharStatspublic void setSavesFromString(java.lang.String str)
CharStats
setSavesFromString in interface CharStatsstr - semicolon stringpublic void setRaceName(java.lang.String newRaceName)
CharStats
setRaceName in interface CharStatsnewRaceName - the name of the mobs apparant raceRace,
CharStats.setRaceName(String)public java.lang.String raceName()
CharStats
raceName in interface CharStatsRace,
CharStats.setRaceName(String)public CharClass getMyClass(int i)
CharStats
getMyClass in interface CharStatsi - the index into the charclass list.
CharClasspublic int getClassLevel(java.lang.String aClass)
CharStats
getClassLevel in interface CharStatsaClass - the name of the Character Class to check
CharClasspublic int getClassLevel(CharClass aClass)
CharStats
getClassLevel in interface CharStatsaClass - the CharClass object to check
CharClass
public void setClassLevel(CharClass aClass,
int level)
CharStats
setClassLevel in interface CharStatsaClass - the character class to set a level forlevel - the level to set for the given character classCharStats.setCurrentClass(CharClass),
CharClasspublic boolean isLevelCapped(CharClass C)
CharStats
isLevelCapped in interface CharStatsC - the class to check
CharClass.getLevelCap()public void setCurrentClassLevel(int level)
CharStats
setCurrentClassLevel in interface CharStatslevel - The chararacter class level to set the current class topublic void setCurrentClass(CharClass aClass)
CharStats
setCurrentClass in interface CharStatsaClass - The charclass object to set the current class toCharStats.getCurrentClass(),
CharClasspublic CharClass getCurrentClass()
CharStats
getCurrentClass in interface CharStatsCharStats.numClasses(),
CharClasspublic int getCurrentClassLevel()
CharStats
getCurrentClassLevel in interface CharStatsCharStats.numClasses()public Race getMyRace()
CharStats
getMyRace in interface CharStatsRacepublic void setMyRace(Race newVal)
CharStats
setMyRace in interface CharStatsnewVal - the Race of the mobRace.startRacing(MOB, boolean),
Racepublic int getBodyPart(int racialPartNumber)
CharStats
getBodyPart in interface CharStatsracialPartNumber - the BODY_ constant from Race interface
Racepublic java.lang.String getBodyPartsAsString()
CharStats
getBodyPartsAsString in interface CharStatspublic void setBodyPartsFromStringAfterRace(java.lang.String str)
CharStats
setBodyPartsFromStringAfterRace in interface CharStatsstr - the string list representing the body part situationpublic int getBodypartAlteration(int racialPartNumber)
CharStats
getBodypartAlteration in interface CharStatsracialPartNumber - the BODY_ constant from Race interface
Race
public void alterBodypart(int racialPartNumber,
int deviation)
CharStats
alterBodypart in interface CharStatsracialPartNumber - the BODY_ constant from Race interfacedeviation - the amount to change by, positive or negativeRacepublic int ageCategory()
CharStats
ageCategory in interface CharStatsRacepublic java.lang.String ageName()
CharStats
ageName in interface CharStatsRace.AGE_DESCSpublic int getSave(int which)
CharStats
getSave in interface CharStatswhich - which STAT_SAVE_ constant from CharStats interface to use
CharStatspublic CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic void setGenderName(java.lang.String gname)
CharStats
setGenderName in interface CharStatsgname - the name of the mobs gender to displayCharStats.genderName()public java.lang.String genderName()
CharStats
genderName in interface CharStatsCharStats.setGenderName(String)public java.lang.String himher()
CharStats
himher in interface CharStatspublic java.lang.String hisher()
CharStats
hisher in interface CharStatspublic java.lang.String heshe()
CharStats
heshe in interface CharStatspublic java.lang.String sirmadam()
CharStats
sirmadam in interface CharStatspublic java.lang.String SirMadam()
CharStats
SirMadam in interface CharStatspublic java.lang.String HeShe()
CharStats
HeShe in interface CharStatspublic int getStat(int abilityCode)
CharStats
getStat in interface CharStatsabilityCode - which STAT_ constant to get a value for
CharStats
public void setPermanentStat(int abilityCode,
int value)
CharStats
setPermanentStat in interface CharStatsabilityCode - which STAT_ constant to get a value forvalue - the value of the given STATCharStats
public void setRacialStat(int abilityCode,
int racialMax)
CharStats
setRacialStat in interface CharStatsabilityCode - which STAT_ constant to get an approx value forracialMax - the value of the max, and approxvalue of the given STATCharStats
public void setStat(int abilityCode,
int value)
CharStats
setStat in interface CharStatsabilityCode - which STAT_ constant to get a value forvalue - the value of the given STATCharStatspublic int getStat(java.lang.String abilityName)
CharStats
getStat in interface CharStatsabilityName - name of which constant to get a value for
CharStats,
CharStats.STAT_DESCSpublic int getCode(java.lang.String abilityName)
CharStats
getCode in interface CharStatsabilityName - name of which constant to determine the STAT_ constant for
CharStatspublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||