com.planet_ink.coffee_mud.Races
Class GenRace

java.lang.Object
  extended by com.planet_ink.coffee_mud.Races.StdRace
      extended by com.planet_ink.coffee_mud.Races.GenRace
All Implemented Interfaces:
CMObject, Modifiable, MsgListener, StatsAffecting, Tickable, Race, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class GenRace
extends StdRace


Field Summary
protected  PhyStats adjPStats
           
protected  CharState adjState
           
protected  CharStats adjStats
           
 int[] agingChart
           
protected  java.lang.String arriveStr
           
 int availability
           
protected static java.lang.String[] CODES
           
protected  boolean[] culturalAbilityGains
           
protected  int[] culturalAbilityLvls
           
protected  java.lang.String[] culturalAbilityNames
           
protected  int[] culturalAbilityProfs
           
protected  boolean destroyBodyAfterUse
           
protected  int disableFlags
           
protected  Race eventBuddy
           
 long forbiddenWornBits
           
protected  Race healthBuddy
           
 int heightVariance
           
protected  java.lang.String helpEntry
           
protected  java.lang.String ID
           
 boolean isRideable
           
protected  java.lang.String leaveStr
           
 int lightestWeight
           
protected  java.lang.String name
           
protected  int[] parts
           
protected  int[] racialAbilityLevels
           
protected  java.lang.String[] racialAbilityNames
           
protected  java.lang.String[] racialAbilityParms
           
protected  int[] racialAbilityProfs
           
protected  boolean[] racialAbilityQuals
           
 java.lang.String racialCategory
           
protected  int[] racialEffectLevels
           
protected  java.lang.String[] racialEffectNames
           
protected  java.lang.String[] racialEffectParms
           
protected  java.util.List<RawMaterial> resourceChoices
           
protected  CharStats setStats
           
 int shortestFemale
           
 int shortestMale
           
protected  int[] sortedBreathables
           
protected  CharState startAdjState
           
protected  Race weaponBuddy
           
 int weightVariance
           
 int xpAdjustmentPct
           
protected  java.lang.String[] xtraValues
           
 
Fields inherited from class com.planet_ink.coffee_mud.Races.StdRace
abilitiesDesc, baseStatChgDesc, breatheAirArray, breatheAirWaterArray, breatheAnythingArray, breatheWaterArray, dispChgDesc, empty, emptyIDs, languagesDesc, mappedCulturalAbilities, naturalAbilImmunities, naturalWeapon, naturalWeaponChoices, outfitChoices, racialAbilityMap, racialEffectMap, sensesChgDesc, usageCount
 
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, BODYPARTHASH_RL_LOWER, BODYPARTSTR, GENFLAG_DESCS, GENFLAG_INFATIGUEABLE, GENFLAG_NOCHARM, GENFLAG_NOCLASS, GENFLAG_NOEXP, GENFLAG_NOFERTILE, GENFLAG_NOLEVELS, YEARS_AGE_LIVES_FOREVER
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Constructor Summary
GenRace()
           
 
Method Summary
 void affectCharState(MOB affectedMob, CharState affectableMaxState)
          This method is called by the recoverCharState() method on other MOB objects.
 void affectCharStats(MOB affectedMob, CharStats affectableStats)
          This method is called by the recoverCharStats() method on other MOB objects.
 void affectPhyStats(Physical affected, PhyStats affectableStats)
          This method is called by the recoverPhyStats() method on other Environmental objects.
 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.
 CMObject copyOf()
          Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.
protected  boolean[] culturalAbilityAutoGains()
           
protected  int[] culturalAbilityLevels()
           
 java.lang.String[] culturalAbilityNames()
           
 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()
           
 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.
 int[] getAgingChart()
          Returns an integer array equal in size and index to the Race.AGE_* constants in the Race interface.
 int[] getBreathables()
          Returns resource codes of what this race can breathe as an atmosphere.
protected  int getCodeNum(java.lang.String code)
           
protected  java.lang.String getRaceLocatorID(Race R)
           
 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.
 int getXPAdjustment()
          Returns the amount, as a positive or negative % to adjust all experience gains.
 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.
 boolean infatigueable()
           
 boolean isGeneric()
          Whether this race object represents a Generic Race, or one which is modifiable by builders at run-time.
 java.lang.String leaveStr()
          Returns the string describing what folks see when a member of this race leaves a room.
 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.
 Weapon myNaturalWeapon()
          Returns a Weapon object representing what a member of this race fights with when unarmed.
 java.util.List<RawMaterial> myResources()
          Returns a list 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()
          Return a nice, displayable name for this race
 CMObject newInstance()
          Returns a new instance of this class.
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
 int practicesAtFirstLevel()
           
protected  int[] racialAbilityLevels()
           
protected  java.lang.String[] racialAbilityNames()
           
 java.lang.String[] racialAbilityParms()
           
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.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 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 ticking, int tickID)
          this is the method which is called periodically by the threading engine.
 int trainsAtFirstLevel()
           
protected  boolean uncharmable()
           
 boolean useRideClass()
          Whether this race is usually rideable; helps determine the appropriate java class to use.
 int weightVariance()
          The amount from 0-this to add to the minumum weight to achieve a random weight.
 
Methods inherited from class com.planet_ink.coffee_mud.Races.StdRace
abilityImmunities, adjustExperienceGain, agingAffects, canBreedWith, clrStatChgDesc, compareTo, culturalAbilities, funHumanoidWeapon, getAbilitiesDesc, getCorpseContainer, getDispositionChgDesc, getLanguagesDesc, getPracAdjDesc, getSensesChgDesc, getStatAdjDesc, getTickStatus, getTrainAdjDesc, giveMobAbility, giveMobAbility, grantAbilities, grantAbilities, healthBuddy, initializeClass, isStat, L, level, makeMobName, makeResource, makeResource, makeStatChgDesc, mapCulturalAbilities, mixRace, numRacialEffects, outfit, racialAbilities, racialEffects, racialEffectsList, setHeightWeight, usageCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

protected java.lang.String ID

name

protected java.lang.String name

availability

public int availability

agingChart

public int[] agingChart

xtraValues

protected java.lang.String[] xtraValues

isRideable

public boolean isRideable

shortestMale

public int shortestMale

shortestFemale

public int shortestFemale

heightVariance

public int heightVariance

lightestWeight

public int lightestWeight

weightVariance

public int weightVariance

xpAdjustmentPct

public int xpAdjustmentPct

forbiddenWornBits

public long forbiddenWornBits

racialCategory

public java.lang.String racialCategory

disableFlags

protected int disableFlags

setStats

protected CharStats setStats

adjStats

protected CharStats adjStats

adjPStats

protected PhyStats adjPStats

adjState

protected CharState adjState

startAdjState

protected CharState startAdjState

resourceChoices

protected java.util.List<RawMaterial> resourceChoices

healthBuddy

protected Race healthBuddy

eventBuddy

protected Race eventBuddy

weaponBuddy

protected Race weaponBuddy

helpEntry

protected java.lang.String helpEntry

racialEffectNames

protected java.lang.String[] racialEffectNames

racialEffectLevels

protected int[] racialEffectLevels

racialEffectParms

protected java.lang.String[] racialEffectParms

racialAbilityNames

protected java.lang.String[] racialAbilityNames

racialAbilityLevels

protected int[] racialAbilityLevels

racialAbilityProfs

protected int[] racialAbilityProfs

racialAbilityQuals

protected boolean[] racialAbilityQuals

racialAbilityParms

protected java.lang.String[] racialAbilityParms

culturalAbilityNames

protected java.lang.String[] culturalAbilityNames

culturalAbilityProfs

protected int[] culturalAbilityProfs

culturalAbilityLvls

protected int[] culturalAbilityLvls

culturalAbilityGains

protected boolean[] culturalAbilityGains

sortedBreathables

protected int[] sortedBreathables

