|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for objects that can sustain damage. If you can't attack them per se, but they can take damage through some means (e.g. weapons or armor taking damage during combat), you can have them implement this interface. It's a particularly useful interface for special armor or weapons that want to know when their hp are being adjusted, or when the object is being destroyed.
Field Summary |
Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
Method Summary | |
void |
adjustHP(int adjust)
Adjusts the object's hit points upwards or downwards. |
int |
getHP()
Returns the object's current hit points. |
int |
getMaxHP()
Returns the object's maximum hit points. |
void |
kill(GameObject attacker)
Destroys the object. |
Methods inherited from interface wyvern.lib.MethodHookable |
addMethodHook, removeMethodHook, runMethodHook |
Methods inherited from interface wyvern.lib.Broadcaster |
broadcast, broadcast, broadcast, broadcast, broadcast |
Method Detail |
public int getHP()
public int getMaxHP()
public void adjustHP(int adjust)
adjust
- a number (usually negative) to add to the object's hppublic void kill(GameObject attacker)
attacker
- the player/monster/iron-gate/whatever that
did the final blow. Can be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |