#include <monster.hpp>
Public Member Functions | |
| MonsterClass (int id) | |
| int | getType () const |
| Returns monster type. | |
| void | setDrops (const MonsterDrops &v) |
| Sets monster drops. | |
| void | setAttribute (size_t attribute, int value) |
| Sets a being base attribute. | |
| int | getAttribute (size_t attribute) const |
| Returns a being base attribute. | |
| void | setSpeed (int speed) |
| Sets inverted movement speed. | |
| int | getSpeed () const |
| Returns inverted movement speed. | |
| void | setSize (int size) |
| Sets collision circle radius. | |
| int | getSize () const |
| Returns collision circle radius. | |
| void | setExp (int exp) |
| Sets experience reward for killing the monster. | |
| int | getExp () const |
| Returns experience reward for killing the monster. | |
| void | setAggressive (bool aggressive) |
| Sets if the monster attacks without being attacked first. | |
| bool | isAggressive () const |
| Returns if the monster attacks without being attacked first. | |
| void | setTrackRange (unsigned range) |
| Sets range in tiles in which the monster searches for enemies. | |
| unsigned | getTrackRange () const |
| Returns range in tiles in which the monster searches for enemies. | |
| void | setStrollRange (unsigned range) |
| Sets range in tiles in which the monster moves around when idle. | |
| unsigned | getStrollRange () const |
| Returns range in tiles in which the monster moves around when idle. | |
| void | setMutation (unsigned factor) |
| Sets mutation factor in percent. | |
| unsigned | getMutation () const |
| Returns mutation factor in percent. | |
| void | setAttackDistance (unsigned distance) |
| Sets preferred combat distance in pixels. | |
| unsigned | getAttackDistance () const |
| Returns preferred combat distance in pixels. | |
| void | addAttack (MonsterAttack *type) |
| Adds an attack to the monsters repertoire. | |
| const MonsterAttacks & | getAttacks () const |
| Returns all attacks of the monster. | |
| ItemClass * | getRandomDrop () const |
| Randomly selects a monster drop (may return NULL). | |
Definition at line 65 of file monster.hpp.
| int MonsterClass::getType | ( | void | ) | const [inline] |
Returns monster type.
This is the ID of the monster class.
Definition at line 84 of file monster.hpp.
Referenced by SpawnArea::update().
| void MonsterClass::setDrops | ( | const MonsterDrops & | v | ) | [inline] |
Sets monster drops.
These are the items the monster drops when it dies.
Definition at line 91 of file monster.hpp.
| void MonsterClass::setSpeed | ( | int | speed | ) | [inline] |
| int MonsterClass::getSpeed | ( | ) | const [inline] |
Returns inverted movement speed.
Definition at line 110 of file monster.hpp.
Referenced by Monster::Monster().
| void MonsterClass::setSize | ( | int | size | ) | [inline] |
| int MonsterClass::getSize | ( | ) | const [inline] |
Returns collision circle radius.
Definition at line 116 of file monster.hpp.
Referenced by Monster::Monster().
| void MonsterClass::setExp | ( | int | exp | ) | [inline] |
| int MonsterClass::getExp | ( | ) | const [inline] |
Returns experience reward for killing the monster.
Definition at line 122 of file monster.hpp.
Referenced by Monster::died().
| void MonsterClass::setAggressive | ( | bool | aggressive | ) | [inline] |
Sets if the monster attacks without being attacked first.
Definition at line 125 of file monster.hpp.
| bool MonsterClass::isAggressive | ( | ) | const [inline] |
Returns if the monster attacks without being attacked first.
Definition at line 128 of file monster.hpp.
Referenced by Monster::update().
| void MonsterClass::setTrackRange | ( | unsigned | range | ) | [inline] |
Sets range in tiles in which the monster searches for enemies.
Definition at line 131 of file monster.hpp.
| void MonsterClass::setStrollRange | ( | unsigned | range | ) | [inline] |
Sets range in tiles in which the monster moves around when idle.
Definition at line 139 of file monster.hpp.
| void MonsterClass::setMutation | ( | unsigned | factor | ) | [inline] |
| unsigned MonsterClass::getMutation | ( | ) | const [inline] |
Returns mutation factor in percent.
Definition at line 150 of file monster.hpp.
Referenced by Monster::Monster().
| void MonsterClass::setAttackDistance | ( | unsigned | distance | ) | [inline] |
| unsigned MonsterClass::getAttackDistance | ( | ) | const [inline] |
Returns preferred combat distance in pixels.
Definition at line 157 of file monster.hpp.
Referenced by Monster::Monster().
| void MonsterClass::addAttack | ( | MonsterAttack * | type | ) | [inline] |
| const MonsterAttacks& MonsterClass::getAttacks | ( | ) | const [inline] |
Returns all attacks of the monster.
Definition at line 163 of file monster.hpp.
Referenced by Monster::update().
1.5.5