Adventure at Umalu  22nd March, 2013
Rogue-like Dungeon Crawler, written in Java
 All Classes Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
rogue.creature.Creature Class Reference
Inheritance diagram for rogue.creature.Creature:
jade.core.Actor jade.core.Messenger rogue.creature.Monster rogue.creature.Player rogue.creature.Dragon rogue.creature.Dummy rogue.creature.Frog_poisonous rogue.creature.InvisibleZombie rogue.creature.Orc rogue.creature.Rat rogue.creature.Shadow rogue.creature.Slug_fat rogue.creature.Troll rogue.creature.Unbeliever rogue.creature.Zombie

Public Member Functions

 Creature (ColoredChar face)
 
void setPos (int x, int y)
 
boolean loseHitpoints (int damage)
 
boolean checkHitpoints ()
 
- Public Member Functions inherited from jade.core.Actor
 Actor (ColoredChar face)
 
abstract void act ()
 
ColoredChar face ()
 
World world ()
 
final boolean bound ()
 
final boolean bound (World world)
 
void setPos (int x, int y)
 
final void setPos (Coordinate coord)
 
final void move (int dx, int dy)
 
final void move (Coordinate delta)
 
final void move (Direction dir)
 
int x ()
 
int y ()
 
final Coordinate pos ()
 
boolean expired ()
 
void expire ()
 
void attach (Actor holder)
 
void detach ()
 
Actor holder ()
 
final boolean held ()
 
final boolean held (Actor holder)
 
final Collection< Actorholds ()
 
void setWorld (World world)
 
- Public Member Functions inherited from jade.core.Messenger
 Messenger ()
 
void appendMessage (String message)
 
Iterable< String > retrieveMessages ()
 
void aggregateMessages (Messenger messenger)
 
void filterMessages (Collection< Messenger > filter)
 
void clearMessages ()
 

Public Attributes

int hitpoints
 
int strength
 

Detailed Description

Defines an abstract Class for every Being on Map

Constructor & Destructor Documentation

rogue.creature.Creature.Creature ( ColoredChar  face)

Creates a new Creature Object

Parameters
faceSymbol used ingame to Represent this creature

Member Function Documentation

boolean rogue.creature.Creature.checkHitpoints ( )

Checks, if creature is dead (by having <= 0 hitpoints), if so, Creature dies

boolean rogue.creature.Creature.loseHitpoints ( int  damage)

Reduces Creatures Hitpoints by damage.

Parameters
damageAmount of Hitpoints this creature should loose
void rogue.creature.Creature.setPos ( int  x,
int  y 
)

Tries to move Creature to position (x,y), but checks if this is possible by checking if (x,y) is passable. If (x,y) is not passable (e.g. a wall), Creatures move is lost!

Parameters
xX Coordinate to which Creature should move
yY Coordinate to which Creatue should move

The documentation for this class was generated from the following file: