|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.combat.DamageType
Base class for legal damage types.
Field Summary | |
static java.lang.String[] |
DAMAGE_YOU_MSGS
|
static java.lang.String[] |
INANIMATE_DAMAGE_MSGS
|
protected int |
wc_
|
static java.lang.String[] |
YOU_DAMAGE_MSGS
|
Constructor Summary | |
DamageType()
Default no-arg constructor for Class.newInstance(); |
|
DamageType(int wc)
Constructs a new DamageType |
Method Summary | |
DamageType |
createClone()
Makes a clone of the DamageType. |
java.lang.String[] |
getAttackerMessages()
Returns an array of messages from least to most. |
java.lang.String[] |
getAttackerMessagesInanimate()
Returns an array of messages from least to most. |
java.lang.String |
getAttackerMsg(GameObject defender,
int damage)
Returns a message for the attacker dependent on the amount of damage done. |
static java.lang.Class |
getDamageClass(java.lang.String name)
Returns the DamageType subclass for the specified type. |
java.lang.String[] |
getDefenderMessages()
Returns an array of messages from least to most. |
java.lang.String |
getDefenderMsg(GameObject attacker,
GameObject defender,
int damage)
Returns a default damage-description to give the defender. |
java.lang.String |
getNegativeDamageAttackerMessage(GameObject defender)
Returns the message to tell the attacker if the attack resulted in healing the defender. |
java.lang.String |
getNegativeDamageDefenderMessage(GameObject attacker)
Returns the message to tell the defender if the damage is negative; i.e. the defender is getting healed by the attack. |
java.lang.String |
getNoDamageAttackerMessage(GameObject defender)
Returns the message to tell the attacker if the damage amount was zero. |
java.lang.String |
getNoDamageDefenderMessage(GameObject attacker)
Returns the message to tell the defender if the damage was zero. |
abstract java.lang.String |
getShortName()
Returns "fire", "cold", "smash" or whatever else is used in the archetype files for this damage type. |
int |
getWC()
Returns the weapon class for this damage type. |
void |
setWC(int wc)
Sets the wc for this damage type. |
java.lang.String |
toString()
Returns a short (debugging) description. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int wc_
public static final java.lang.String[] INANIMATE_DAMAGE_MSGS
public static final java.lang.String[] YOU_DAMAGE_MSGS
public static final java.lang.String[] DAMAGE_YOU_MSGS
Constructor Detail |
public DamageType()
public DamageType(int wc)
wc
- the weapon classMethod Detail |
public static java.lang.Class getDamageClass(java.lang.String name)
name
- the damage type-name, such as "lightning" or "smash"
public int getWC()
public void setWC(int wc)
public abstract java.lang.String getShortName()
public java.lang.String getAttackerMsg(GameObject defender, int damage)
defender
- the thing that got damageddamage
- the damage: can be zero or negative - subclasses need
to handle these cases
public java.lang.String getDefenderMsg(GameObject attacker, GameObject defender, int damage)
attacker
- the attackerdefender
- the thing being damageddamage
- the damage amount (can be zero or negative)
public java.lang.String getNoDamageAttackerMessage(GameObject defender)
defender
- the thing being attacked
public java.lang.String getNegativeDamageAttackerMessage(GameObject defender)
defender
- the thing being attacked
public java.lang.String getNoDamageDefenderMessage(GameObject attacker)
attacker
- the thing doing the attack
public java.lang.String getNegativeDamageDefenderMessage(GameObject attacker)
attacker
- the thing doing the attack
public java.lang.String[] getAttackerMessages()
public java.lang.String[] getDefenderMessages()
public java.lang.String[] getAttackerMessagesInanimate()
public java.lang.String toString()
public DamageType createClone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |