diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-01-07 22:07:10 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-01-07 22:07:10 +0000 |
commit | c1d99cc23ca3108c74ad897c9a3485701aae1220 (patch) | |
tree | 013ad38134d92df7b4f3d55c9b36b6c047b68d70 /src/game-server/monster.cpp | |
parent | ab00efb5c42b32a497fd56103dff7cc97b309ca8 (diff) | |
download | manaserv-c1d99cc23ca3108c74ad897c9a3485701aae1220.tar.gz manaserv-c1d99cc23ca3108c74ad897c9a3485701aae1220.tar.bz2 manaserv-c1d99cc23ca3108c74ad897c9a3485701aae1220.tar.xz manaserv-c1d99cc23ca3108c74ad897c9a3485701aae1220.zip |
Implemented some of the game mechanics we decided to use. The clients now only receive attribute change messages when the attribute actually changed. Left the HP mechanics as they are for now (although I consider them flawed).
Diffstat (limited to 'src/game-server/monster.cpp')
-rw-r--r-- | src/game-server/monster.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp index 1d4bc280..b65ee3de 100644 --- a/src/game-server/monster.cpp +++ b/src/game-server/monster.cpp @@ -70,8 +70,11 @@ Monster::Monster(MonsterClass *specy): // Some bogus stats for testing. setSpeed(300); setSize(8); - setAttribute(BASE_ATTR_HP, 10); - setAttribute(BASE_ATTR_PHY_ATK, 10); + 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); // Set positions relative to target from which the monster can attack mAttackPositions.push_back(AttackPosition(+32, 0, DIRECTION_LEFT)); @@ -99,9 +102,9 @@ void Monster::perform() // Hard-coded values for now. Damage damage; - damage.base = getModifiedAttribute(BASE_ATTR_PHY_ATK) / 10; - damage.delta = 2; - damage.cth = 50; + damage.base = getModifiedAttribute(BASE_ATTR_PHY_ATK_MIN); + damage.delta = getModifiedAttribute(BASE_ATTR_PHY_ATK_DELTA); + damage.cth = getModifiedAttribute(BASE_ATTR_HIT); damage.element = ELEMENT_NEUTRAL; damage.type = DAMAGE_PHYSICAL; performAttack(damage); |