|
|||||||||
| 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 java.lang.String |
abilitiesDesc
|
protected java.lang.String |
baseStatChgDesc
|
protected static int[] |
breatheAirArray
|
protected static int[] |
breatheAirWaterArray
|
protected static int[] |
breatheAnythingArray
|
protected static int[] |
breatheWaterArray
|
protected static java.lang.String[] |
CODES
|
protected java.lang.String |
dispChgDesc
|
protected static java.util.List |
empty
|
protected static SearchIDList |
emptyIDs
|
protected java.lang.String |
languagesDesc
|
protected boolean |
mappedCulturalAbilities
|
protected java.util.Set<java.lang.String> |
naturalAbilImmunities
|
protected Weapon |
naturalWeapon
|
protected java.util.List<Weapon> |
naturalWeaponChoices
|
protected java.util.List<Item> |
outfitChoices
|
protected java.util.Map<java.lang.Integer,SearchIDList<Ability>> |
racialAbilityMap
|
protected java.util.Map<java.lang.Integer,SearchIDList<Ability>> |
racialEffectMap
|
protected java.lang.String |
sensesChgDesc
|
protected int |
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 |
| Constructor Summary | |
|---|---|
StdRace()
|
|
| Method Summary | |
|---|---|
java.lang.String[] |
abilityImmunities()
Returns the list of ability IDs of skills that this race is flatly and quietly immune to, whether malicious or not -- it just won't happen. |
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 |
affectPhyStats(Physical affected,
PhyStats affectableStats)
This method is called by the recoverPhyStats() 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 |
canBreedWith(Race R)
Returns true if the given race is actually the same as the current race. |
boolean |
classless()
Whether this race can be associated with a character class. |
protected void |
clrStatChgDesc()
|
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. |
QuadVector<java.lang.String,java.lang.Integer,java.lang.Integer,java.lang.Boolean> |
culturalAbilities()
Return a vector of skills, spells, and other ability ids granted to the given mob when they are created as this race. |
protected boolean[] |
culturalAbilityAutoGains()
|
protected int[] |
culturalAbilityLevels()
|
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()
|
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()
|
java.lang.String |
getAbilitiesDesc()
Returns the list of racial abilities granted to those of this race or nothing. |
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)
|
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. |
java.lang.String |
getDispositionChgDesc()
Returns the list of modifications to disposition done by this race or nothing. |
java.lang.String |
getLanguagesDesc()
Returns the list of racial languages granted to those of this race or nothing. |
java.lang.String |
getPracAdjDesc()
Returns the adjustment to practices made by this race (or nothing) |
int |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
java.lang.String |
getSensesChgDesc()
Returns the list of modifications to senses done by this race or nothing. |
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 |
getStatAdjDesc()
Returns a list of the stat adjustments made by this race |
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 |
getTickStatus()
A coded status for this object during the period where its tick method is being called. |
java.lang.String |
getTrainAdjDesc()
Returns the adjustment to trains made by this race (or nothing) |
int |
getXPAdjustment()
Returns the amount, as a positive or negative % to adjust all experience gains. |
protected boolean |
giveMobAbility(MOB mob,
Ability A,
int proficiency,
java.lang.String defaultParm,
boolean isBorrowedRace)
|
protected boolean |
giveMobAbility(MOB mob,
Ability A,
int proficiency,
java.lang.String defaultParm,
boolean isBorrowedRace,
boolean autoInvoke)
|
void |
grantAbilities(MOB mob,
boolean isBorrowedRace)
Typically called when a mob gains a level with this base-race, to allow the race to assign any new skills. |
protected void |
grantAbilities(MOB mob,
boolean isBorrowedRace,
boolean skipCultural)
|
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. |
boolean |
infatigueable()
|
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 |
L(java.lang.String str,
java.lang.String... xs)
|
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.List<java.lang.String> 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. |
java.lang.String |
makeMobName(char gender,
int age)
Sends back a generic mob name appropriate to a mob of this race, at the given gender and age-group. |
protected RawMaterial |
makeResource(java.lang.String name,
int type)
|
protected RawMaterial |
makeResource(java.lang.String name,
int type,
java.lang.String subType)
|
protected void |
makeStatChgDesc()
|
protected void |
mapCulturalAbilities()
|
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.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. |
int |
numRacialEffects(MOB mob)
Returns the number of racial effects elligible to the given lob. |
boolean |
okMessage(Environmental myHost,
CMMsg msg)
The general message event previewer for the object. |
java.util.List<Item> |
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()
|
SearchIDList<Ability> |
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 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()
|
ChameleonList<Ability> |
racialEffects(MOB mob)
Return a vector of skills, spells, and other abilities granted to the given mob of the given mobs level. |
java.util.List<Ability> |
racialEffectsList(MOB mob)
|
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(PhyStats 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 |
usageCount(int alter)
Returns the number of registered usages of this race as of the moment of the call. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int[] breatheAnythingArray
protected static final int[] breatheAirArray
protected static final int[] breatheWaterArray
protected static final int[] breatheAirWaterArray
protected static final java.util.List empty
protected static final SearchIDList emptyIDs
protected java.lang.String baseStatChgDesc
protected java.lang.String sensesChgDesc
protected java.lang.String dispChgDesc
protected java.lang.String abilitiesDesc
protected java.lang.String languagesDesc
protected Weapon naturalWeapon
protected boolean mappedCulturalAbilities
protected java.util.List<Item> outfitChoices
protected java.util.List<Weapon> naturalWeaponChoices
protected java.util.Set<java.lang.String> naturalAbilImmunities
protected int usageCount
protected java.util.Map<java.lang.Integer,SearchIDList<Ability>> racialAbilityMap
protected java.util.Map<java.lang.Integer,SearchIDList<Ability>> racialEffectMap
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()
Race
name in interface CMObjectname in interface Tickablename in interface RaceEnvironmental.Name()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 getXPAdjustment()
Race
getXPAdjustment in interface Racepublic int[] bodyMask()
Race
bodyMask in interface Racepublic int[] getAgingChart()
Race
getAgingChart in interface RaceRacepublic int[] getBreathables()
Race
getBreathables in interface RaceRawMaterialpublic boolean useRideClass()
Race
useRideClass in interface Raceprotected int practicesAtFirstLevel()
protected int trainsAtFirstLevel()
protected java.lang.String[] racialEffectNames()
protected int[] racialEffectLevels()
protected java.lang.String[] racialEffectParms()
protected java.lang.String[] racialAbilityNames()
protected java.lang.String[] racialAbilityParms()
protected int[] racialAbilityLevels()
protected int[] racialAbilityProficiencies()
protected boolean[] racialAbilityQuals()
protected java.lang.String[] culturalAbilityNames()
protected int[] culturalAbilityLevels()
protected boolean[] culturalAbilityAutoGains()
protected int[] culturalAbilityProficiencies()
public java.lang.String[] abilityImmunities()
Race
abilityImmunities in interface Raceprotected boolean uncharmable()
protected boolean destroyBodyAfterUse()
public int availabilityCode()
Race
availabilityCode in interface RaceAreapublic CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic boolean fertile()
public boolean infatigueable()
public CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic Race healthBuddy()
public boolean canBreedWith(Race R)
Race
canBreedWith in interface RaceR - the race to check
public void affectPhyStats(Physical affected,
PhyStats affectableStats)
StatsAffecting
affectPhyStats in interface StatsAffectingaffected - the host of the PhyStats object being affectedaffectableStats - the particular PhyStats object being affectedPhyStats,
Environmental,
Affectable.basePhyStats(),
Affectable.phyStats(),
Affectable.recoverPhyStats()
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 java.lang.String makeMobName(char gender,
int age)
Race
makeMobName in interface Racegender - the gender of the mobage - the age category
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.List<java.lang.String> 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 int 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 java.lang.String L(java.lang.String str,
java.lang.String... xs)
protected boolean giveMobAbility(MOB mob,
Ability A,
int proficiency,
java.lang.String defaultParm,
boolean isBorrowedRace)
protected boolean giveMobAbility(MOB mob,
Ability A,
int proficiency,
java.lang.String defaultParm,
boolean isBorrowedRace,
boolean autoInvoke)
public void grantAbilities(MOB mob,
boolean isBorrowedRace)
Race
grantAbilities in interface Racemob - the mob to give abilities to.isBorrowedRace - whether the skills are savable (false) or temporary (true)AbilityContainer.addAbility(Ability)
protected void grantAbilities(MOB mob,
boolean isBorrowedRace,
boolean skipCultural)
protected void mapCulturalAbilities()
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.List<Item> 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 Raceviewer - the mob observing the health of this onemob - the mob whose health to check
MOB.curState(),
CharState.getHitPoints()protected Weapon funHumanoidWeapon()
public java.util.List<RawMaterial> myResources()
Race
myResources in interface RaceRawMaterial
public void setHeightWeight(PhyStats stats,
char gender)
Race
setHeightWeight in interface Racestats - the PhyStats object to changegender - the mobs gender 'M' or 'F'PhyStatspublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>
protected RawMaterial makeResource(java.lang.String name,
int type)
protected RawMaterial makeResource(java.lang.String name,
int type,
java.lang.String subType)
public DeadBody getCorpseContainer(MOB mob,
Room room)
Race
getCorpseContainer in interface Racemob - the mob to use as a template for the bodyroom - the room to place the corpse in
Race.myResources()public int numRacialEffects(MOB mob)
Race
numRacialEffects in interface Racemob - the mob to grant the abilities to
public ChameleonList<Ability> racialEffects(MOB mob)
Race
racialEffects in interface Racemob - the mob to grant the abilities to
Ability,
Race.numRacialEffects(MOB)public final java.util.List<Ability> racialEffectsList(MOB mob)
public Race makeGenRace()
Race
makeGenRace in interface Race
public Race mixRace(Race race,
java.lang.String newRaceID,
java.lang.String newRaceName)
Race
mixRace in interface Racerace - the race to use as a baselinenewRaceID - the id of the new racenewRaceName - the name of the new race
public QuadVector<java.lang.String,java.lang.Integer,java.lang.Integer,java.lang.Boolean> culturalAbilities()
Race
culturalAbilities in interface RaceAbilitypublic SearchIDList<Ability> racialAbilities(MOB mob)
Race
racialAbilities in interface Racemob - the mob to grant the abilities to
Abilitypublic java.lang.String getStatAdjDesc()
Race
getStatAdjDesc in interface Racepublic java.lang.String getSensesChgDesc()
Race
getSensesChgDesc in interface Racepublic java.lang.String getDispositionChgDesc()
Race
getDispositionChgDesc in interface Racepublic java.lang.String getTrainAdjDesc()
Race
getTrainAdjDesc in interface Racepublic java.lang.String getPracAdjDesc()
Race
getPracAdjDesc in interface Racepublic java.lang.String getAbilitiesDesc()
Race
getAbilitiesDesc in interface Racepublic java.lang.String getLanguagesDesc()
Race
getLanguagesDesc in interface Racepublic java.lang.String racialParms()
Race
racialParms in interface RaceRace.isGeneric(),
Race.setRacialParms(String)public int usageCount(int alter)
Race
usageCount in interface Racealter - TODO
public void setRacialParms(java.lang.String parms)
Race
setRacialParms in interface Raceparms - an xml document describing this raceRace.isGeneric(),
Race.racialParms()protected void clrStatChgDesc()
protected void makeStatChgDesc()
public int getSaveStatIndex()
Modifiable
getSaveStatIndex in interface ModifiableModifiable.getStatCodes(),
Modifiable.getStat(String),
Modifiable.setStat(String, String)public java.lang.String getStat(java.lang.String code)
Modifiable
getStat 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 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()protected int getCodeNum(java.lang.String code)
public boolean sameAs(Race E)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||