From c1d99cc23ca3108c74ad897c9a3485701aae1220 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Mon, 7 Jan 2008 22:07:10 +0000 Subject: 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). --- src/game-server/monster.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/game-server/monster.cpp') 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); -- cgit v1.2.3-60-g2f50