|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.skills.GiantShrink
Class that handles special abilities for Giants. Adds the commands "shrink" and "grow".
Constructor Summary | |
GiantShrink()
|
Method Summary | |
java.lang.Object |
createClone()
Produces a clone of the property for the caller. |
CommandEvent |
createEvent(CommandEvent initial)
Creates the command event. |
boolean |
equals(java.lang.Object o)
|
boolean |
execute(CommandEvent event)
Executes the event. |
boolean |
grow(Commandable agent)
Grows the giant back to normal size. |
int |
hashCode()
|
boolean |
knowsCommand(java.lang.String command)
Returns true if we want to handle this command. |
void |
methodCalled(java.lang.String hookName,
MethodHookable target,
java.lang.Object data)
Called when the player is done initializing. |
void |
notifyAdd(PropertyList obj)
Notifies the property that it's being added. |
void |
notifyRemove(PropertyList obj)
Notifies the property that it's being removed. |
void |
restoreStats(Commandable agent)
Restores stats to normal. |
boolean |
shrink(Commandable agent,
CommandEvent event)
Shrinks the giant to 1x1. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GiantShrink()
Method Detail |
public boolean knowsCommand(java.lang.String command)
knowsCommand
in interface Command
command
- the command the player typed
public CommandEvent createEvent(CommandEvent initial)
createEvent
in interface Command
initial
- a "blank" CommandEvent containing only the
command text and the agent who's performing the command. This
initial event is created by the originator of the event (e.g.
the AI or player's command preprocessor).
public boolean execute(CommandEvent event)
execute
in interface Command
event
- the event
public boolean shrink(Commandable agent, CommandEvent event)
event
- the command event
public boolean grow(Commandable agent)
public void restoreStats(Commandable agent)
public void notifyAdd(PropertyList obj)
notifyAdd
in interface AddRemoveNotify
obj
- the GameObject whose property list we're being
added topublic void notifyRemove(PropertyList obj)
notifyRemove
in interface AddRemoveNotify
obj
- the GameObject whose property list we're being
removed frompublic void methodCalled(java.lang.String hookName, MethodHookable target, java.lang.Object data)
methodCalled
in interface MethodHookCallback
hookName
- the name of the hook being runtarget
- the object on which the method was invoked:
a GameMap or GameObject.data
- a method-specific data object; can be null.
Check the documentation for the method hook to see if
any data is passed to the callbacks.public java.lang.Object createClone()
MutableProperty
createClone
in interface MutableProperty
public boolean equals(java.lang.Object o)
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |