us.asciiroth.client.agents
Class ImmobileAgent

java.lang.Object
  extended by us.asciiroth.client.core.AbstractPiece
      extended by us.asciiroth.client.agents.AbstractAgent
          extended by us.asciiroth.client.agents.ImmobileAgent
All Implemented Interfaces:
Agent, Piece
Direct Known Subclasses:
Fence, Pillar, Stump, Tree

public abstract class ImmobileAgent
extends AbstractAgent

An agent that cannot be moved and that is probably not animate.


Constructor Summary
ImmobileAgent(java.lang.String name, int flags, Symbol symbol)
          Constructor.
 
Method Summary
 int changeHealth(int value)
          Cannot be destroyed by default.
 
Methods inherited from class us.asciiroth.client.agents.AbstractAgent
canEnter, onDie, onHit, onHitBy, onHitBy
 
Methods inherited from class us.asciiroth.client.core.AbstractPiece
getColor, getName, getSymbol, is, not
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface us.asciiroth.client.core.Piece
getColor, getName, getSymbol, is, not
 

Constructor Detail

ImmobileAgent

public ImmobileAgent(java.lang.String name,
                     int flags,
                     Symbol symbol)
Constructor.

Parameters:
name -
flags -
symbol -
Method Detail

changeHealth

public int changeHealth(int value)
Cannot be destroyed by default.

Specified by:
changeHealth in interface Agent
Overrides:
changeHealth in class AbstractAgent
Parameters:
value - the damage to take or the adjustment to the percentage chance to be hit.
Returns:
returns the current health of the agent, 0 for non-player agents when they have been killed.

0.7

© 2009 Alx Dark