wyvern.lib.properties
Interface Readyable

All Known Subinterfaces:
Weapon
All Known Implementing Classes:
SpellProxy, Wand, WeaponImpl

public interface Readyable

This interface is for objects that can be Readied, such as wands and bows.

Version:
1.0, Jan 29, 1998
Author:
Steve Yegge

Method Summary
 boolean canReady(Commandable agent)
          Checks if the specified Commandable may ready the object.
 boolean canUnready(Commandable agent)
          Checks whether the specified agent may unready the object, assuming they've already got it readied.
 boolean isReadied()
          Returns true if this object is currently readied.
 void notifyReady(Commandable agent)
          Notifies the Readyable object that the agent has readied it.
 void notifyUnready(Commandable agent)
          Unreadies the object.
 

Method Detail

canReady

public boolean canReady(Commandable agent)
Checks if the specified Commandable may ready the object.

Parameters:
agent - the Commandable trying to ready the object
Returns:
true if it's allowed to do so.

canUnready

public boolean canUnready(Commandable agent)
Checks whether the specified agent may unready the object, assuming they've already got it readied. For instance, if the object is cursed, it might not be unreadiable.

Parameters:
agent - the person who has the item readied
Returns:
true if we can unready it

notifyReady

public void notifyReady(Commandable agent)
Notifies the Readyable object that the agent has readied it.

Parameters:
agent - the agent using it

notifyUnready

public void notifyUnready(Commandable agent)
Unreadies the object. If you call this on the object directly, make sure to remove the agent's "@readied" property as well, or they'll still be able to use the object.

Parameters:
agent - the agent using the object

isReadied

public boolean isReadied()
Returns true if this object is currently readied.