com.planet_ink.coffee_mud.Common
Class DefaultCharStats

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultCharStats
All Implemented Interfaces:
CharStats, CMCommon, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DefaultCharStats
extends java.lang.Object
implements CharStats


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
           
 
Fields inherited from interface com.planet_ink.coffee_mud.Common.interfaces.CharStats
NUM_BASE_STATS, NUM_SAVE_START, NUM_STATS, STAT_ABBR, STAT_AGE, STAT_CHARISMA, STAT_CONSTITUTION, STAT_DESC_ATTS, STAT_DESCS, STAT_DEXTERITY, STAT_FAITH, STAT_GENDER, STAT_INTELLIGENCE, STAT_MAX_CHARISMA_ADJ, STAT_MAX_CONSTITUTION_ADJ, STAT_MAX_DEXTERITY_ADJ, STAT_MAX_INTELLIGENCE_ADJ, STAT_MAX_STRENGTH_ADJ, STAT_MAX_WISDOM_ADJ, STAT_MSG_MAP, STAT_NAMES, STAT_SAVE_ACID, STAT_SAVE_COLD, STAT_SAVE_DETECTION, STAT_SAVE_DISEASE, STAT_SAVE_ELECTRIC, STAT_SAVE_FIRE, STAT_SAVE_GAS, STAT_SAVE_GENERAL, STAT_SAVE_JUSTICE, STAT_SAVE_MAGIC, STAT_SAVE_MIND, STAT_SAVE_OVERLOOKING, STAT_SAVE_PARALYSIS, STAT_SAVE_POISON, STAT_SAVE_TRAPS, STAT_SAVE_UNDEAD, STAT_SAVE_WATER, STAT_STRENGTH, STAT_WISDOM, VALUE_ALLSTATS_DEFAULT
 
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

stats

protected short[] stats

myClasses

protected CharClass[] myClasses

myLevels

protected java.lang.Integer[] myLevels

myRace

protected Race myRace

raceName

protected java.lang.String raceName

genderName

protected java.lang.String genderName

displayClassName

protected java.lang.String displayClassName

displayClassLevel

protected java.lang.String displayClassLevel

bodyAlterations

protected short[] bodyAlterations

unwearableBitmap

protected long unwearableBitmap
Constructor Detail

DefaultCharStats

public DefaultCharStats()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, MiscTech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

setAllBaseValues

public void setAllBaseValues(int def)
Description copied from interface: CharStats
Resets all of the basic 1-6 stats in this object, to the same given value

Specified by:
setAllBaseValues in interface CharStats
Parameters:
def - the value to set all stats to.

setAllValues

public void setAllValues(int def)
Description copied from interface: CharStats
Resets all of the stats in this object, attributes and saves alike, to the same given value

Specified by:
setAllValues in interface CharStats
Parameters:
def - the value to set all stats to.

copyInto

public void copyInto(CharStats intoStats)
Description copied from interface: CharStats
Copies the internal data of this object into another of kind.

Specified by:
copyInto in interface CharStats
Parameters:
intoStats - another CharStats object.

setMyClasses

public void setMyClasses(java.lang.String classes)
Description copied from interface: CharStats
Creates the enumerated set of character class objects stored here from a semicolon list of string names

Specified by:
setMyClasses in interface CharStats
Parameters:
classes - the semicolon list of character class names

setMyLevels

public void setMyLevels(java.lang.String levels)
Description copied from interface: CharStats
Creates the enumerated set of character class levels stored here from a semicolon list of levels.

Specified by:
setMyLevels in interface CharStats
Parameters:
levels - the semicolon list of levels

getMyClassesStr

public java.lang.String getMyClassesStr()
Description copied from interface: CharStats
Returns the enumerated set of character class names stored here as a semicolon list of string names

Specified by:
getMyClassesStr in interface CharStats
Returns:
the semicolon list of character class names

getMyLevelsStr

public java.lang.String getMyLevelsStr()
Description copied from interface: CharStats
Returns the enumerated set of character class levels stored here as a semicolon list of levels.

Specified by:
getMyLevelsStr in interface CharStats
Returns:
levels the semicolon list of levels

getWearableRestrictionsBitmap

public long getWearableRestrictionsBitmap()
Description copied from interface: CharStats
Returns the sum of local and race-based unwearability codes.

Specified by:
getWearableRestrictionsBitmap in interface CharStats
Returns:
a bitmap of unwearable locations
See Also:
Item

setWearableRestrictionsBitmap

public void setWearableRestrictionsBitmap(long bitmap)
Description copied from interface: CharStats
Sets the sum of local and race-based unwearability codes.

Specified by:
setWearableRestrictionsBitmap in interface CharStats
Parameters:
bitmap - a bitmap of unwearable locations
See Also:
Item

numClasses

public int numClasses()
Description copied from interface: CharStats
Returns the number of character classes that this mob has 0 or more levels in.

Specified by:
numClasses in interface CharStats
Returns:
number of character classes

combinedSubLevels

public int combinedSubLevels()
Description copied from interface: CharStats
Returns the combined number of class levels the mob has in all of his classes, except for the current one.

Specified by:
combinedSubLevels in interface CharStats
Returns:
combined levels minus the current one.

combinedLevels

public int combinedLevels()

setDisplayClassName

public void setDisplayClassName(java.lang.String newName)
Description copied from interface: CharStats
Changes the apparant char class of ths mob by setting a new name. A value of null will reset this setting, allowing the mobs TRUE current class to be displayed through the displayClassName method instead of the string set through this one.

Specified by:
setDisplayClassName in interface CharStats
Parameters:
newName - the name of the mobs apparant current class
See Also:
CharClass, CharStats.displayClassName(), CharStats.displayClassLevel(MOB, boolean), CharStats.displayClassLevelOnly(MOB)

displayClassName

public java.lang.String displayClassName()
Description copied from interface: CharStats
Returns the displayable name of this mobs current class. If this method is called on the mobs charStats() object, as opposed to baseCharStats(), it may return something different than charStats().getCurrentClass().name(). For this reason, you should ONLY use this method when you want to display the mobs current class.

Specified by:
displayClassName in interface CharStats
Returns:
the name of this mobs current class.
See Also:
CharClass, CharStats.setDisplayClassName(String), CharStats.displayClassLevel(MOB, boolean), CharStats.displayClassLevelOnly(MOB)

setDisplayClassLevel

public void setDisplayClassLevel(java.lang.String newLevel)
Description copied from interface: CharStats
Changes the apparant level of ths mob by setting a new name. A value of null will reset this setting, allowing the mobs TRUE level to be displayed through the displayClassLevel method instead of the string set through this one.

Specified by:
setDisplayClassLevel in interface CharStats
Parameters:
newLevel - the name of the mobs apparant level
See Also:
CharClass, CharStats.displayClassName(), CharStats.displayClassLevel(MOB, boolean), CharStats.displayClassLevelOnly(MOB), CharStats.setDisplayClassName(String)

displayClassLevel

public java.lang.String displayClassLevel(MOB mob,
                                          boolean shortForm)
Description copied from interface: CharStats
Returns a combination of the displayClassName and displayClassLevel for the given mob. If either are null, authentic values will be used.

Specified by:
displayClassLevel in interface CharStats
Parameters:
mob - the mob whose class and overall level to display
shortForm - if true, display only the class and level, no extra wording
Returns:
the name of this mobs current class.
See Also:
CharClass, CharStats.displayClassName(), CharStats.setDisplayClassName(String), CharStats.displayClassLevelOnly(MOB)

displayClassLevelOnly

public java.lang.String displayClassLevelOnly(MOB mob)
Description copied from interface: CharStats
Returns either the given mobs authentic classlevel/total level, or the value set through setDisplayClassLevel method.

Specified by:
displayClassLevelOnly in interface CharStats
Parameters:
mob - the mob whose class and overall level to display
Returns:
the name of this mobs current class.
See Also:
CharClass, CharStats.displayClassName(), CharStats.setDisplayClassName(String), CharStats.displayClassLevel(MOB, boolean)

getSavesAsString

public java.lang.String getSavesAsString()
Description copied from interface: CharStats
Get saving throw and max stat info as an semicolon string list.

