|
||||||||||
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.classes.DynamicObject wyvern.lib.magic.misc.CrystalBall
Lets you spy on other players.
Field Summary | |
protected Player |
agent_
|
protected Player |
target_
|
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 | |
CrystalBall()
|
Method Summary | |
protected void |
blindAgent(Commandable agent)
Blinds the agent, if the ball is cursed. |
CommandEvent |
createEvent(CommandEvent event)
Creates an event - finds the player to view. |
protected Snooper |
createSnooper(Player agent,
Commandable target)
Creates the Snooper used for viewing the target. |
protected void |
decrementCharges()
When charges go below zero, marks the ball as dead and changes the description. |
boolean |
execute(CommandEvent event)
Starts or stops viewing the target player. |
void |
initialize()
Initializes the object's default properties. |
boolean |
isDepleted()
Returns true if there are no charges left. |
boolean |
knowsCommand(java.lang.String cmd)
Returns true if we know the command. |
protected boolean |
notAcceptingSnoops(Commandable player,
Commandable agent)
Returns true if we honor the "no-snoop" property, and the passed player has it, and the agent isn't a wizard. |
void |
setMap(GameMap map,
int x,
int y)
Sets up initial props if not in map editor. |
protected boolean |
shouldBlindAgent(Commandable agent,
Commandable player)
|
void |
viewOff(Commandable agent)
Stops viewing the target player. |
void |
viewPlayer(Player agent,
Player player)
Takes control of the camera and positions it on the other player. |
Methods inherited from class wyvern.lib.classes.DynamicObject |
adjustHP, computeHP, getHP, getMaxHP, kill |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wyvern.lib.MethodHookable |
addMethodHook, removeMethodHook, runMethodHook |
Methods inherited from interface wyvern.lib.Broadcaster |
broadcast, broadcast, broadcast, broadcast, broadcast |
Field Detail |
protected Player agent_
protected Player target_
Constructor Detail |
public CrystalBall()
Method Detail |
public void initialize()
GameObject
initialize
in interface GameObject
initialize
in class DynamicObject
public void setMap(GameMap map, int x, int y)
setMap
in interface GameObject
setMap
in class MapObject
public boolean knowsCommand(java.lang.String cmd)
knowsCommand
in interface Command
cmd
- the entire command string, including arguments
public CommandEvent createEvent(CommandEvent event)
createEvent
in interface Command
event
- 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 CommandEvent to execute
public boolean isDepleted()
protected void decrementCharges()
public void viewPlayer(Player agent, Player player)
protected Snooper createSnooper(Player agent, Commandable target)
public void viewOff(Commandable agent)
protected boolean shouldBlindAgent(Commandable agent, Commandable player)
player
- the player they're trying to viewprotected boolean notAcceptingSnoops(Commandable player, Commandable agent)
protected void blindAgent(Commandable agent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |