#include <monster.h>
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 MonsterInfo & | getInfo () 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 | |
Text * | mText |
holds a text object when the mod displays it's name, 0 otherwise |
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.
void Monster::setAction | ( | Action | action, | |
int | attackType = 0 | |||
) | [virtual] |
Being::Type Monster::getType | ( | ) | const [virtual] |
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.
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.
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 | ) |
virtual unsigned char Monster::getWalkMask | ( | ) | const [inline, virtual] |
virtual Map::BlockType Monster::getBlockType | ( | ) | const [inline, protected, virtual] |
void Monster::updateCoords | ( | ) | [protected, virtual] |
Update the text when the monster moves.
Reimplemented from Being.
Definition at line 222 of file monster.cpp.
Text* Monster::mText [private] |