|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultCharStats
public class DefaultCharStats
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.CharStats |
|---|
CharStats.CODES |
| Field Summary | |
|---|---|
protected java.lang.String |
arriveStr
|
protected short[] |
bodyAlterations
|
protected int[] |
breathables
|
protected java.lang.String |
displayClassLevel
|
protected java.lang.String |
displayClassName
|
protected java.lang.String |
genderName
|
protected java.lang.String |
leaveStr
|
protected CharClass[] |
myClasses
|
protected java.lang.Integer[] |
myLevels
|
protected Race |
myRace
|
protected java.util.Map<java.lang.String,java.lang.Integer> |
profAdj
|
protected DoubleFilterer<Item>[] |
proficiencies
|
protected java.lang.String |
raceName
|
protected short[] |
stats
|
protected long |
unwearableBitmap
|
| Constructor Summary | |
|---|---|
DefaultCharStats()
|
|
| 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 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 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 |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
int |
getStat(int abilityCode)
Get the value of one of the STAT_ constants, representing attributes, saving throws, and max attributes, from the CharStats interface. |
java.lang.String |
getStat(java.lang.String abilityName)
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. |
java.lang.String[] |
getStatCodes()
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders. |
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". |
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) |
boolean |
isStat(java.lang.String code)
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. |
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.". |
java.lang.String |
name()
The displayable name of this object. |
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 |
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 abilityCode,
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 abilityCode,
int racialMax)
Set one of the basic attributes to approx the value. |
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 |
setStat(java.lang.String code,
java.lang.String val)
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. |
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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected short[] stats
protected CharClass[] myClasses
protected java.lang.Integer[] myLevels
protected Race myRace
protected java.lang.String raceName
protected java.lang.String genderName
protected java.lang.String displayClassName
protected java.lang.String displayClassLevel
protected short[] bodyAlterations
protected long unwearableBitmap
protected int[] breathables
protected java.lang.String arriveStr
protected java.lang.String leaveStr
protected java.util.Map<java.lang.String,java.lang.Integer> profAdj
protected DoubleFilterer<Item>[] proficiencies
| Constructor Detail |
|---|
public DefaultCharStats()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String name()
CMObject
name in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic void setAllBaseValues(int def)
CharStats
setAllBaseValues in interface CharStatsdef - the value to set all stats to.public void setAllValues(int def)
CharStats
setAllValues in interface CharStatsdef - the value to set all stats to.public void reset()
CharStats
reset in interface CharStatspublic void copyInto(CharStats intoStats)
CharStats
copyInto in interface CharStatsintoStats - another CharStats object.public void setMyClasses(java.lang.String classes)
CharStats
setMyClasses in interface CharStatsclasses - the semicolon list of character class namespublic void setMyLevels(java.lang.String levels)
CharStats
setMyLevels in interface CharStatslevels - the semicolon list of levelspublic java.lang.String getMyClassesStr()
CharStats
getMyClassesStr in interface CharStatspublic java.lang.String getMyLevelsStr()
CharStats
getMyLevelsStr in interface CharStatspublic java.lang.String getArriveStr()
CharStats
getArriveStr in interface CharStatsRace,
CharStats.setArriveLeaveStr(String,String)public java.lang.String getLeaveStr()
CharStats
getLeaveStr in interface CharStatsRace,
CharStats.setArriveLeaveStr(String,String)
public void setArriveLeaveStr(java.lang.String arriveStr,
java.lang.String leaveStr)
CharStats
setArriveLeaveStr in interface CharStatsarriveStr - the arrive stringleaveStr - the leave stringRace,
CharStats.getArriveStr(),
CharStats.getLeaveStr()public long getWearableRestrictionsBitmap()
CharStats
getWearableRestrictionsBitmap in interface CharStatsItempublic void setWearableRestrictionsBitmap(long bitmap)
CharStats
setWearableRestrictionsBitmap in interface CharStatsbitmap - a bitmap of unwearable locationsItempublic int numClasses()
CharStats
numClasses in interface CharStatspublic int combinedSubLevels()
CharStats
combinedSubLevels in interface CharStatspublic int combinedLevels()
public void setDisplayClassName(java.lang.String newName)
CharStats
setDisplayClassName in interface CharStatsnewName - the name of the mobs apparent current classCharClass,
CharStats.displayClassName(),
CharStats.displayClassLevel(MOB, boolean),
CharStats.displayClassLevelOnly(MOB)public java.lang.String displayClassName()
CharStats
displayClassName in interface CharStatsCharClass,
CharStats.setDisplayClassName(String),
CharStats.displayClassLevel(MOB, boolean),
CharStats.displayClassLevelOnly(MOB)public void setDisplayClassLevel(java.lang.String newLevel)
CharStats
setDisplayClassLevel in interface CharStatsnewLevel - the name of the mobs apparent levelCharClass,
CharStats.displayClassName(),
CharStats.displayClassLevel(MOB, boolean),
CharStats.displayClassLevelOnly(MOB),
CharStats.setDisplayClassName(String)
public java.lang.String displayClassLevel(MOB mob,
boolean shortForm)
CharStats
displayClassLevel in interface CharStatsmob - the mob whose class and overall level to displayshortForm - if true, display only the class and level, no extra wording
CharClass,
CharStats.displayClassName(),
CharStats.setDisplayClassName(String),
CharStats.displayClassLevelOnly(MOB)public java.lang.String displayClassLevelOnly(MOB mob)
CharStats
displayClassLevelOnly in interface CharStatsmob - the mob whose class and overall level to display
CharClass,
CharStats.displayClassName(),
CharStats.setDisplayClassName(String),
CharStats.displayClassLevel(MOB, boolean)public java.lang.String getNonBaseStatsAsString()
CharStats
getNonBaseStatsAsString in interface CharStatspublic void setNonBaseStatsFromString(java.lang.String str)
CharStats
setNonBaseStatsFromString in interface CharStatsstr - semicolon stringpublic void setRaceName(java.lang.String newRaceName)
CharStats
setRaceName in interface CharStatsnewRaceName - the name of the mobs apparent raceRace,
CharStats.raceName()public java.lang.String raceName()
CharStats
raceName in interface CharStatsRace,
CharStats.setRaceName(String)public CharClass getMyClass(int i)
CharStats
getMyClass in interface CharStatsi - the index into the charclass list.
CharClasspublic int getClassLevel(java.lang.String aClass)
CharStats
getClassLevel in interface CharStatsaClass - the name of the Character Class to check
CharClasspublic int getClassLevel(CharClass aClass)
CharStats
getClassLevel in interface CharStatsaClass - the CharClass object to check
CharClass
public void setClassLevel(CharClass aClass,
int level)
CharStats
setClassLevel in interface CharStatsaClass - the character class to set a level forlevel - the level to set for the given character classCharStats.setCurrentClass(CharClass),
CharClasspublic boolean isLevelCapped(CharClass C)
CharStats
isLevelCapped in interface CharStatsC - the class to check
CharClass.getLevelCap()public void setCurrentClassLevel(int level)
CharStats
setCurrentClassLevel in interface CharStatslevel - The chararacter class level to set the current class topublic void setCurrentClass(CharClass aClass)
CharStats
setCurrentClass in interface CharStatsaClass - The charclass object to set the current class toCharStats.getCurrentClass(),
CharClasspublic CharClass getCurrentClass()
CharStats
getCurrentClass in interface CharStatsCharStats.numClasses(),
CharStats.getCharClasses(),
CharClasspublic java.util.Collection<CharClass> getCharClasses()
CharStats
getCharClasses in interface CharStatsCharStats.numClasses(),
CharClasspublic int getCurrentClassLevel()
CharStats
getCurrentClassLevel in interface CharStatsCharStats.numClasses()public Race getMyRace()
CharStats
getMyRace in interface CharStatsRacepublic void setMyRace(Race newVal)
CharStats
setMyRace in interface CharStatsnewVal - the Race of the mobRace.startRacing(MOB, boolean),
Racepublic int[] getBreathables()
CharStats
getBreathables in interface CharStatsRawMaterial,
CharStats.setBreathables(int[])public void setBreathables(int[] newArray)
CharStats
setBreathables in interface CharStatsnewArray - a list of resource codes that this race can breatheRawMaterial,
CharStats.getBreathables()public int getBodyPart(int racialPartNumber)
CharStats
getBodyPart in interface CharStatsracialPartNumber - the BODY_ constant from Race interface
Racepublic java.lang.String getBodyPartsAsString()
CharStats
getBodyPartsAsString in interface CharStatspublic void setBodyPartsFromStringAfterRace(java.lang.String str)
CharStats
setBodyPartsFromStringAfterRace in interface CharStatsstr - the string list representing the body part situationpublic int getBodypartAlteration(int racialPartNumber)
CharStats
getBodypartAlteration in interface CharStatsracialPartNumber - the BODY_ constant from Race interface
Race
public void alterBodypart(int racialPartNumber,
int deviation)
CharStats
alterBodypart in interface CharStatsracialPartNumber - the BODY_ constant from Race interfacedeviation - the amount to change by, positive or negativeRacepublic int ageCategory()
CharStats
ageCategory in interface CharStatsRacepublic java.lang.String ageName()
CharStats
ageName in interface CharStatsRace.AGE_DESCSpublic int getSave(int which)
CharStats
getSave in interface CharStatswhich - which STAT_SAVE_ constant from CharStats interface to use
CharStatspublic CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic int getAbilityAdjustment(java.lang.String ableID)
CharStats
getAbilityAdjustment in interface CharStatsableID - the ability ID, with an appropriate prefix
public void adjustAbilityAdjustment(java.lang.String ableID,
int newValue)
CharStats
adjustAbilityAdjustment in interface CharStatsableID - the ability ID, with an appropriate prefixnewValue - the numeric value associated with the adjustment.public void setGenderName(java.lang.String gname)
CharStats
setGenderName in interface CharStatsgname - the name of the mobs gender to displayCharStats.genderName()public java.lang.String genderName()
CharStats
genderName in interface CharStatsCharStats.setGenderName(String)public java.lang.String himher()
CharStats
himher in interface CharStatspublic java.lang.String hisher()
CharStats
hisher in interface CharStatspublic java.lang.String heshe()
CharStats
heshe in interface CharStatspublic java.lang.String sirmadam()
CharStats
sirmadam in interface CharStatspublic java.lang.String SirMadam()
CharStats
SirMadam in interface CharStatspublic java.lang.String MrMs()
CharStats
MrMs in interface CharStatspublic java.lang.String MisterMadam()
CharStats
MisterMadam in interface CharStatspublic java.lang.String HeShe()
CharStats
HeShe in interface CharStatspublic int getStat(int abilityCode)
CharStats
getStat in interface CharStatsabilityCode - which STAT_ constant to get a value for
CharStats
public void setPermanentStat(int abilityCode,
int value)
CharStats
setPermanentStat in interface CharStatsabilityCode - which STAT_ constant to get a value forvalue - the value of the given STATCharStatspublic int getMaxStat(int abilityCode)
CharStats
getMaxStat in interface CharStatsabilityCode - (str, int, etc)
public int getRacialStat(MOB mob,
int statNum)
CharStats
getRacialStat in interface CharStatsmob - the mob to get adjustments forstatNum - which STAT_ constant to get
CharStats
public void setRacialStat(int abilityCode,
int racialMax)
CharStats
setRacialStat in interface CharStatsabilityCode - which STAT_ constant to get an approx value forracialMax - the value of the max, and approxvalue of the given STATCharStats
public void setStat(int abilityCode,
int value)
CharStats
setStat in interface CharStatsabilityCode - which STAT_ constant to get a value forvalue - the value of the given STATCharStats
public void adjStat(int statNum,
int value)
CharStats
adjStat in interface CharStatsstatNum - which STAT_ constant to adjustvalue - the amount + or -, to adjust byCharStatspublic int getCode(java.lang.String abilityName)
CharStats
getCode in interface CharStatsabilityName - name of which constant to determine the STAT_ constant for
CharStatspublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public int getSaveStatIndex()
Modifiable
getSaveStatIndex in interface ModifiableModifiable.getStatCodes(),
Modifiable.getStat(String),
Modifiable.setStat(String, String)public java.lang.String getStat(java.lang.String abilityName)
Modifiable
getStat in interface ModifiableabilityName - the name of the field to read.
Modifiable.getStatCodes()public java.lang.String[] getStatCodes()
Modifiable
getStatCodes in interface ModifiableModifiable.getStat(String),
Modifiable.setStat(String, String)public boolean isStat(java.lang.String code)
Modifiable
isStat in interface Modifiablecode - the name of the field to read.
Modifiable.getStatCodes()
public void setStat(java.lang.String code,
java.lang.String val)
Modifiable
setStat in interface Modifiablecode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()public DoubleFilterer<Item>[] getItemProficiencies()
CharStats
getItemProficiencies in interface CharStatsCharStats.setItemProficiencies(DoubleFilterer[])public void setItemProficiencies(DoubleFilterer<Item>[] newArray)
CharStats
setItemProficiencies in interface CharStatsnewArray - a list of proficiency or deficiency codesCharStats.getItemProficiencies(),
CharStats.addItemDeficiency(String),
CharStats.addItemProficiency(String)public void addItemProficiency(java.lang.String zapperMask)
CharStats
addItemProficiency in interface CharStatszapperMask - the zapper maskCharStats.getItemProficiencies(),
CharStats.addItemDeficiency(String),
MaskingLibrarypublic void addItemDeficiency(java.lang.String zapperMask)
CharStats
addItemDeficiency in interface CharStatszapperMask - the zapper maskCharStats.getItemProficiencies(),
CharStats.addItemProficiency(String),
MaskingLibrary
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||