java.lang.Cloneable
, CMCommon
, CMObject
, java.lang.Comparable<CMObject>
, Deity.DeityWorshipper
, Modifiable
DefaultCharStats
public interface CharStats extends CMCommon, Modifiable, Deity.DeityWorshipper
MOB
Modifier and Type | Interface | Description |
---|---|---|
static class |
CharStats.CODES |
Global character stat code data collector
|
Modifier and Type | Field | Description |
---|---|---|
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_RECOVERRATE5_ADJ |
stat constant for recovery rate
|
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_DOUBT |
stat constant for amount of doubt?
|
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 |
STAT_XP_ADJ_PCT |
stat constant for xp adjustment %
|
static int |
VALUE_ALLSTATS_DEFAULT |
stat constant for strength
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
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.
|
java.lang.String |
boygirl() |
Based on the apparent gender of the mob, return the appropriate word "Boy", "Girl", or "Child".
|
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.
|
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.
|
int |
getStatCode(java.lang.String statName) |
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.
|
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 |
himherself() |
Based on the apparent gender of the mob, return the appropriate word "himself", "herself", or "itself".
|
java.lang.String |
hisher() |
Based on the apparent gender of the mob, return the appropriate word "his", "her", or "its".
|
java.lang.String |
hisherself() |
Based on the apparent gender of the mob, return the appropriate word "hisself", "herself", or "itself".
|
boolean |
isLevelCapped(CharClass C) |
Returns true if this user is capped by the given
classes level cap (if one exists)
|
java.lang.String |
manwoman() |
Based on the apparent gender of the mob, return the appropriate word "Man", "Woman", or "Man".
|
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.
|
java.lang.String |
realGenderName() |
Returns the gender of the mob.
|
char |
reproductiveCode() |
Based on the gender of the mob, returns M, N, or F, reflective
of reproductive role.
|
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".
|
java.lang.String |
sondaughter() |
Based on the apparent gender of the mob, return the appropriate word "Son", "Daughter", or "Child".
|
copyOf, ID, initializeClass, name, newInstance
deityName, getMyDeity, getWorshipCharID, setDeityName, setWorshipCharID
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
static final int VALUE_ALLSTATS_DEFAULT
static final int STAT_STRENGTH
static final int STAT_INTELLIGENCE
static final int STAT_DEXTERITY
static final int STAT_CONSTITUTION
static final int STAT_CHARISMA
static final int STAT_WISDOM
static final int STAT_GENDER
static final int STAT_SAVE_PARALYSIS
static final int STAT_SAVE_FIRE
static final int STAT_SAVE_COLD
static final int STAT_SAVE_WATER
static final int STAT_SAVE_GAS
static final int STAT_SAVE_MIND
static final int STAT_SAVE_GENERAL
static final int STAT_SAVE_JUSTICE
static final int STAT_SAVE_ACID
static final int STAT_SAVE_ELECTRIC
static final int STAT_SAVE_POISON
static final int STAT_SAVE_UNDEAD
static final int STAT_SAVE_MAGIC
static final int STAT_SAVE_DISEASE
static final int STAT_SAVE_TRAPS
static final int STAT_MAX_STRENGTH_ADJ
static final int STAT_MAX_INTELLIGENCE_ADJ
static final int STAT_MAX_DEXTERITY_ADJ
static final int STAT_MAX_CONSTITUTION_ADJ
static final int STAT_MAX_CHARISMA_ADJ
static final int STAT_MAX_WISDOM_ADJ
static final int STAT_AGE
static final int STAT_SAVE_DETECTION
static final int STAT_SAVE_OVERLOOKING
static final int STAT_SAVE_DOUBT
static final int STAT_WEIGHTADJ
static final int STAT_SAVE_BLUNT
static final int STAT_SAVE_PIERCE
static final int STAT_SAVE_SLASH
static final int STAT_SAVE_SPELLS
static final int STAT_SAVE_PRAYERS
static final int STAT_SAVE_SONGS
static final int STAT_SAVE_CHANTS
static final int STAT_CRIT_CHANCE_PCT_WEAPON
static final int STAT_CRIT_CHANCE_PCT_MAGIC
static final int STAT_CRIT_DAMAGE_PCT_WEAPON
static final int STAT_CRIT_DAMAGE_PCT_MAGIC
static final int STAT_FAITH
static final int STAT_RECOVERRATE5_ADJ
static final int STAT_XP_ADJ_PCT
static final int DEFAULT_NUM_STATS
static final java.lang.String[] DEFAULT_STAT_ABBR
static final java.lang.String[] DEFAULT_STAT_DESCS
static final java.lang.String[] DEFAULT_STAT_NAMES
static final java.lang.String[] DEFAULT_STAT_DESC_ATTS
static final int[] DEFAULT_STAT_MSG_MAP
void copyInto(CharStats intoStats)
intoStats
- another CharStats object.int getStat(int statNum)
statNum
- which STAT_ constant to get a value forCharStats
int getMaxStat(int abilityCode)
abilityCode
- (str, int, etc)void setStat(int statNum, int value)
statNum
- which STAT_ constant to get a value forvalue
- the value of the given STATCharStats
void adjStat(int statNum, int value)
statNum
- which STAT_ constant to adjustvalue
- the amount + or -, to adjust byCharStats
void setPermanentStat(int statNum, int value)
statNum
- which STAT_ constant to get a value forvalue
- the value of the given STATCharStats
void setRacialStat(int statNum, int value)
statNum
- which STAT_ constant to get an approx value forvalue
- the value of the max, and approxvalue of the given STATCharStats
int getRacialStat(MOB mob, int statNum)
mob
- the mob to get adjustments forstatNum
- which STAT_ constant to getCharStats
int getStatCode(java.lang.String statName)
statName
- name of which constant to determine the STAT_ constant forCharStats
int getSave(int which)
which
- which STAT_SAVE_ constant from CharStats interface to useCharStats
java.lang.String getNonBaseStatsAsString()
void setNonBaseStatsFromString(java.lang.String str)
str
- semicolon stringint getBodyPart(int racialPartNumber)
racialPartNumber
- the BODY_ constant from Race interfaceRace
void alterBodypart(int racialPartNumber, int number)
racialPartNumber
- the BODY_ constant from Race interfacenumber
- the amount to change by, positive or negativeRace
int getBodypartAlteration(int racialPartNumber)
racialPartNumber
- the BODY_ constant from Race interfaceRace
java.lang.String getBodyPartsAsString()
void setBodyPartsFromStringAfterRace(java.lang.String str)
str
- the string list representing the body part situationint numClasses()
CharClass getMyClass(int i)
i
- the index into the charclass list.CharClass
CharClass getCurrentClass()
numClasses()
,
getCharClasses()
,
CharClass
java.util.Collection<CharClass> getCharClasses()
numClasses()
,
CharClass
int getCurrentClassLevel()
numClasses()
void setMyClasses(java.lang.String classes)
classes
- the semicolon list of character class namesvoid setMyLevels(java.lang.String levels)
levels
- the semicolon list of levelsjava.lang.String getMyClassesStr()
java.lang.String getMyLevelsStr()
void setCurrentClass(CharClass aClass)
aClass
- The charclass object to set the current class togetCurrentClass()
,
CharClass
void setCurrentClassLevel(int level)
level
- The chararacter class level to set the current class toint getClassLevel(CharClass aClass)
aClass
- the CharClass object to checkCharClass
int getClassLevel(java.lang.String aClass)
aClass
- the name of the Character Class to checkCharClass
int combinedSubLevels()
boolean isLevelCapped(CharClass C)
C
- the class to checkCharClass.getLevelCap()
void setClassLevel(CharClass aClass, int level)
aClass
- the character class to set a level forlevel
- the level to set for the given character classsetCurrentClass(CharClass)
,
CharClass
void setMyRace(Race newVal)
newVal
- the Race of the mobRace.startRacing(MOB, boolean)
,
Race
java.lang.String raceName()
Race
,
setRaceName(String)
java.lang.String getArriveStr()
Race
,
setArriveLeaveStr(String,String)
java.lang.String getLeaveStr()
Race
,
setArriveLeaveStr(String,String)
int[] getBreathables()
RawMaterial
,
setBreathables(int[])
void setBreathables(int[] newArray)
newArray
- a list of resource codes that this race can breatheRawMaterial
,
getBreathables()
void setRaceName(java.lang.String newRaceName)
newRaceName
- the name of the mobs apparent raceRace
,
raceName()
void setArriveLeaveStr(java.lang.String arriveStr, java.lang.String leaveStr)
arriveStr
- the arrive stringleaveStr
- the leave stringRace
,
getArriveStr()
,
getLeaveStr()
void setDisplayClassName(java.lang.String newname)
newname
- the name of the mobs apparent current classCharClass
,
displayClassName()
,
displayClassLevel(MOB, boolean)
,
displayClassLevelOnly(MOB)
void setDisplayClassLevel(java.lang.String newlevel)
newlevel
- the name of the mobs apparent levelCharClass
,
displayClassName()
,
displayClassLevel(MOB, boolean)
,
displayClassLevelOnly(MOB)
,
setDisplayClassName(String)
java.lang.String displayClassName()
CharClass
,
setDisplayClassName(String)
,
displayClassLevel(MOB, boolean)
,
displayClassLevelOnly(MOB)
java.lang.String displayClassLevel(MOB mob, boolean shortForm)
mob
- the mob whose class and overall level to displayshortForm
- if true, display only the class and level, no extra wordingCharClass
,
displayClassName()
,
setDisplayClassName(String)
,
displayClassLevelOnly(MOB)
java.lang.String displayClassLevelOnly(MOB mob)
mob
- the mob whose class and overall level to displayCharClass
,
displayClassName()
,
setDisplayClassName(String)
,
displayClassLevel(MOB, boolean)
void setAllValues(int def)
def
- the value to set all stats to.void reset()
void setAllBaseValues(int def)
def
- the value to set all stats to.long getWearableRestrictionsBitmap()
Item
void setWearableRestrictionsBitmap(long bitmap)
bitmap
- a bitmap of unwearable locationsItem
void setGenderName(java.lang.String gname)
gname
- the name of the mobs gender to displaygenderName()
,
realGenderName()
java.lang.String genderName()
setGenderName(String)
java.lang.String realGenderName()
setGenderName(String)
char reproductiveCode()
java.lang.String himher()
java.lang.String hisher()
java.lang.String himherself()
java.lang.String hisherself()
java.lang.String heshe()
java.lang.String HeShe()
java.lang.String sirmadam()
java.lang.String SirMadam()
java.lang.String manwoman()
java.lang.String sondaughter()
java.lang.String boygirl()
java.lang.String MrMs()
java.lang.String MisterMadam()
int ageCategory()
Race
java.lang.String ageName()
Race.AGE_DESCS
int getAbilityAdjustment(java.lang.String ableID)
ableID
- the ability ID, with an appropriate prefixvoid adjustAbilityAdjustment(java.lang.String ableID, int newValue)
ableID
- the ability ID, with an appropriate prefixnewValue
- the numeric value associated with the adjustment.DoubleFilterer<Item>[] getItemProficiencies()
setItemProficiencies(DoubleFilterer[])
void setItemProficiencies(DoubleFilterer<Item>[] newArray)
newArray
- a list of proficiency or deficiency codesgetItemProficiencies()
,
addItemDeficiency(String)
,
addItemProficiency(String)
void addItemProficiency(java.lang.String zapperMask)
zapperMask
- the zapper maskgetItemProficiencies()
,
addItemDeficiency(String)
,
MaskingLibrary
void addItemDeficiency(java.lang.String zapperMask)
zapperMask
- the zapper maskgetItemProficiencies()
,
addItemProficiency(String)
,
MaskingLibrary