com.planet_ink.coffee_mud.Common.interfaces
Interface CharStats

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>, Modifiable
All Known Implementing Classes:
DefaultCharStats

public interface CharStats
extends CMCommon, Modifiable

An object to access and change fields representing the varias aspects of a MOB

See Also:
MOB

Nested Class Summary
static class CharStats.CODES
          Global character stat code data collector
 
Field Summary
static int DEFAULT_NUM_STATS
          constant for total number of stat codes
static java.lang.String[] DEFAULT_STAT_ABBR
          string array of abbreviations of each stat code, ordered by numeric value
static java.lang.String[] DEFAULT_STAT_DESC_ATTS
          string array of attributable descriptions of each stat code, ordered by numeric value
static java.lang.String[] DEFAULT_STAT_DESCS
          string array of descriptions of each stat code, ordered by numeric value
static int[] DEFAULT_STAT_MSG_MAP
          an appropriate CMMsg MSG type to correspond to the given saving throw, indexed as STAT_SAVE_ constant
static java.lang.String[] DEFAULT_STAT_NAMES
          string array of descriptions of each stat code, ordered by numeric value
static int STAT_AGE
          stat constant for age
static int STAT_CHARISMA
          stat constant for constitution
static int STAT_CONSTITUTION
          stat constant for constitution
static int STAT_CRIT_CHANCE_PCT_MAGIC
          stat constant for bonus chance % to critical hits with magic
static int STAT_CRIT_CHANCE_PCT_WEAPON
          stat constant for bonus chance % to critical hits with a weapon
static int STAT_CRIT_DAMAGE_PCT_MAGIC
          stat constant for bonus damage % to critical hits with magic
static int STAT_CRIT_DAMAGE_PCT_WEAPON
          stat constant for bonus damage % to critical hits with a weapon
static int STAT_DEXTERITY
          stat constant for dexterity
static int STAT_FAITH
          stat constant for amount of faith?
static int STAT_GENDER
          stat constant for gender
static int STAT_INTELLIGENCE
          stat constant for intelligence
static int STAT_MAX_CHARISMA_ADJ
          stat constant for mac charisma adjustment
static int STAT_MAX_CONSTITUTION_ADJ
          stat constant for nax constitution adjustment
static int STAT_MAX_DEXTERITY_ADJ
          stat constant for max dextity adjustment
static int STAT_MAX_INTELLIGENCE_ADJ
          stat constant for max intelligence adjustment
static int STAT_MAX_STRENGTH_ADJ
          stat constant for max strength adjustment
static int STAT_MAX_WISDOM_ADJ
          stat constant for max wisdom adjustment
static int STAT_SAVE_ACID
          stat constant for save vs acid
static int STAT_SAVE_BLUNT
          stat constant for save vs bludgeoning
static int STAT_SAVE_CHANTS
          stat constant for save vs chants
static int STAT_SAVE_COLD
          stat constant for save vs cold
static int STAT_SAVE_DETECTION
          stat constant for save vs detection when hiding
static int STAT_SAVE_DISEASE
          stat constant for save vs disease
static int STAT_SAVE_ELECTRIC
          stat constant for save vs electricity
static int STAT_SAVE_FIRE
          stat constant for save vs fire
static int STAT_SAVE_GAS
          stat constant for save vs gas
static int STAT_SAVE_GENERAL
          stat constant for save vs somethingelse
static int STAT_SAVE_JUSTICE
          stat constant for save vs humiliation
static int STAT_SAVE_MAGIC
          stat constant for save vs magic
static int STAT_SAVE_MIND
          stat constant for save vs mind attacks/illusion
static int STAT_SAVE_OVERLOOKING
          stat constant for save vs overlooking hidden things
static int STAT_SAVE_PARALYSIS
          stat constant for save vs paralysis
static int STAT_SAVE_PIERCE
          stat constant for save vs piercing
static int STAT_SAVE_POISON
          stat constant for save vs poison
static int STAT_SAVE_PRAYERS
          stat constant for save vs prayers
static int STAT_SAVE_SLASH
          stat constant for save vs slashing
static int STAT_SAVE_SONGS
          stat constant for save vs songs
static int STAT_SAVE_SPELLS
          stat constant for save vs spells
static int STAT_SAVE_TRAPS
          stat constant for save vs traps
static int STAT_SAVE_UNDEAD
          stat constant for save vs undead attacks
static int STAT_SAVE_WATER
          stat constant for save vs water
static int STAT_STRENGTH
          stat constant for strength
static int STAT_WEIGHTADJ
          stat constant for additions/subtractions from base weight
static int STAT_WISDOM
          stat constant for charisma
static int VALUE_ALLSTATS_DEFAULT
          stat constant for strength
 
Method Summary
 void addItemDeficiency(java.lang.String zapperMask)
          Adds a new weapon or armor deficiency, compiling it into the deficiency filter.
 void addItemProficiency(java.lang.String zapperMask)
          Adds a new weapon or armor proficiency, compiling it into the proficiency filter.
 void adjStat(int statNum, int value)
          Adjusts the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface.
 void adjustAbilityAdjustment(java.lang.String ableID, int newValue)
          Sets the adjustments to mob abilities, whether proficiency or something else numeric.
 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 number)
          Alter the number of a given body part which this mob has.
 int combinedSubLevels()
          Returns the combined number of class levels the mob has in all of his classes, except for the current one.
 void copyInto(CharStats intoStats)
          Copies the internal data of this object into another of kind.
 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 apparent gender of the mob.
 int getAbilityAdjustment(java.lang.String ableID)
          Returns the adjustments to mob abilities, whether proficiency or something else numeric.
 java.lang.String getArriveStr()
          Returns the term seen when a character arrives into a room By default, these come from the current actual race, unless set to something new.
 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[] getBreathables()
          Returns resource codes of what this race can breathe as an atmosphere.
 java.util.Collection<CharClass> getCharClasses()
          Returns all CharClass objects for this mob.
 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.
 DoubleFilterer<Item>[] getItemProficiencies()
          Returns the list of special weapon or armor proficiencies, or special detriments, that this character has.
 java.lang.String getLeaveStr()
          Returns the term seen when a character leaves a room By default, these come from the current actual race, unless set to something new.
 int getMaxStat(int abilityCode)
          A method that simply calculates the nomimal max of the given ordinary stat code from available data.
 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.
 java.lang.String getNonBaseStatsAsString()
          Get saving throw and max stat info as an semicolon string list.
 int getRacialStat(MOB mob, int statNum)
          Get one of the basic attributes after racial adjustment.
 int getSave(int which)
          Uses the saving throw stats stored here the mob, modified by basic attributes, to return a final Saving Throw value for this mob.
 int getStat(int statNum)
          Get the value of one of the STAT_ constants, 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 apparent gender of the mob, return the appropriate word "he", "she", or "it".
 java.lang.String HeShe()
          Based on the apparent gender of the mob, return the appropriate word "He", "She", or "It".
 java.lang.String himher()
          Based on the apparent gender of the mob, return the appropriate word "him", "her", or "it".
 java.lang.String hisher()
          Based on the apparent gender of the mob, return the appropriate word "his", "her", or "its".
 boolean isLevelCapped(CharClass C)
          Returns true if this user is capped by the given classes level cap (if one exists)
 java.lang.String MisterMadam()
          Based on the apparent gender of the mob, return the appropriate word "Mister", or "Madam".
 java.lang.String MrMs()
          Based on the apparent gender of the mob, return the appropriate word "Mr.", or "Ms.".
 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 reset()
          Resets all the stats in this object to their factory defaults.
 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 setArriveLeaveStr(java.lang.String arriveStr, java.lang.String leaveStr)
          Changes the terms seen when a character arrives into a room and leaves it.
 void setBodyPartsFromStringAfterRace(java.lang.String str)
          Sets the body part situation for this mob from a string list.
 void setBreathables(int[] newArray)
          Sets resource codes of what this race can breathe as an atmosphere.
 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 apparent level of ths mob by setting a new name.
 void setDisplayClassName(java.lang.String newname)
          Changes the apparent char class of ths mob by setting a new name.
 void setGenderName(java.lang.String gname)
          Sets the apparent gender of the mob.
 void setItemProficiencies(DoubleFilterer<Item>[] newArray)
          Sets the list of special weapon or armor proficiencies, or special detriments, that this character has.
 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 setNonBaseStatsFromString(java.lang.String str)
          set saving throw and max stat info from a semicolon string list.
 void setPermanentStat(int statNum, int value)
          Set one of the basic attributes to a given value.
 void setRaceName(java.lang.String newRaceName)
          Changes the apparent race of ths mob by setting a new name.
 void setRacialStat(int statNum, int value)
          Set one of the basic attributes to approx the value.
 void setStat(int statNum, 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 apparent gender of the mob, return the appropriate word "sir", "madam", or "sir".
 java.lang.String SirMadam()
          Based on the apparent gender of the mob, return the appropriate word "Sir", "Madam", or "Sir".
 
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

VALUE_ALLSTATS_DEFAULT

static final int VALUE_ALLSTATS_DEFAULT
stat constant for strength

See Also:
Constant Field Values

STAT_STRENGTH

static final int STAT_STRENGTH
stat constant for strength

See Also:
Constant Field Values

STAT_INTELLIGENCE

static final int STAT_INTELLIGENCE
stat constant for intelligence

See Also:
Constant Field Values

STAT_DEXTERITY

static final int STAT_DEXTERITY
stat constant for dexterity

See Also:
Constant Field Values

STAT_CONSTITUTION

static final int STAT_CONSTITUTION
stat constant for constitution

See Also:
Constant Field Values

STAT_CHARISMA

static final int STAT_CHARISMA
stat constant for constitution

See Also:
Constant Field Values

STAT_WISDOM

static final int STAT_WISDOM
stat constant for charisma

See Also:
Constant Field Values

STAT_GENDER

static final int STAT_GENDER
stat constant for gender

See Also:
Constant Field Values

STAT_SAVE_PARALYSIS

static final int STAT_SAVE_PARALYSIS
stat constant for save vs paralysis

See Also:
Constant Field Values

STAT_SAVE_FIRE

static final int STAT_SAVE_FIRE
stat constant for save vs fire

See Also:
Constant Field Values

STAT_SAVE_COLD

static final int STAT_SAVE_COLD
stat constant for save vs cold

See Also:
Constant Field Values

STAT_SAVE_WATER

static final int STAT_SAVE_WATER
stat constant for save vs water

See Also:
Constant Field Values

STAT_SAVE_GAS

static final int STAT_SAVE_GAS
stat constant for save vs gas

See Also:
Constant Field Values

STAT_SAVE_MIND

static final int STAT_SAVE_MIND
stat constant for save vs mind attacks/illusion

See Also:
Constant Field Values

STAT_SAVE_GENERAL

static final int STAT_SAVE_GENERAL
stat constant for save vs somethingelse

See Also:
Constant Field Values

STAT_SAVE_JUSTICE

static final int STAT_SAVE_JUSTICE
stat constant for save vs humiliation

See Also:
Constant Field Values

STAT_SAVE_ACID

static final int STAT_SAVE_ACID
stat constant for save vs acid

See Also:
Constant Field Values

STAT_SAVE_ELECTRIC

static final int STAT_SAVE_ELECTRIC
stat constant for save vs electricity

See Also:
Constant Field Values

STAT_SAVE_POISON

static final int STAT_SAVE_POISON
stat constant for save vs poison

See Also:
Constant Field Values

STAT_SAVE_UNDEAD

static final int STAT_SAVE_UNDEAD
stat constant for save vs undead attacks

See Also:
Constant Field Values

STAT_SAVE_MAGIC

static final int STAT_SAVE_MAGIC
stat constant for save vs magic

See Also:
Constant Field Values

STAT_SAVE_DISEASE

static final int STAT_SAVE_DISEASE
stat constant for save vs disease

See Also:
Constant Field Values

STAT_SAVE_TRAPS

static final int STAT_SAVE_TRAPS
stat constant for save vs traps

See Also:
Constant Field Values

STAT_MAX_STRENGTH_ADJ

static final int STAT_MAX_STRENGTH_ADJ
stat constant for max strength adjustment

See Also:
Constant Field Values

STAT_MAX_INTELLIGENCE_ADJ

static final int STAT_MAX_INTELLIGENCE_ADJ
stat constant for max intelligence adjustment

See Also:
Constant Field Values

STAT_MAX_DEXTERITY_ADJ

static final int STAT_MAX_DEXTERITY_ADJ
stat constant for max dextity adjustment

See Also:
Constant Field Values

STAT_MAX_CONSTITUTION_ADJ

static final int STAT_MAX_CONSTITUTION_ADJ
stat constant for nax constitution adjustment

See Also:
Constant Field Values

STAT_MAX_CHARISMA_ADJ

static final int STAT_MAX_CHARISMA_ADJ
stat constant for mac charisma adjustment

See Also:
Constant Field Values

STAT_MAX_WISDOM_ADJ

static final int STAT_MAX_WISDOM_ADJ
stat constant for max wisdom adjustment

See Also:
Constant Field Values

STAT_AGE

static final int STAT_AGE
stat constant for age

See Also:
Constant Field Values

STAT_SAVE_DETECTION

static final int STAT_SAVE_DETECTION
stat constant for save vs detection when hiding

See Also:
Constant Field Values

STAT_SAVE_OVERLOOKING

static final int STAT_SAVE_OVERLOOKING
stat constant for save vs overlooking hidden things

See Also:
Constant Field Values

STAT_FAITH

static final int STAT_FAITH
stat constant for amount of faith?

See Also:
Constant Field Values

STAT_WEIGHTADJ

static final int STAT_WEIGHTADJ
stat constant for additions/subtractions from base weight

See Also:
Constant Field Values

STAT_SAVE_BLUNT

static final int STAT_SAVE_BLUNT
stat constant for save vs bludgeoning

See Also:
Constant Field Values

STAT_SAVE_PIERCE

static final int STAT_SAVE_PIERCE
stat constant for save vs piercing

See Also:
Constant Field Values

STAT_SAVE_SLASH

static final int STAT_SAVE_SLASH
stat constant for save vs slashing

See Also:
Constant Field Values

STAT_SAVE_SPELLS

static final int STAT_SAVE_SPELLS
stat constant for save vs spells

See Also:
Constant Field Values

STAT_SAVE_PRAYERS

static final int STAT_SAVE_PRAYERS
stat constant for save vs prayers

See Also:
Constant Field Values

STAT_SAVE_SONGS

static final int STAT_SAVE_SONGS
stat constant for save vs songs

See Also:
Constant Field Values

STAT_SAVE_CHANTS

static final int STAT_SAVE_CHANTS
stat constant for save vs chants

See Also:
Constant Field Values

STAT_CRIT_CHANCE_PCT_WEAPON

static final int STAT_CRIT_CHANCE_PCT_WEAPON
stat constant for bonus chance % to critical hits with a weapon

See Also:
Constant Field Values

STAT_CRIT_CHANCE_PCT_MAGIC

static final int STAT_CRIT_CHANCE_PCT_MAGIC
stat constant for bonus chance % to critical hits with magic

See Also:
Constant Field Values

STAT_CRIT_DAMAGE_PCT_WEAPON

static final int STAT_CRIT_DAMAGE_PCT_WEAPON
stat constant for bonus damage % to critical hits with a weapon

See Also:
Constant Field Values

STAT_CRIT_DAMAGE_PCT_MAGIC

static final int STAT_CRIT_DAMAGE_PCT_MAGIC
stat constant for bonus damage % to critical hits with magic

See Also:
Constant Field Values

DEFAULT_NUM_STATS

static final int DEFAULT_NUM_STATS
constant for total number of stat codes

See Also:
Constant Field Values

DEFAULT_STAT_ABBR

static final java.lang.String[] DEFAULT_STAT_ABBR
string array of abbreviations of each stat code, ordered by numeric value


DEFAULT_STAT_DESCS

static final java.lang.String[] DEFAULT_STAT_DESCS
string array of descriptions of each stat code, ordered by numeric value


DEFAULT_STAT_NAMES

static final java.lang.String[] DEFAULT_STAT_NAMES
string array of descriptions of each stat code, ordered by numeric value


DEFAULT_STAT_DESC_ATTS

static final java.lang.String[] DEFAULT_STAT_DESC_ATTS
string array of attributable descriptions of each stat code, ordered by numeric value


DEFAULT_STAT_MSG_MAP

static final int[] DEFAULT_STAT_MSG_MAP
an appropriate CMMsg MSG type to correspond to the given saving throw, indexed as STAT_SAVE_ constant

Method Detail

copyInto

void copyInto(CharStats intoStats)
Copies the internal data of this object into another of kind.

Parameters:
intoStats - another CharStats object.

getStat

int getStat(int statNum)
Get the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface.

Parameters:
statNum - which STAT_ constant to get a value for
Returns:
the value of the given STAT
See Also:
CharStats

getMaxStat

int getMaxStat(int abilityCode)
A method that simply calculates the nomimal max of the given ordinary stat code from available data.

Parameters:
abilityCode - (str, int, etc)
Returns:
the max stat.

setStat

void setStat(int statNum,
             int value)
Set the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface.

Parameters:
statNum - which STAT_ constant to get a value for
value - the value of the given STAT
See Also:
CharStats

adjStat

void adjStat(int statNum,
             int value)
Adjusts the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface.

Parameters:
statNum - which STAT_ constant to adjust
value - the amount + or -, to adjust by
See Also:
CharStats

setPermanentStat

void setPermanentStat(int statNum,
                      int value)
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.

Parameters:
statNum - which STAT_ constant to get a value for
value - the value of the given STAT
See Also:
CharStats

setRacialStat

void setRacialStat(int statNum,
                   int value)
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.

Parameters:
statNum - which STAT_ constant to get an approx value for
value - the value of the max, and approxvalue of the given STAT
See Also:
CharStats

getRacialStat

int getRacialStat(MOB mob,
                  int statNum)
Get one of the basic attributes after racial adjustment.

Parameters:
mob - the mob to get adjustments for
statNum - which STAT_ constant to get
Returns:
the value
See Also:
CharStats

getCode

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.

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

getSave

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

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

getNonBaseStatsAsString

java.lang.String getNonBaseStatsAsString()
Get saving throw and max stat info as an semicolon string list.

Returns:
semicolon string

setNonBaseStatsFromString

void setNonBaseStatsFromString(java.lang.String str)
set saving throw and max stat info from a semicolon string list.

Parameters:
str - semicolon string

getBodyPart

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

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

alterBodypart

void alterBodypart(int racialPartNumber,
                   int number)
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.

Parameters:
racialPartNumber - the BODY_ constant from Race interface
number - the amount to change by, positive or negative
See Also:
Race

getBodypartAlteration

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. The racial part number comes from the Race interface BODY_ constants. The return value is positive or negative reflecting the change.

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

getBodyPartsAsString

java.lang.String getBodyPartsAsString()
Returns the entire current body part situation as a string list.

Returns:
the body parts alteration list

setBodyPartsFromStringAfterRace

void setBodyPartsFromStringAfterRace(java.lang.String str)
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.

Parameters:
str - the string list representing the body part situation

numClasses

int numClasses()
Returns the number of character classes that this mob has 0 or more levels in.

Returns:
number of character classes

getMyClass

CharClass getMyClass(int i)
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.

Parameters:
i - the index into the charclass list.
Returns:
the CharClass object
See Also:
CharClass

getCurrentClass

CharClass getCurrentClass()
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.

Returns:
the 0 index CharClass object
See Also:
numClasses(), getCharClasses(), CharClass

getCharClasses

java.util.Collection<CharClass> getCharClasses()
Returns all CharClass objects for this mob. The oldest class is always indexed at 0, with next newest at 1, and the current one last.

Returns:
the Collection of CharClass objects
See Also:
numClasses(), CharClass

getCurrentClassLevel

int getCurrentClassLevel()
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.

Returns:
the number of levels in the 0 index class
See Also:
numClasses()

setMyClasses

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

Parameters:
classes - the semicolon list of character class names

setMyLevels

void setMyLevels(java.lang.String levels)
Creates the enumerated set of character class levels stored here from a semicolon list of levels.

Parameters:
levels - the semicolon list of levels

getMyClassesStr

java.lang.String getMyClassesStr()
Returns the enumerated set of character class names stored here as a semicolon list of string names

Returns:
the semicolon list of character class names

getMyLevelsStr

java.lang.String getMyLevelsStr()
Returns the enumerated set of character class levels stored here as a semicolon list of levels.

Returns:
levels the semicolon list of levels

setCurrentClass

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.

Parameters:
aClass - The charclass object to set the current class to
See Also:
getCurrentClass(), CharClass

setCurrentClassLevel

void setCurrentClassLevel(int level)
Sets the current class level for the mob to the given level.

Parameters:
level - The chararacter class level to set the current class to

getClassLevel

int getClassLevel(CharClass aClass)
Returns the number of levels this mob has in the given character class. -1 means the mob has NO levels in that class.

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

getClassLevel

int getClassLevel(java.lang.String aClass)
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.

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

combinedSubLevels

int combinedSubLevels()
Returns the combined number of class levels the mob has in all of his classes, except for the current one.

Returns:
combined levels minus the current one.

isLevelCapped

boolean isLevelCapped(CharClass C)
Returns true if this user is capped by the given classes level cap (if one exists)

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

setClassLevel

void setClassLevel(CharClass aClass,
                   int level)
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.

Parameters:
aClass - the character class to set a level for
level - the level to set for the given character class
See Also:
setCurrentClass(CharClass), CharClass

getMyRace

Race getMyRace()
Returns the race of the mob.

Returns:
the Race of the mob
See Also:
Race

setMyRace

void setMyRace(Race newVal)
Sets the race of the mob. Race.startRacing should be called after this method is.

Parameters:
newVal - the Race of the mob
See Also:
Race.startRacing(MOB, boolean), Race

raceName

java.lang.String raceName()
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.

Returns:
the name of this mobs current race.
See Also:
Race, setRaceName(String)

getArriveStr

java.lang.String getArriveStr()
Returns the term seen when a character arrives into a room By default, these come from the current actual race, unless set to something new.

Returns:
the arrive string
See Also:
Race, setArriveLeaveStr(String,String)

getLeaveStr

java.lang.String getLeaveStr()
Returns the term seen when a character leaves a room By default, these come from the current actual race, unless set to something new.

Returns:
the leave string
See Also:
Race, setArriveLeaveStr(String,String)

getBreathables

int[] getBreathables()
Returns resource codes of what this race can breathe as an atmosphere. The list is guaranteed sorted. If the list is empty, the race can breathe anything at all.

Returns:
a list of resource codes that this race can breathe
See Also:
RawMaterial, setBreathables(int[])

setBreathables

void setBreathables(int[] newArray)
Sets resource codes of what this race can breathe as an atmosphere. The list MUST BE sorted. If the list is empty, the race can breathe anything at all.

Parameters:
newArray - a list of resource codes that this race can breathe
See Also:
RawMaterial, getBreathables()

setRaceName

void setRaceName(java.lang.String newRaceName)
Changes the apparent 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.

Parameters:
newRaceName - the name of the mobs apparent race
See Also:
Race, raceName()

setArriveLeaveStr

void setArriveLeaveStr(java.lang.String arriveStr,
                       java.lang.String leaveStr)
Changes the terms seen when a character arrives into a room and leaves it. By default, these come from the current actual race.

Parameters:
arriveStr - the arrive string
leaveStr - the leave string
See Also:
Race, getArriveStr(), getLeaveStr()

setDisplayClassName

void setDisplayClassName(java.lang.String newname)
Changes the apparent 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.

Parameters:
newname - the name of the mobs apparent current class
See Also:
CharClass, displayClassName(), displayClassLevel(MOB, boolean), displayClassLevelOnly(MOB)

setDisplayClassLevel

void setDisplayClassLevel(java.lang.String newlevel)
Changes the apparent 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.

Parameters:
newlevel - the name of the mobs apparent level
See Also:
CharClass, displayClassName(), displayClassLevel(MOB, boolean), displayClassLevelOnly(MOB), setDisplayClassName(String)

displayClassName

java.lang.String displayClassName()
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.

Returns:
the name of this mobs current class.
See Also:
CharClass, setDisplayClassName(String), displayClassLevel(MOB, boolean), displayClassLevelOnly(MOB)

displayClassLevel

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

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, displayClassName(), setDisplayClassName(String), displayClassLevelOnly(MOB)

displayClassLevelOnly

java.lang.String displayClassLevelOnly(MOB mob)
Returns either the given mobs authentic classlevel/total level, or the value set through setDisplayClassLevel method.

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

setAllValues

void setAllValues(int def)
Resets all of the stats in this object, attributes and saves alike, to the same given value

Parameters:
def - the value to set all stats to.

reset

void reset()
Resets all the stats in this object to their factory defaults.


setAllBaseValues

void setAllBaseValues(int def)
Resets all of the basic 1-6 stats in this object, to the same given value

Parameters:
def - the value to set all stats to.

getWearableRestrictionsBitmap

long getWearableRestrictionsBitmap()
Returns the sum of local and race-based unwearability codes.

Returns:
a bitmap of unwearable locations
See Also:
Item

setWearableRestrictionsBitmap

void setWearableRestrictionsBitmap(long bitmap)
Sets the sum of local and race-based unwearability codes.

Parameters:
bitmap - a bitmap of unwearable locations
See Also:
Item

setGenderName

void setGenderName(java.lang.String gname)
Sets the apparent 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.

Parameters:
gname - the name of the mobs gender to display
See Also:
genderName()

genderName

java.lang.String genderName()
Returns the apparent 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.

Returns:
the apparent gender of the mob
See Also:
setGenderName(String)

himher

java.lang.String himher()
Based on the apparent gender of the mob, return the appropriate word "him", "her", or "it".

Returns:
the gender-correct pronoun for this mob

hisher

java.lang.String hisher()
Based on the apparent gender of the mob, return the appropriate word "his", "her", or "its".

Returns:
the gender-correct pronoun for this mob

heshe

java.lang.String heshe()
Based on the apparent gender of the mob, return the appropriate word "he", "she", or "it".

Returns:
the gender-correct pronoun for this mob

HeShe

java.lang.String HeShe()
Based on the apparent gender of the mob, return the appropriate word "He", "She", or "It".

Returns:
the gender-correct pronoun for this mob

sirmadam

java.lang.String sirmadam()
Based on the apparent gender of the mob, return the appropriate word "sir", "madam", or "sir".

Returns:
the gender-correct title for this mob

SirMadam

java.lang.String SirMadam()
Based on the apparent gender of the mob, return the appropriate word "Sir", "Madam", or "Sir".

Returns:
the gender-correct title for this mob

MrMs

java.lang.String MrMs()
Based on the apparent gender of the mob, return the appropriate word "Mr.", or "Ms.".

Returns:
the gender-correct title for this mob

MisterMadam

java.lang.String MisterMadam()
Based on the apparent gender of the mob, return the appropriate word "Mister", or "Madam".

Returns:
the gender-correct title for this mob

ageCategory

int ageCategory()
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.

Returns:
the numeric age category of this mob
See Also:
Race

ageName

java.lang.String ageName()
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.

Returns:
the name of the age category for this mob
See Also:
Race.AGE_DESCS

getAbilityAdjustment

int getAbilityAdjustment(java.lang.String ableID)
Returns the adjustments to mob abilities, whether proficiency or something else numeric. Ability adjustments begin with "prof+" to adjust proficiency. They begin with "level+" to adjust the adjusted level. The are followed by the exact ID() of the ability, or * for All, or the skill classification name in uppercase, or the domain name in uppercase.

Parameters:
ableID - the ability ID, with an appropriate prefix
Returns:
the numeric value associated with the adjustment.

adjustAbilityAdjustment

void adjustAbilityAdjustment(java.lang.String ableID,
                             int newValue)
Sets the adjustments to mob abilities, whether proficiency or something else numeric. Ability adjustments begin with "prof+" to adjust proficiency. They begin with "level+" to adjust the adjusted level. The are followed by the exact ID() of the ability, or * for All, or the skill classification name in uppercase, or the domain name in uppercase.

Parameters:
ableID - the ability ID, with an appropriate prefix
newValue - the numeric value associated with the adjustment.

getItemProficiencies

DoubleFilterer<Item>[] getItemProficiencies()
Returns the list of special weapon or armor proficiencies, or special detriments, that this character has. Each one is a filterer which, if passes, means the character can always use the armor or weapon, even if class or race or other considerations might not permit it.

Returns:
a list of proficiency or deficiency codes
See Also:
setItemProficiencies(DoubleFilterer[])

setItemProficiencies

void setItemProficiencies(DoubleFilterer<Item>[] newArray)
Sets the list of special weapon or armor proficiencies, or special detriments, that this character has. Each one is a filterer which, if passes, means the character can always use the armor or weapon, even if class or race or other considerations might not permit it.

Parameters:
newArray - a list of proficiency or deficiency codes
See Also:
getItemProficiencies(), addItemDeficiency(String), addItemProficiency(String)

addItemProficiency

void addItemProficiency(java.lang.String zapperMask)
Adds a new weapon or armor proficiency, compiling it into the proficiency filter. The argument is a zapper mask describing the type of item that the player is newly proficient at.

Parameters:
zapperMask - the zapper mask
See Also:
getItemProficiencies(), addItemDeficiency(String), MaskingLibrary

addItemDeficiency

void addItemDeficiency(java.lang.String zapperMask)
Adds a new weapon or armor deficiency, compiling it into the deficiency filter. The argument is a zapper mask describing the type of item that the player is newly deficient at.

Parameters:
zapperMask - the zapper mask
See Also:
getItemProficiencies(), addItemProficiency(String), MaskingLibrary