|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.combat.BodyPart
This is the superclass for all specific body parts (hand, foot, etc). BodyParts aren't wieldable per se, but can sometimes be used as attacks. Those that can implement the Attack interface.
Field Summary | |
protected int |
hitWeight_
|
protected java.lang.String |
name_
|
protected java.lang.String |
pluralName_
|
protected ItemSlot[] |
slots_
|
protected java.lang.String |
uniqueName_
The unique part name in the list, for shapes that have multiples of the same type of part. |
Constructor Summary | |
BodyPart()
|
Method Summary | |
boolean |
equals(java.lang.Object ob)
Returns true if this part is has the same properties as the passed part. |
java.lang.String |
getName()
Returns the singular name of the part (e.g. |
java.lang.String |
getPluralName()
Returns the plural name of the part (e.g. |
int |
getProbability()
Returns the probability weight of this part, for purposes of computing hit-locations. |
ItemSlot[] |
getSlots()
Returns a list of the slots this body part provides. |
int |
getTotalAC(DamageType dtype)
Computes the total AC for the given body part, by summing the ACs of any armor covering the part. |
java.lang.String |
getUniqueName()
Returns the unique name for the part, such as "left foot". |
BodyPart |
makeClone()
Clones this body part. |
protected void |
makeSingleSlot(ItemSlot slot)
Takes the passed slot and stores it in an array of length 1. |
void |
setName(java.lang.String name)
Sets the singular name of the part (e.g. |
void |
setPluralName(java.lang.String plural)
Sets the plural name of the part (e.g. |
void |
setProbability(int weight)
Sets the new hit-location "weight" for this body part. |
void |
setUniqueName(java.lang.String name)
Sets a unique name for the object. |
java.lang.String |
toString()
Prints String rep. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected ItemSlot[] slots_
protected int hitWeight_
protected java.lang.String name_
protected java.lang.String pluralName_
protected java.lang.String uniqueName_
Constructor Detail |
public BodyPart()
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getPluralName()
public void setPluralName(java.lang.String plural)
public void setUniqueName(java.lang.String name)
public java.lang.String getUniqueName()
public ItemSlot[] getSlots()
public int getProbability()
public void setProbability(int weight)
weight
- the new weight.protected void makeSingleSlot(ItemSlot slot)
public java.lang.String toString()
public boolean equals(java.lang.Object ob)
public int getTotalAC(DamageType dtype)
dtype
- the DamageType to protect against
public BodyPart makeClone() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |