|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.properties.PList wyvern.kernel.maps.MapObject wyvern.lib.skills.Unlearner
An object that can un-train you in skills, restoring your skill points. It responds to the "untrain" command, which it registers on a certain square in the map. You can put an NPC next to it who claims to be the one responding to the command.
You can put a few properties on it to customize it:
Field Summary | |
static int |
DEFAULT_UNTRAIN_COST
|
Fields inherited from class wyvern.kernel.maps.MapObject |
IN_MAP_EDITOR, listenerList_ |
Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
Constructor Summary | |
Unlearner()
|
Method Summary | |
int |
checkMoney(Player agent)
Checks if the agent has enough money to untrain. |
CommandEvent |
createEvent(CommandEvent e)
Creates a CommandEvent that encapsulates all the state necessary to perform the command. |
boolean |
execute(CommandEvent event)
Executes the specified CommandEvent. |
void |
initialize()
Sets class-default properties. |
boolean |
knowsCommand(java.lang.String command)
Returns true if this Command wants to handle the command. |
void |
message(Commandable agent,
java.lang.String msg)
Sends a message to the agent with prepend-msg prepended, in the TEXT_TALK style if appropriate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEFAULT_UNTRAIN_COST
Constructor Detail |
public Unlearner()
Method Detail |
public void initialize()
initialize
in interface GameObject
initialize
in class MapObject
public boolean knowsCommand(java.lang.String command)
Command
This method exists to allow more than one game object to implement the same command verb, but with different expected arguments.
If two objects register for the same command and the same arguments, the object that was registered most recently gets to handle at the command.
knowsCommand
in interface Command
command
- the entire command string, including arguments
public CommandEvent createEvent(CommandEvent e)
Command
This method is called by the kernel. The kernel passes the event to the pre-hook, then calls Command.execute() (below) to execute the event, and finally calls the post-hook.
createEvent
in interface Command
e
- 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)
Command
execute
in interface Command
event
- the CommandEvent to execute
public void message(Commandable agent, java.lang.String msg)
public int checkMoney(Player agent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |