|
||||||||||
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.Terrain wyvern.lib.classes.construct.Water
Water. Does damage to you when you're in it.
Nested Class Summary |
Nested classes inherited from class wyvern.lib.classes.Terrain |
Terrain.NoFlyweight |
Field Summary | |
static int |
DEFAULT_DAMAGE
The default wc-drown if the archetype doesn't specify one. |
static int |
DEFAULT_DELAY
The default timer delay if the archetype doesn't specify one. |
static int |
DEFAULT_TERRAIN_PRIORITY
The default terrain priority, if unspecified. |
protected java.util.HashSet |
players_
Keeps track of all the players standing in water in this map. |
protected Timer |
timer_
The damage timer, which goes until the monster leaves the square. |
Fields inherited from class wyvern.lib.classes.Terrain |
appearance_, hasBorders_, letsBordersIn_, letsBordersOut_, opaque_, priority_, terrainCache_ |
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 | |
Water()
|
Method Summary | |
static boolean |
canEnter(Monster m,
GameMap map,
Point p)
Checks whether a monster can enter this square normally, without drowning. |
void |
damageMonster(Monster m)
Does terrain-specific damage to the monster. |
void |
destroy()
Destroys the object. |
int |
getDelay()
Returns the delay between damage timers. |
void |
initialize()
Adds class-default properties. |
void |
steppedOn(Monster m)
Notification that a monster has stepped in the square containing this object. |
void |
timerExpired()
Damage timer went off. |
Methods inherited from class wyvern.lib.classes.Terrain |
getCachedTerrain, getPriority, getTile, hasBorders, isCached, isOpaque, isTerrain, letsBordersIn, letsBordersOut, setAppearance, setHasBorders, setLetsBordersIn, setLetsBordersOut, setPriority |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.HashSet players_
protected transient Timer timer_
public static final int DEFAULT_DELAY
public static final int DEFAULT_DAMAGE
public static final int DEFAULT_TERRAIN_PRIORITY
Constructor Detail |
public Water()
Method Detail |
public void initialize()
initialize
in interface GameObject
initialize
in class Terrain
public void steppedOn(Monster m)
steppedOn
in interface WalkNotify
m
- the Monster who stepped into this squarepublic void timerExpired()
timerExpired
in interface Timed
public static boolean canEnter(Monster m, GameMap map, Point p)
public void damageMonster(Monster m)
m
- the Monster to damage. Uses Combat.damageMonster
to do the damage.public int getDelay()
public void destroy()
destroy
in interface GameObject
destroy
in class MapObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |