|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Races.StdRace
public class StdRace
| Field Summary | |
|---|---|
protected static java.lang.String[] |
CODES
|
protected static java.util.Vector |
empty
|
protected boolean |
mappedCulturalAbilities
|
protected Weapon |
naturalWeapon
|
protected java.util.Vector |
naturalWeaponChoices
|
protected java.util.Vector |
outfitChoices
|
protected java.util.Hashtable |
racialAbilityMap
|
protected java.util.Hashtable |
racialEffectMap
|
| Fields inherited from interface com.planet_ink.coffee_mud.Races.interfaces.Race |
|---|
AGE_ANCIENT, AGE_CHILD, AGE_DESCS, AGE_INFANT, AGE_MATURE, AGE_MIDDLEAGED, AGE_OLD, AGE_TODDLER, AGE_VENERABLE, AGE_YOUNGADULT, BODY_ANTENEA, BODY_ARM, BODY_EAR, BODY_EYE, BODY_FOOT, BODY_GILL, BODY_HAND, BODY_HEAD, BODY_LEG, BODY_MOUTH, BODY_NECK, BODY_NOSE, BODY_PARTS, BODY_TAIL, BODY_TORSO, BODY_WAIST, BODY_WEARGRID, BODY_WEARVECTOR, BODY_WING, BODYPARTHASH, BODYPARTSTR, GENFLAG_DESCS, GENFLAG_NOCHARM, GENFLAG_NOCLASS, GENFLAG_NOEXP, GENFLAG_NOFERTILE, GENFLAG_NOLEVELS |
| Constructor Summary | |
|---|---|
StdRace()
|
|
| Method Summary | |
|---|---|
int |
adjustExperienceGain(MOB host,
MOB mob,
MOB victim,
int amount)
Whenever a player or mob of this race gains experience, this method gets a chance to modify the amount before the gain actually occurs. |
void |
affectCharState(MOB affectedMob,
CharState affectableMaxState)
This method is called by the recoverCharState() method on other MOB objects. |
void |
affectCharStats(MOB affectedMob,
CharStats charStats)
This method is called by the recoverCharStats() method on other MOB objects. |
void |
affectEnvStats(Environmental affected,
EnvStats affectableStats)
This method is called by the recoverEnvStats() method on other Environmental objects. |
void |
agingAffects(MOB mob,
CharStats baseStats,
CharStats charStats)
Apply any affects of the given mob at the given age to the given base and/or current char stats. |
java.lang.String |
arriveStr()
Returns the string describing what folks see when a member of this race enters a room. |
int |
availabilityCode()
Returns one or a combination of the Area.THEME_* constants from the Area interface. |
int[] |
bodyMask()
Returns an array indexed by body part codes as defined by the BODY_* constants in the Race interface. |
boolean |
classless()
Whether this race can be associated with a character class. |
int |
compareTo(CMObject o)
|
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
DVector |
culturalAbilities()
Return a vector of skills, spells, and other ability ids granted to the given mob when they are created as this race. |
protected java.lang.String[] |
culturalAbilityNames()
|
protected int[] |
culturalAbilityProficiencies()
|
protected boolean |
destroyBodyAfterUse()
|
void |
executeMsg(Environmental myHost,
CMMsg msg)
The general message event handler for the object. |
boolean |
expless()
Whether players of this race can gain or lose experience points. |
boolean |
fertile()
Whether this race, generally speaking, can procreate. |
long |
forbiddenWornBits()
A bitmap showing which on locations a member of this race can not wear clothing, even if the members have one or more of the required limbs. |
protected Weapon |
funHumanoidWeapon()
|
int[] |
getAgingChart()
Returns an integer array equal in size and index to the Race.AGE_* constants in the Race interface. |
protected int |
getCodeNum(java.lang.String code)
|
DeadBody |
getCorpseContainer(MOB mob,
Room room)
Returns the corpse of a member of this race, populates it with the equipment of the given mob, and places it in the given room. |
int |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
java.lang.String |
getStat(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[] |
getStatCodes()
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders. |
long |
getTickStatus()
A coded status for this object during the period where its tick method is being called. |
Race |
healthBuddy()
|
java.lang.String |
healthText(MOB viewer,
MOB mob)
Returns a description of the given mobs description, by consulting the mobs curState().getHitPoints method. |
int |
heightVariance()
The amount from 0-this to add to the minimum height to achieve a random height. |
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 |
isGeneric()
Whether this race object represents a Generic Race, or one which is modifiable by builders at run-time. |
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 |
leaveStr()
Returns the string describing what folks see when a member of this race leaves a room. |
void |
level(MOB mob,
java.util.Vector gainedAbilityIDs)
This method is called whenever a player gains a level while a member of this race. |
boolean |
leveless()
Whether players of this race can be associated with an experience level. |
int |
lightestWeight()
The lightest weight for a member of this race |
Race |
makeGenRace()
Converts this race to a generic race (if it isn't already) and returns it. |
protected Item |
makeResource(java.lang.String name,
int type)
|
Race |
mixRace(Race race,
java.lang.String newRaceID,
java.lang.String newRaceName)
Converts this race to a generic race (if it isn't already) and mixes its attributes with the race passed it. |
Weapon |
myNaturalWeapon()
Returns a Weapon object representing what a member of this race fights with when unarmed. |
java.util.Vector |
myResources()
Returns a Vector of RawMaterial objects (usually GenFoodResource, GenLiquidResource, or GenResource items) representing what is left over of a member of this race after they've been butchered and cut up. |
java.lang.String |
name()
The nice displayable name of this instance of this object |
CMObject |
newInstance()
Returns a new instance of this class. |
boolean |
okMessage(Environmental myHost,
CMMsg msg)
The general message event previewer for the object. |
java.util.Vector |
outfit(MOB myChar)
Returns a vector of Item objects representing the standard clothing, weapons, or other objects commonly given to players of this race just starting out. |
protected int |
practicesAtFirstLevel()
|
java.util.Vector |
racialAbilities(MOB mob)
Return a vector of skills, spells, and other abilities granted to the given mob of the given mobs level. |
protected int[] |
racialAbilityLevels()
|
protected java.lang.String[] |
racialAbilityNames()
|
protected int[] |
racialAbilityProficiencies()
|
protected boolean[] |
racialAbilityQuals()
|
java.lang.String |
racialCategory()
Which racial category this race falls in. |
protected int[] |
racialEffectLevels()
|
protected java.lang.String[] |
racialEffectNames()
|
protected java.lang.String[] |
racialEffectParms()
|
java.util.Vector |
racialEffects(MOB mob)
Return a vector of skills, spells, and other abilities granted to the given mob of the given mobs level. |
java.lang.String |
racialParms()
If this race is modifiable at run time, this method will return an xml document describing the several attributes of this race. |
boolean |
sameAs(Race E)
|
void |
setHeightWeight(EnvStats stats,
char gender)
Will initialize a player or mobs height and weight based on this races parameters. |
void |
setRacialParms(java.lang.String parms)
If this race is modifiable at run time, this method will use the given xml document describing the several attributes of this race to populate this races fields and attributes. |
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. |
int |
shortestFemale()
The minimum height of females of this race. |
int |
shortestMale()
The minimum height of males of this race. |
void |
startRacing(MOB mob,
boolean verifyOnly)
After a mob is set or changed to a new race, this method should be called to finalize or initialize any settings from this race. |
boolean |
tick(Tickable myChar,
int tickID)
this is the method which is called periodically by the threading engine. |
protected int |
trainsAtFirstLevel()
|
protected boolean |
uncharmable()
|
int |
weightVariance()
The amount from 0-this to add to the minumum weight to achieve a random weight. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.Vector empty
protected Weapon naturalWeapon
protected java.util.Vector naturalWeaponChoices
protected java.util.Vector outfitChoices
protected java.util.Hashtable racialEffectMap
protected java.util.Hashtable racialAbilityMap
protected boolean mappedCulturalAbilities
protected static java.lang.String[] CODES
| Constructor Detail |
|---|
public StdRace()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String name()
Tickable
name in interface Tickablename in interface Raceprotected int practicesAtFirstLevel()
protected int trainsAtFirstLevel()
public int shortestMale()
Race
shortestMale in interface Racepublic int shortestFemale()
Race
shortestFemale in interface Racepublic int heightVariance()
Race
heightVariance in interface Racepublic int lightestWeight()
Race
lightestWeight in interface Racepublic int weightVariance()
Race
weightVariance in interface Racepublic long forbiddenWornBits()
Race
forbiddenWornBits in interface RaceItempublic java.lang.String racialCategory()
Race
racialCategory in interface Racepublic boolean isGeneric()
Race
isGeneric in interface Racepublic boolean classless()
Race
classless in interface RaceCharClasspublic boolean leveless()
Race
leveless in interface Racepublic boolean expless()
Race
expless in interface Racepublic int[] bodyMask()
Race
bodyMask in interface Racepublic CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic int[] getAgingChart()
Race
getAgingChart in interface RaceRaceprotected java.lang.String[] racialEffectNames()
protected int[] racialEffectLevels()
protected java.lang.String[] racialEffectParms()
protected java.lang.String[] racialAbilityNames()
protected int[] racialAbilityLevels()
protected int[] racialAbilityProficiencies()
protected boolean[] racialAbilityQuals()
protected java.lang.String[] culturalAbilityNames()
protected int[] culturalAbilityProficiencies()
protected boolean uncharmable()
protected boolean destroyBodyAfterUse()
public int availabilityCode()
Race
availabilityCode in interface RaceAreapublic boolean fertile()
Race
fertile in interface Racepublic CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic Race healthBuddy()
public void affectEnvStats(Environmental affected,
EnvStats affectableStats)
StatsAffecting
affectEnvStats in interface StatsAffectingaffected - the host of the EnvStats object being affectedaffectableStats - the particular EnvStats object being affectedEnvStats,
Environmental,
Environmental.baseEnvStats(),
Environmental.envStats(),
Environmental.recoverEnvStats()
public void affectCharStats(MOB affectedMob,
CharStats charStats)
StatsAffecting
affectCharStats in interface StatsAffectingaffectedMob - the host of the CharStats object being affectedcharStats - the particular CharStats object being affectedCharStats,
MOB,
MOB.baseCharStats(),
MOB.charStats(),
MOB.recoverCharStats()
public void agingAffects(MOB mob,
CharStats baseStats,
CharStats charStats)
Race
agingAffects in interface Racemob - the mob to apply changes tobaseStats - permanent charstats changescharStats - temporary charstats changesCharState
public void affectCharState(MOB affectedMob,
CharState affectableMaxState)
StatsAffecting
affectCharState in interface StatsAffectingaffectedMob - the host of the CharState object being affectedaffectableMaxState - the particular CharState object being affectedCharState,
MOB,
MOB.baseState(),
MOB.curState(),
MOB.recoverMaxState()
public boolean okMessage(Environmental myHost,
CMMsg msg)
MsgListener
okMessage in interface MsgListenermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that wants to be executed
CMMsg,
CMMsg.source()
public void executeMsg(Environmental myHost,
CMMsg msg)
MsgListener
executeMsg in interface MsgListenermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that needs to be executedCMMsgpublic java.lang.String arriveStr()
Race
arriveStr in interface Racepublic java.lang.String leaveStr()
Race
leaveStr in interface Race
public void level(MOB mob,
java.util.Vector gainedAbilityIDs)
Race
level in interface Racemob - the mob to level upgainedAbilityIDs - the set of abilities/skill IDs gained during this leveling process
public int adjustExperienceGain(MOB host,
MOB mob,
MOB victim,
int amount)
Race
adjustExperienceGain in interface Racehost - the player or mob whose race object this ismob - the player or mob gaining experiencevictim - if applicable, the mob or player who died to give the expamount - the amount of exp on track for gaining
public long getTickStatus()
Tickable
getTickStatus in interface TickableTickable.tick(Tickable, int)
public boolean tick(Tickable myChar,
int tickID)
Tickable
tick in interface TickablemyChar - a reference to this Tickable objecttickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Tickable,
ServiceEngine,
TickableGroup
public void startRacing(MOB mob,
boolean verifyOnly)
Race
startRacing in interface Racemob - the mob or player being set to this raceverifyOnly - true flag unless this is a new player characterpublic Weapon myNaturalWeapon()
Race
myNaturalWeapon in interface RaceWeaponpublic java.util.Vector outfit(MOB myChar)
Race
outfit in interface RacemyChar - one who will receive the objects
public java.lang.String healthText(MOB viewer,
MOB mob)
Race
healthText in interface Racemob - the mob whose health to check
MOB.curState(),
CharState.getHitPoints()protected Weapon funHumanoidWeapon()
public java.util.Vector myResources()
Race
myResources in interface RaceRawMaterial
public void setHeightWeight(EnvStats stats,
char gender)
Race
setHeightWeight in interface Racestats - the EnvStats object to changegender - the mobs gender 'M' or 'F'EnvStatspublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>
protected Item makeResource(java.lang.String name,
int type)
public DeadBody getCorpseContainer(MOB mob,
Room room)