|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultPhyStats
public class DefaultPhyStats
| Field Summary | |
|---|---|
protected java.lang.String[] |
ambiances
|
protected java.lang.String |
replacementName
|
protected double |
speed
|
protected int[] |
stats
|
| Constructor Summary | |
|---|---|
DefaultPhyStats()
|
|
| Method Summary | |
|---|---|
int |
ability()
Returns the ability level (a secondary level, e.g. |
void |
addAmbiance(java.lang.String ambiance)
Adds an ambiance (extra word, visible field) to the list that are tacked onto the display text of this Physical. |
java.lang.String[] |
ambiances()
Returns a list of ambiances (extra words, visible fields) that are tacked onto the display text of this Physical. |
int |
armor()
Returns the defensive capability number of this Physical. |
int |
attackAdjustment()
Returns the rawcombat attack prowess of this Physical Usually mobs or weapons |
int |
compareTo(CMObject o)
|
void |
copyInto(PhyStats 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. |
int |
damage()
Returns the maximum damaging ability of this Physical |
void |
delAmbiance(java.lang.String ambiance)
Removes an ambiance (extra word, visible field) from the list that are tacked onto the display text of this Physical. |
int |
disposition()
Returns a bitmask for disposition related flags of Physicals (IS_ constants). |
protected int |
getCodeNum(java.lang.String code)
|
java.lang.String |
getCombatStats()
Returns a single string summary of several important stats from this object. |
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 |
height()
Returns the height of this Physical, in inches |
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 |
isAmbiance(java.lang.String ambiance)
Check to see if the given ambiance exists in the list. |
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. |
int |
level()
Returns the experience level of the mob, item, exit, Physical. |
int |
movesReqToPull()
Returns the number of move points required to pull It is derived from the weight. |
int |
movesReqToPush()
Returns the number of move points required to push It is derived from the weight. |
java.lang.String |
name()
The displayable name of this object. |
CMObject |
newInstance()
Returns a new instance of this class. |
java.lang.String |
newName()
Returns a modified name for this Physical, usually null for no change. |
int |
rejuv()
Returns the number of ticks before a Physical removed from the game (due to death, destruction, or just removal from home) is restored. |
void |
reset()
Resets all the stats in this object to their factory defaults. |
boolean |
sameAs(PhyStats E)
Returns whether the given object is substantially the same as this one |
int |
sensesMask()
Returns a bitmask for sense related flags of mobs (CAN_ constants), or miscellaneous runtime flags for items and other Physicals (SENSE_ constants). |
void |
setAbility(int newAdjustment)
Sets the ability level (a secondary level, e.g. |
void |
setAllValues(int def)
Sets all the stats in this object to the given value |
void |
setArmor(int newArmor)
Sets the defensive capability number of this Physical. |
void |
setAttackAdjustment(int newAdjustment)
Sets the rawcombat attack prowess of this Physical Usually mobs or weapons |
void |
setDamage(int newDamage)
Sets the maximum damaging ability of this Physical |
void |
setDisposition(int newDisposition)
Sets a bitmask for disposition related flags of Physicals (IS_ constants). |
void |
setHeight(int newHeight)
Sets the height of this Physical, in inches |
void |
setLevel(int newLevel)
Sets the experience level of the mob, item, exit, Physical. |
void |
setName(java.lang.String newName)
Sets a modified name for this Physical, usually null for no change. |
void |
setRejuv(int newRejuv)
Sets the number of ticks before a Physical removed from the game (due to death, destruction, or just removal from home) is restored. |
void |
setSensesMask(int newMask)
Sets a bitmask for sense related flags of mobs (CAN_ constants), or miscellaneous runtime flags for items and other Physicals (SENSE_ constants). |
void |
setSpeed(double newSpeed)
Sets the number of actions this mob can do per tick |
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 |
setWeight(int newWeight)
Sets the weight of this Physical, in pounds. |
double |
speed()
Returns the number of actions this mob can do per tick. |
int |
weight()
Returns the weight of this Physical, in pounds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] stats
protected double speed
protected java.lang.String replacementName
protected java.lang.String[] ambiances
| Constructor Detail |
|---|
public DefaultPhyStats()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String name()
CMObject
name in interface CMObjectEnvironmental.Name()public void setAllValues(int def)
PhyStats
setAllValues in interface PhyStatsdef - a value to set all the stats topublic void reset()
PhyStats
reset in interface PhyStatspublic int sensesMask()
PhyStats
sensesMask in interface PhyStatsPhyStats.SENSE_ITEMNOREMOVE,
PhyStats.CAN_NOT_SEE,
PhyStats.setSensesMask(int)public int disposition()
PhyStats
disposition in interface PhyStatsPhyStats.IS_BONUS,
PhyStats.setDisposition(int)public int level()
PhyStats
level in interface PhyStatsPhyStats.setLevel(int)public int ability()
PhyStats
ability in interface PhyStatsPhyStats.setAbility(int)public int rejuv()
PhyStats
rejuv in interface PhyStatsPhyStats.setRejuv(int)public int weight()
PhyStats
weight in interface PhyStatsPhyStats.setWeight(int)public int height()
PhyStats
height in interface PhyStatsPhyStats.setHeight(int)public int armor()
PhyStats
armor in interface PhyStatsPhyStats.setArmor(int)public int damage()
PhyStats
damage in interface PhyStatsPhyStats.setDamage(int)public double speed()
PhyStats
speed in interface PhyStatsPhyStats.setSpeed(double)public int attackAdjustment()
PhyStats
attackAdjustment in interface PhyStatsPhyStats.setAttackAdjustment(int)public java.lang.String newName()
PhyStats
newName in interface PhyStatsPhyStats.setName(String)public java.lang.String[] ambiances()
PhyStats
ambiances in interface PhyStatsPhyStats.addAmbiance(String),
PhyStats.delAmbiance(String),
PhyStats.isAmbiance(String)public void setRejuv(int newRejuv)
PhyStats
setRejuv in interface PhyStatsnewRejuv - the new number of ticks before rejuv (0==never)PhyStats.rejuv()public void setLevel(int newLevel)
PhyStats
setLevel in interface PhyStatsnewLevel - the new experience levelPhyStats.level()public void setArmor(int newArmor)
PhyStats
setArmor in interface PhyStatsnewArmor - the defensive capability number of this PhysicalPhyStats.armor()public void setDamage(int newDamage)
PhyStats
setDamage in interface PhyStatsnewDamage - the new maximum damaging ability of this PhysicalPhyStats.damage()public void setWeight(int newWeight)
PhyStats
setWeight in interface PhyStatsnewWeight - the new weight of this PhysicalPhyStats.weight()public void setSpeed(double newSpeed)
PhyStats
setSpeed in interface PhyStatsnewSpeed - the new number of actions this mob can do per tickPhyStats.speed()public void setAttackAdjustment(int newAdjustment)
PhyStats
setAttackAdjustment in interface PhyStatsnewAdjustment - the new raw combat attack prowess of this PhysicalPhyStats.attackAdjustment()public void setAbility(int newAdjustment)
PhyStats
setAbility in interface PhyStatsnewAdjustment - the new ability level (or misc integer)PhyStats.ability()public void setDisposition(int newDisposition)
PhyStats
setDisposition in interface PhyStatsnewDisposition - a bitmask of disposition flagsPhyStats.IS_BONUS,
PhyStats.disposition()public void setSensesMask(int newMask)
PhyStats
setSensesMask in interface PhyStatsnewMask - a bitmask made up of SENSE_ constants or CAN_ constantsPhyStats.SENSE_ITEMNOREMOVE,
PhyStats.CAN_NOT_SEE,
PhyStats.setSensesMask(int)public void setHeight(int newHeight)
PhyStats
setHeight in interface PhyStatsnewHeight - the new height of this Physical, in inches (0=indeterminate)PhyStats.height()public void setName(java.lang.String newName)
PhyStats
setName in interface PhyStatsnewName - the modified name, or nullPhyStats.newName()public java.lang.String getCombatStats()
PhyStats
getCombatStats in interface PhyStatspublic void addAmbiance(java.lang.String ambiance)
PhyStats
addAmbiance in interface PhyStatsambiance - a new ambiance stringPhyStats.ambiances(),
PhyStats.delAmbiance(String),
PhyStats.isAmbiance(String)public void delAmbiance(java.lang.String ambiance)
PhyStats
delAmbiance in interface PhyStatsambiance - the old ambiance stringPhyStats.ambiances(),
PhyStats.addAmbiance(String),
PhyStats.isAmbiance(String)public boolean isAmbiance(java.lang.String ambiance)
PhyStats
isAmbiance in interface PhyStatsambiance - the ambiance to look for
PhyStats.addAmbiance(String),
PhyStats.delAmbiance(String),
PhyStats.ambiances()public int movesReqToPull()
PhyStats
movesReqToPull in interface PhyStatspublic int movesReqToPush()
PhyStats
movesReqToPush in interface PhyStatspublic CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic void copyInto(PhyStats intoStats)
PhyStats
copyInto in interface PhyStatsintoStats - another PhyStats object.public CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic int getSaveStatIndex()
Modifiable
getSaveStatIndex in interface ModifiableModifiable.getStatCodes(),
Modifiable.getStat(String),
Modifiable.setStat(String, String)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(PhyStats E)
PhyStats
sameAs in interface PhyStatsE - the PhyStats to compare to
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 getStat(java.lang.String code)
Modifiable
getStat in interface Modifiablecode - the name of the field to read.
Modifiable.getStatCodes()public int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||