diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-02-06 16:36:57 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-02-06 16:36:57 +0000 |
commit | 983a8587fedec18e08a1d032a76784d8f9a18085 (patch) | |
tree | 6bf142c63b37f85cc1191c0c265cbc35274d7e54 /src/game-server/monster.cpp | |
parent | aa603c3ec05f6143b1c9085b56e3becf45be4bf5 (diff) | |
download | manaserv-983a8587fedec18e08a1d032a76784d8f9a18085.tar.gz manaserv-983a8587fedec18e08a1d032a76784d8f9a18085.tar.bz2 manaserv-983a8587fedec18e08a1d032a76784d8f9a18085.tar.xz manaserv-983a8587fedec18e08a1d032a76784d8f9a18085.zip |
Monster base attributes are now read from monsters.xml.
Diffstat (limited to 'src/game-server/monster.cpp')
-rw-r--r-- | src/game-server/monster.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp index 018a379f..3e92e85b 100644 --- a/src/game-server/monster.cpp +++ b/src/game-server/monster.cpp @@ -66,6 +66,12 @@ Monster::Monster(MonsterClass *specy): { LOG_DEBUG("Monster spawned!"); + // get basic attributes from monster database + for (int i = BASE_ATTR_BEGIN; i < BASE_ATTR_END; i++) + { + setAttribute(i, specy->getAttribute(i)); + } + // Some bogus stats for testing. // TODO: Get all this stuff from the monster database. mAgressive = false; @@ -76,11 +82,6 @@ Monster::Monster(MonsterClass *specy): mAttackAngle = 10; setSpeed(300); setSize(8); - setAttribute(BASE_ATTR_HP, 100); - setAttribute(BASE_ATTR_PHY_ATK_MIN, 20); - setAttribute(BASE_ATTR_PHY_ATK_DELTA, 2); - setAttribute(BASE_ATTR_HIT, 10); - setAttribute(BASE_ATTR_EVADE, 10); mExpReward = 100; // Set positions relative to target from which the monster can attack |