destroyBodyAfterUse

protected boolean destroyBodyAfterUse

arriveStr

protected java.lang.String arriveStr

leaveStr

protected java.lang.String leaveStr

parts

protected int[] parts

CODES

protected static java.lang.String[] CODES
Constructor Detail

GenRace

public GenRace()
Method Detail

ID

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

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

name

public java.lang.String name()
Description copied from interface: Race
Return a nice, displayable name for this race

Specified by:
name in interface CMObject
Specified by:
name in interface Tickable
Specified by:
name in interface Race
Overrides:
name in class StdRace
Returns:
the races name
See Also:
Environmental.Name()

practicesAtFirstLevel

public int practicesAtFirstLevel()
Overrides:
practicesAtFirstLevel in class StdRace

trainsAtFirstLevel

public int trainsAtFirstLevel()
Overrides:
trainsAtFirstLevel in class StdRace

forbiddenWornBits

public long forbiddenWornBits()
Description copied from interface: Race
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. The bitmap is made from Wearable.WORN_* constant values.

Specified by:
forbiddenWornBits in interface Race
Overrides:
forbiddenWornBits in class StdRace
Returns:
the illegal wear location bitmap
See Also:
Item

racialCategory

public java.lang.String racialCategory()
Description copied from interface: Race
Which racial category this race falls in.

Specified by:
racialCategory in interface Race
Overrides:
racialCategory in class StdRace
Returns:
racial category

isGeneric

public boolean isGeneric()
Description copied from interface: Race
Whether this race object represents a Generic Race, or one which is modifiable by builders at run-time.

Specified by:
isGeneric in interface Race
Overrides:
isGeneric in class StdRace
Returns:
whether this race is modifiable at run-time.

getXPAdjustment

public int getXPAdjustment()
Description copied from interface: Race
Returns the amount, as a positive or negative % to adjust all experience gains.

Specified by:
getXPAdjustment in interface Race
Overrides:
getXPAdjustment in class StdRace
Returns:
xp adjustment 0-100, or -1 - -100 to adjust experience gains by.

shortestFemale

public int shortestFemale()
Description copied from interface: Race
The minimum height of females of this race.

Specified by:
shortestFemale in interface Race
Overrides:
shortestFemale in class StdRace
Returns:
minimum height of females in inches

heightVariance

public int heightVariance()
Description copied from interface: Race
The amount from 0-this to add to the minimum height to achieve a random height.

Specified by:
heightVariance in interface Race
Overrides:
heightVariance in class StdRace
Returns:
a range of inches to add to the mimiumum height

lightestWeight

public int lightestWeight()
Description copied from interface: Race
The lightest weight for a member of this race

Specified by:
lightestWeight in interface Race
Overrides:
lightestWeight in class StdRace
Returns:
the lightest weight for something of this race

weightVariance

public int weightVariance()
Description copied from interface: Race
The amount from 0-this to add to the minumum weight to achieve a random weight.

Specified by:
weightVariance in interface Race
Overrides:
weightVariance in class StdRace
Returns:
a range of pounds to add to the minimum weight

shortestMale

public int shortestMale()
Description copied from interface: Race
The minimum height of males of this race.

Specified by:
shortestMale in interface Race
Overrides:
shortestMale in class StdRace
Returns:
minimum height of males in inches

classless

public boolean classless()
Description copied from interface: Race
Whether this race can be associated with a character class.

Specified by:
classless in interface Race
Overrides:
classless in class StdRace
Returns:
whether this race can have a class
See Also:
CharClass

leveless

public boolean leveless()
Description copied from interface: Race
Whether players of this race can be associated with an experience level.

Specified by:
leveless in interface Race
Overrides:
leveless in class StdRace
Returns:
whether players of this race can have a level

expless

public boolean expless()
Description copied from interface: Race
Whether players of this race can gain or lose experience points.

Specified by:
expless in interface Race
Overrides:
expless in class StdRace
Returns:
whether players of this race can gain or lose experience points

fertile

public boolean fertile()
Overrides:
fertile in class StdRace

infatigueable

public boolean infatigueable()
Overrides:
infatigueable in class StdRace

uncharmable

protected boolean uncharmable()
Overrides:
uncharmable in class StdRace

bodyMask

public int[] bodyMask()
Description copied from interface: Race
Returns an array indexed by body part codes as defined by the BODY_* constants in the Race interface. Each value is either -1 to show that the body part does not apply, 0 to show that the body part is not found on this race, and 1 or more to show how many of that part this race normally has.

Specified by:
bodyMask in interface Race
Overrides:
bodyMask in class StdRace
Returns:
an array of body parts

availabilityCode

public int availabilityCode()
Description copied from interface: Race
Returns one or a combination of the Area.THEME_* constants from the Area interface. This bitmap then describes the types of areas, skills, and classes which can interact. This bitmap is also used to to tell whether the race is available for selection by users at char creation time, whether they can change to this race via spells, or whether the race is utterly unavailable to them.

Specified by:
availabilityCode in interface Race
Overrides:
availabilityCode in class StdRace
Returns:
the availability/theme of this race
See Also:
Area

getAgingChart

public int[] getAgingChart()
Description copied from interface: Race
Returns an integer array equal in size and index to the Race.AGE_* constants in the Race interface. Each value in the index represents the first mudyear age of that age category.

Specified by:
getAgingChart in interface Race
Overrides:
getAgingChart in class StdRace
Returns:
an integer array mapping ages to age categories
See Also:
Race

racialEffectNames

protected java.lang.String[] racialEffectNames()
Overrides:
racialEffectNames in class StdRace

racialEffectLevels

protected int[] racialEffectLevels()
Overrides:
racialEffectLevels in class StdRace

racialEffectParms

protected java.lang.String[] racialEffectParms()
Overrides:
racialEffectParms in class StdRace

getBreathables

public int[] getBreathables()
Description copied from interface: Race
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.

Specified by:
getBreathables in interface Race
Overrides:
getBreathables in class StdRace
Returns:
a list of resource codes that this race can breathe
See Also:
RawMaterial

useRideClass

public boolean useRideClass()
Description copied from interface: Race
Whether this race is usually rideable; helps determine the appropriate java class to use.

Specified by:
useRideClass in interface Race
Overrides:
useRideClass in class StdRace
Returns:
whether this race is generally rideable

racialAbilityNames

protected java.lang.String[] racialAbilityNames()
Overrides:
racialAbilityNames in class StdRace

racialAbilityLevels

protected int[] racialAbilityLevels()
Overrides:
racialAbilityLevels in class StdRace

racialAbilityProficiencies

protected int[] racialAbilityProficiencies()
Overrides:
racialAbilityProficiencies in class StdRace

racialAbilityQuals

protected boolean[] racialAbilityQuals()
Overrides:
racialAbilityQuals in class StdRace

racialAbilityParms

public java.lang.String[] racialAbilityParms()
Overrides:
racialAbilityParms in class StdRace

culturalAbilityNames

public java.lang.String[] culturalAbilityNames()
Overrides:
culturalAbilityNames in class StdRace

culturalAbilityProficiencies

public int[] culturalAbilityProficiencies()
Overrides:
culturalAbilityProficiencies in class StdRace

culturalAbilityLevels

protected int[] culturalAbilityLevels()
Overrides:
culturalAbilityLevels in class StdRace

culturalAbilityAutoGains

protected boolean[] culturalAbilityAutoGains()
Overrides:
culturalAbilityAutoGains in class StdRace

destroyBodyAfterUse

protected boolean destroyBodyAfterUse()
Overrides:
destroyBodyAfterUse in class StdRace

newInstance

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

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

copyOf

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

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

myNaturalWeapon

public Weapon myNaturalWeapon()
Description copied from interface: Race
Returns a Weapon object representing what a member of this race fights with when unarmed. This method may change what it returns on every call to mix things up a bit.

Specified by:
myNaturalWeapon in interface Race
Overrides:
myNaturalWeapon in class StdRace
Returns:
a Weapon object representing claws or teeth, etc..
See Also:
Weapon

arriveStr

public java.lang.String arriveStr()
Description copied from interface: Race
Returns the string describing what folks see when a member of this race enters a room. Should give an idea of the gate or walking style of this race.

Specified by:
arriveStr in interface Race
Overrides:
arriveStr in class StdRace
Returns:
what people see what this race enters a room

leaveStr

public java.lang.String leaveStr()
Description copied from interface: Race
Returns the string describing what folks see when a member of this race leaves a room. Should give an idea of the gate or walking style of this race.

Specified by:
leaveStr in interface Race
Overrides:
leaveStr in class StdRace
Returns:
what people see what this race leaves a room

makeGenRace

public Race makeGenRace()
Description copied from interface: Race
Converts this race to a generic race (if it isn't already) and returns it. Returns itself if its already generic.

Specified by:
makeGenRace in interface Race
Overrides:
makeGenRace in class StdRace
Returns:
the generic race.

healthText

public java.lang.String healthText(MOB viewer,
                                   MOB mob)
Description copied from interface: Race
Returns a description of the given mobs description, by consulting the mobs curState().getHitPoints method.

Specified by:
healthText in interface Race
Overrides:
healthText in class StdRace
Parameters:
viewer - the mob observing the health of this one
mob - the mob whose health to check
Returns:
a string describing his health
See Also:
MOB.curState(), CharState.getHitPoints()

affectPhyStats

public void affectPhyStats(Physical affected,
                           PhyStats affectableStats)
Description copied from interface: StatsAffecting
This method is called by the recoverPhyStats() method on other Environmental objects. It is used to transform the Environmental basePhyStats() object into a finished phyStats() object, both of which are objects implementing the PhyStats interface. See those methods for more information.

Specified by:
affectPhyStats in interface StatsAffecting
Overrides:
affectPhyStats in class StdRace
Parameters:
affected - the host of the PhyStats object being affected
affectableStats - the particular PhyStats object being affected
See Also:
PhyStats, Environmental, Affectable.basePhyStats(), Affectable.phyStats(), Affectable.recoverPhyStats()

affectCharStats

public void affectCharStats(MOB affectedMob,
                            CharStats affectableStats)
Description copied from interface: StatsAffecting
This method is called by the recoverCharStats() method on other MOB objects. It is used to transform the MOB baseCharStats() object into a finished charStats() object, both of which are objects implementing the CharStats interface. See those methods for more information.

Specified by:
affectCharStats in interface StatsAffecting
Overrides:
affectCharStats in class StdRace
Parameters:
affectedMob - the host of the CharStats object being affected
affectableStats - the particular CharStats object being affected
See Also:
CharStats, MOB, MOB.baseCharStats(), MOB.charStats(), MOB.recoverCharStats()

affectCharState

public void affectCharState(MOB affectedMob,
                            CharState affectableMaxState)
Description copied from interface: StatsAffecting
This method is called by the recoverCharState() method on other MOB objects. It is used to transform the MOB baseCharState() object into a finished charState() object, both of which are objects implementing the CharState interface. See those methods for more information.

Specified by:
affectCharState in interface StatsAffecting
Overrides:
affectCharState in class StdRace
Parameters:
affectedMob - the host of the CharState object being affected
affectableMaxState - the particular CharState object being affected
See Also:
CharState, MOB, MOB.baseState(), MOB.curState(), MOB.recoverMaxState()

myResources

public java.util.List<RawMaterial> myResources()
Description copied from interface: Race
Returns a list 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.

Specified by:
myResources in interface Race
Overrides:
myResources in class StdRace
Returns:
a list of rawmaterial objects
See Also:
RawMaterial

getRaceLocatorID

protected java.lang.String getRaceLocatorID(Race R)

racialParms

public java.lang.String racialParms()
Description copied from interface: Race
If this race is modifiable at run time, this method will return an xml document describing the several attributes of this race.

Specified by:
racialParms in interface Race
Overrides:
racialParms in class StdRace
Returns:
an xml document describing this race
See Also:
Race.isGeneric(), Race.setRacialParms(String)

setRacialParms

public void setRacialParms(java.lang.String parms)
Description copied from interface: Race
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.

Specified by:
setRacialParms in interface Race
Overrides:
setRacialParms in class StdRace
Parameters:
parms - an xml document describing this race
See Also:
Race.isGeneric(), Race.racialParms()

getStat

public java.lang.String getStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
getStat in interface Modifiable
Overrides:
getStat in class StdRace
Parameters:
code - the name of the field to read.
Returns:
the value of the field read
See Also:
Modifiable.getStatCodes()

tick

public boolean tick(Tickable ticking,
                    int tickID)
Description copied from interface: Tickable
this is the method which is called periodically by the threading engine. How often it is called depends on the parameters passed to the threadding engine when it is submitted for thread access. Typically the period is once per TIME_TICK period, but that is determined when the object is submitted to the thread engine.

Specified by:
tick in interface Tickable
Overrides:
tick in class StdRace
Parameters:
ticking - a reference to this Tickable object
tickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Returns:
true always, unless this object no longer wishes to ever tick again, in which case false
See Also:
Tickable, ServiceEngine, TickableGroup

executeMsg

public void executeMsg(Environmental myHost,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Overrides:
executeMsg in class StdRace
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg

okMessage

public boolean okMessage(Environmental myHost,
                         CMMsg msg)
Description copied from interface: MsgListener
The general message event previewer for the object. Messages passed herein are in a pending state, and may be safely modified or rejected without fear that they might be in the middle of being executed. Messages passed herein may not necessarily be FOR or FROM this object, but will almost always represent events which want to happen in the same rom. This method should always always return true UNLESS this message needs to be canceled, in which case it is necessary to tell the mob initiating the event (CMMsg.source()) why it is being cancelled. Every game event goes through these methods.

Specified by:
okMessage in interface MsgListener
Overrides:
okMessage in class StdRace
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that wants to be executed
Returns:
whether this message is allowed to execute
See Also:
CMMsg, CMMsg.source()

startRacing

public void startRacing(MOB mob,
                        boolean verifyOnly)
Description copied from interface: Race
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. The verify flag is almost always true, unless the mob is a new player being created, in which case false is sent.

Specified by:
startRacing in interface Race
Overrides:
startRacing in class StdRace
Parameters:
mob - the mob or player being set to this race
verifyOnly - true flag unless this is a new player character

setStat

public void setStat(java.lang.String code,
                    java.lang.String val)
Description copied from interface: Modifiable
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. The value passed in is always a string, even if the field itself is numeric or a list.

Specified by:
setStat in interface Modifiable
Overrides:
setStat in class StdRace
Parameters:
code - the name of the field to set
val - the value to set the field to
See Also:
Modifiable.getStatCodes()

getSaveStatIndex

public int getSaveStatIndex()
Description copied from interface: Modifiable
Returns the index into the stat codes array where extra savable fields begins. This number is always the same as getStatCodes().length unless there are extra fields which need to be saved in xml for generic objects. This method is used by editors for post-build user-defined fields.

Specified by:
getSaveStatIndex in interface Modifiable
Overrides:
getSaveStatIndex in class StdRace
Returns:
the index into getStatCodes()
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String), Modifiable.setStat(String, String)

getStatCodes

public java.lang.String[] getStatCodes()
Description copied from interface: Modifiable
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.

Specified by:
getStatCodes in interface Modifiable
Overrides:
getStatCodes in class StdRace
Returns:
list of the fields which may be set.
See Also:
Modifiable.getStat(String), Modifiable.setStat(String, String)

getCodeNum

protected int getCodeNum(java.lang.String code)
Overrides:
getCodeNum in class StdRace

sameAs

public boolean sameAs(Race E)
Overrides:
sameAs in class StdRace