Monster Class Reference

#include <monster.h>

Inheritance diagram for Monster:

Being

List of all members.


Detailed Description

Definition at line 30 of file monster.h.


Public Member Functions

 Monster (int id, int job, Map *map)
 ~Monster ()
virtual void setAction (Action action, int attackType=0)
 Sets the current action.
virtual Type getType () const
 Returns the type of the being.
virtual TargetCursorSize getTargetCursorSize () const
 Returns the required size of a target cursor for this being.
virtual void handleAttack (Being *victim, int damage, AttackType type)
 Handles an attack of another being by this monster.
virtual void takeDamage (Being *attacker, int amount, AttackType type)
 Puts a damage bubble above this monster and plays the hurt sound.
const MonsterInfogetInfo () const
 Returns the MonsterInfo, with static data about this monster.
void setShowName (bool show)
 Determine whether the mob should show it's name.
virtual unsigned char getWalkMask () const
 Gets the way the monster is blocked by other objects.

Protected Member Functions

virtual Map::BlockType getBlockType () const
 Gets the way the monster blocks pathfinding for other objects.
void updateCoords ()
 Update the text when the monster moves.

Private Attributes

TextmText
 holds a text object when the mod displays it's name, 0 otherwise

Constructor & Destructor Documentation

Monster::Monster ( int  id,
int  job,
Map map 
)

Definition at line 35 of file monster.cpp.

Monster::~Monster (  ) 

Definition at line 76 of file monster.cpp.


Member Function Documentation

void Monster::setAction ( Action  action,
int  attackType = 0 
) [virtual]

Sets the current action.

Reimplemented from Being.

Definition at line 101 of file monster.cpp.

Being::Type Monster::getType (  )  const [virtual]

Returns the type of the being.

Reimplemented from Being.

Definition at line 96 of file monster.cpp.

Being::TargetCursorSize Monster::getTargetCursorSize (  )  const [virtual]

Returns the required size of a target cursor for this being.

Reimplemented from Being.

Definition at line 194 of file monster.cpp.

void Monster::handleAttack ( Being victim,
int  damage,
AttackType  type 
) [virtual]

Handles an attack of another being by this monster.

Plays a hit or miss sound when appropriate.

Parameters:
victim the victim being
damage the amount of damage dealt (0 means miss)
type the attack type

Reimplemented from Being.

Definition at line 175 of file monster.cpp.

void Monster::takeDamage ( Being attacker,
int  amount,
AttackType  type 
) [virtual]

Puts a damage bubble above this monster and plays the hurt sound.

Parameters:
attacker the attacking being
damage the amount of damage recieved (0 means miss)
type the attack type

Reimplemented from Being.

Definition at line 186 of file monster.cpp.

const MonsterInfo & Monster::getInfo (  )  const

Returns the MonsterInfo, with static data about this monster.

Definition at line 199 of file monster.cpp.

void Monster::setShowName ( bool  show  ) 

Determine whether the mob should show it's name.

Definition at line 204 of file monster.cpp.

virtual unsigned char Monster::getWalkMask (  )  const [inline, virtual]

Gets the way the monster is blocked by other objects.

Reimplemented from Being.

Definition at line 84 of file monster.h.

virtual Map::BlockType Monster::getBlockType (  )  const [inline, protected, virtual]

Gets the way the monster blocks pathfinding for other objects.

Reimplemented from Being.

Definition at line 91 of file monster.h.

void Monster::updateCoords (  )  [protected, virtual]

Update the text when the monster moves.

Reimplemented from Being.

Definition at line 222 of file monster.cpp.


Member Data Documentation

Text* Monster::mText [private]

holds a text object when the mod displays it's name, 0 otherwise

Reimplemented from Being.

Definition at line 103 of file monster.h.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5