Specified by:
getSavesAsString in interface CharStats
Returns:
semicolon string

setSavesFromString

public void setSavesFromString(java.lang.String str)
Description copied from interface: CharStats
set saving throw and max stat info from a semicolon string list.

Specified by:
setSavesFromString in interface CharStats
Parameters:
str - semicolon string

setRaceName

public void setRaceName(java.lang.String newRaceName)
Description copied from interface: CharStats
Changes the apparant race of ths mob by setting a new name. A value of null will reset this setting, allowing the mobs TRUE race to be displayed through the raceName method instead of the string set through this one.

Specified by:
setRaceName in interface CharStats
Parameters:
newRaceName - the name of the mobs apparant race
See Also:
Race, CharStats.setRaceName(String)

raceName

public java.lang.String raceName()
Description copied from interface: CharStats
Returns the displayable name of this mobs current race. If this method is called on the mobs charStats() object, as opposed to baseCharStats(), it may return something different than charStats().getMyRace().name(). For this reason, you should ONLY use this method when you want to display the mobs current race.

Specified by:
raceName in interface CharStats
Returns:
the name of this mobs current race.
See Also:
Race, CharStats.setRaceName(String)

getMyClass

public CharClass getMyClass(int i)
Description copied from interface: CharStats
Returns the CharClass object for this mob which corresponds to the the given index. The oldest class is always indexed at 0, with next newest at 1, and the current one last.

Specified by:
getMyClass in interface CharStats
Parameters:
i - the index into the charclass list.
Returns:
the CharClass object
See Also:
CharClass

getClassLevel

public int getClassLevel(java.lang.String aClass)
Description copied from interface: CharStats
Returns the number of levels this mob has in the given character class by name. -1 means the mob has NO levels in that class.

Specified by:
getClassLevel in interface CharStats
Parameters:
aClass - the name of the Character Class to check
Returns:
the number of levels the mob has in the class, or -1
See Also:
CharClass

getClassLevel

public int getClassLevel(CharClass aClass)
Description copied from interface: CharStats
Returns the number of levels this mob has in the given character class. -1 means the mob has NO levels in that class.

Specified by:
getClassLevel in interface CharStats
Parameters:
aClass - the CharClass object to check
Returns:
the number of levels the mob has in the class, or -1
See Also:
CharClass

setClassLevel

public void setClassLevel(CharClass aClass,
                          int level)
Description copied from interface: CharStats
Changes the number of class levels the mob has in the given character class to the given level. If the mob does not have any levels in the given class, then setCurrentClass will be called first.

Specified by:
setClassLevel in interface CharStats
Parameters:
aClass - the character class to set a level for
level - the level to set for the given character class
See Also:
CharStats.setCurrentClass(CharClass), CharClass

isLevelCapped

public boolean isLevelCapped(CharClass C)
Description copied from interface: CharStats
Returns true if this user is capped by the given classes level cap (if one exists)

Specified by:
isLevelCapped in interface CharStats
Parameters:
C - the class to check
Returns:
true if the player is level capped, false otherwise
See Also:
CharClass.getLevelCap()

setCurrentClassLevel

public void setCurrentClassLevel(int level)
Description copied from interface: CharStats
Sets the current class level for the mob to the given level.

Specified by:
setCurrentClassLevel in interface CharStats
Parameters:
level - The chararacter class level to set the current class to

setCurrentClass

public void setCurrentClass(CharClass aClass)
Description copied from interface: CharStats
Adds the character class to the mob to the given class, automatically making the class level 0, and making the class current.

Specified by:
setCurrentClass in interface CharStats
Parameters:
aClass - The charclass object to set the current class to
See Also:
CharStats.getCurrentClass(), CharClass

getCurrentClass

public CharClass getCurrentClass()
Description copied from interface: CharStats
Returns the CharClass object for this mob which corresponds to the the final index. The oldest class is always indexed at 0, with next newest at 1, and the current one last.

Specified by:
getCurrentClass in interface CharStats
Returns:
the 0 index CharClass object
See Also:
CharStats.numClasses(), CharClass

getCurrentClassLevel

public int getCurrentClassLevel()
Description copied from interface: CharStats
Returns the number of levels that this mob has in the CharClass object which corresponds to the final index. The oldest class is always indexed at 0, with next newest at 1, and the current one last.

Specified by:
getCurrentClassLevel in interface CharStats
Returns:
the number of levels in the 0 index class
See Also:
CharStats.numClasses()

getMyRace

public Race getMyRace()
Description copied from interface: CharStats
Returns the race of the mob.

Specified by:
getMyRace in interface CharStats
Returns:
the Race of the mob
See Also:
Race

setMyRace

public void setMyRace(Race newVal)
Description copied from interface: CharStats
Sets the race of the mob. Race.startRacing should be called after this method is.

Specified by:
setMyRace in interface CharStats
Parameters:
newVal - the Race of the mob
See Also:
Race.startRacing(MOB, boolean), Race

getBodyPart

public int getBodyPart(int racialPartNumber)
Description copied from interface: CharStats
Return the number of a given body part which this mob has. The racial part number comes from the Race interface BODY_ constants.

Specified by:
getBodyPart in interface CharStats
Parameters:
racialPartNumber - the BODY_ constant from Race interface
Returns:
the number of the given body part this mob has
See Also:
Race

getBodyPartsAsString

public java.lang.String getBodyPartsAsString()
Description copied from interface: CharStats
Returns the entire current body part situation as a string list.

Specified by:
getBodyPartsAsString in interface CharStats
Returns:
the body parts alteration list

setBodyPartsFromStringAfterRace

public void setBodyPartsFromStringAfterRace(java.lang.String str)
Description copied from interface: CharStats
Sets the body part situation for this mob from a string list. The name is a reminder to make sure the mobs Race is established first.

Specified by:
setBodyPartsFromStringAfterRace in interface CharStats
Parameters:
str - the string list representing the body part situation

getBodypartAlteration

public int getBodypartAlteration(int racialPartNumber)
Description copied from interface: CharStats
Check the difference between the number of a given body part which this mob has and the number he or she should have. The racial part number comes from the Race interface BODY_ constants. The return value is positive or negative reflecting the change.

Specified by:
getBodypartAlteration in interface CharStats
Parameters:
racialPartNumber - the BODY_ constant from Race interface
Returns:
the difference between parts he has and should have
See Also:
Race

alterBodypart

public void alterBodypart(int racialPartNumber,
                          int deviation)
Description copied from interface: CharStats
Alter the number of a given body part which this mob has. The racial part number comes from the Race interface BODY_ constants. The number is positive or negative reflecting the change.

Specified by:
alterBodypart in interface CharStats
Parameters:
racialPartNumber - the BODY_ constant from Race interface
deviation - the amount to change by, positive or negative
See Also:
Race

ageCategory

public int ageCategory()
Description copied from interface: CharStats
Returns the age category for this mob, based on the age stat constant stored here. The age categories are defined in the Race interface as AGE_ constants.

Specified by:
ageCategory in interface CharStats
Returns:
the numeric age category of this mob
See Also:
Race

ageName

public java.lang.String ageName()
Description copied from interface: CharStats
Returns the string name of the age category for this mob, based on the age stat constant stored here. The age category names are defined in the Race interface in the AGE_DESCS_ constant.

Specified by:
ageName in interface CharStats
Returns:
the name of the age category for this mob
See Also:
Race.AGE_DESCS

getSave

public int getSave(int which)
Description copied from interface: CharStats
Uses the saving throw stats stored here the the mob, modified by basic attributes, to return a final Saving Throw value for this mob.

Specified by:
getSave in interface CharStats
Parameters:
which - which STAT_SAVE_ constant from CharStats interface to use
Returns:
the final saving throw value
See Also:
CharStats

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

setGenderName

public void setGenderName(java.lang.String gname)
Description copied from interface: CharStats
Sets the apparant gender of the mob. If null is used, this value is reset and the mobs real gender name will be displayed through the genderName method instead of the one set here.

Specified by:
setGenderName in interface CharStats
Parameters:
gname - the name of the mobs gender to display
See Also:
CharStats.genderName()

genderName

public java.lang.String genderName()
Description copied from interface: CharStats
Returns the apparant gender of the mob. If this method is called on the mobs charStats() object, as opposed to baseCharStats(), it may return something different than charStats().getStat(GENDER) For this reason, you should ONLY use this method when you want to display the mobs current gender.

Specified by:
genderName in interface CharStats
Returns:
the apparant gender of the mob
See Also:
CharStats.setGenderName(String)

himher

public java.lang.String himher()
Description copied from interface: CharStats
Based on the apparant gender of the mob, return the appropriate word "him", "her", or "it".

Specified by:
himher in interface CharStats
Returns:
the gender-correct pronoun for this mob

hisher

public java.lang.String hisher()
Description copied from interface: CharStats
Based on the apparant gender of the mob, return the appropriate word "his", "her", or "its".

Specified by:
hisher in interface CharStats
Returns:
the gender-correct pronoun for this mob

heshe

public java.lang.String heshe()
Description copied from interface: CharStats
Based on the apparant gender of the mob, return the appropriate word "he", "she", or "it".

Specified by:
heshe in interface CharStats
Returns:
the gender-correct pronoun for this mob

sirmadam

public java.lang.String sirmadam()
Description copied from interface: CharStats
Based on the apparant gender of the mob, return the appropriate word "sir", "madam", or "sir".

Specified by:
sirmadam in interface CharStats
Returns:
the gender-correct title for this mob

SirMadam

public java.lang.String SirMadam()
Description copied from interface: CharStats
Based on the apparant gender of the mob, return the appropriate word "Sir", "Madam", or "Sir".

Specified by:
SirMadam in interface CharStats
Returns:
the gender-correct title for this mob

HeShe

public java.lang.String HeShe()
Description copied from interface: CharStats
Based on the apparant gender of the mob, return the appropriate word "He", "She", or "It".

Specified by:
HeShe in interface CharStats
Returns:
the gender-correct pronoun for this mob

getStat

public int getStat(int abilityCode)
Description copied from interface: CharStats
Get the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface.

Specified by:
getStat in interface CharStats
Parameters:
abilityCode - which STAT_ constant to get a value for
Returns:
the value of the given STAT
See Also:
CharStats

setPermanentStat

public void setPermanentStat(int abilityCode,
                             int value)
Description copied from interface: CharStats
Set one of the basic attributes to a given value. The basic attributes are defined as the first 6 STAT_ constants from the CharStats interface. Using this method will also update the STAT_MAX_* attributes to make sure that they are not able to be modifed upwards.

Specified by:
setPermanentStat in interface CharStats
Parameters:
abilityCode - which STAT_ constant to get a value for
value - the value of the given STAT
See Also:
CharStats

setRacialStat

public void setRacialStat(int abilityCode,
                          int racialMax)
Description copied from interface: CharStats
Set one of the basic attributes to approx the value. The basic attributes are defined as the first 6 STAT_ constants from the CharStats interface. Using this method will also update the STAT_MAX_* attributes to make sure that they are not able to be trained upwards.

Specified by:
setRacialStat in interface CharStats
Parameters:
abilityCode - which STAT_ constant to get an approx value for
racialMax - the value of the max, and approxvalue of the given STAT
See Also:
CharStats

setStat

public void setStat(int abilityCode,
                    int value)
Description copied from interface: CharStats
Set the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface.

Specified by:
setStat in interface CharStats
Parameters:
abilityCode - which STAT_ constant to get a value for
value - the value of the given STAT
See Also:
CharStats

getStat

public int getStat(java.lang.String abilityName)
Description copied from interface: CharStats
Get the value of one of the mob stats, representing attributes, saving throws, and max attributes, from the CharStats interface. The abilityName is cross referenced with STAT_DESCS string array to determine the proper STAT_ constant.

Specified by:
getStat in interface CharStats
Parameters:
abilityName - name of which constant to get a value for
Returns:
the value of the given STAT
See Also:
CharStats, CharStats.STAT_DESCS

getCode

public int getCode(java.lang.String abilityName)
Description copied from interface: CharStats
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.

Specified by:
getCode in interface CharStats
Parameters:
abilityName - name of which constant to determine the STAT_ constant for
Returns:
the STAT_ constant value from CharStats interface
See Also:
CharStats

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>