wyvern.lib
Interface Trap

All Known Implementing Classes:
AbstractTrap, Firespout

public interface Trap

Common interface for Traps.

Version:
1.0, Sep 12, 2002
Author:
Steve Yegge

Method Summary
 boolean isRevealed()
          Returns true if the trap has been revealed already.
 void reveal(Commandable agent)
          Someone discovered the trap via searching (or stepping on it.)
 void reveal(Commandable agent, boolean silent)
          Reveals the trap, with an option not to print a message.
 void steppedOn(Monster m)
          Someone stepped on the trap.
 

Method Detail

isRevealed

public boolean isRevealed()
Returns true if the trap has been revealed already.

Returns:
true if someone has triggered/revealed it

reveal

public void reveal(Commandable agent)
Someone discovered the trap via searching (or stepping on it.)

Parameters:
agent - the agent who discovered the trap

reveal

public void reveal(Commandable agent,
                   boolean silent)
Reveals the trap, with an option not to print a message.

Parameters:
agent - the person who found it
silent - true to skip the message

steppedOn

public void steppedOn(Monster m)
Someone stepped on the trap. Reveals the trap silently, since most traps print some other message when you step on them.

Parameters:
m - the monster who stepped on it