X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FMonster.h;h=bb44bb48ed2ce525b4612811ab49790f683e5868;hb=06db9f596cd1c5aa4c0832b387882f7c74c1b4c0;hp=3497c04b4ddd184617604fb9f584c045e84e84b4;hpb=2a1d9169e1f6c2dfe0f93ed40d5fb68d3da342af;p=l2e.git diff --git a/src/battle/Monster.h b/src/battle/Monster.h index 3497c04..bb44bb4 100644 --- a/src/battle/Monster.h +++ b/src/battle/Monster.h @@ -1,17 +1,10 @@ -/* - * Monster.h - * - * Created on: Aug 3, 2012 - * Author: holy - */ - #ifndef BATTLE_MONSTER_H_ #define BATTLE_MONSTER_H_ #include "AttackChoice.h" -#include "Stats.h" #include "../common/fwd.h" -#include "../geometry/Vector.h" +#include "../common/Stats.h" +#include "../math/Vector.h" #include "../graphics/Animation.h" #include "../graphics/fwd.h" @@ -21,6 +14,9 @@ namespace battle { class Monster { +public: + static const int TYPE_ID = 202; + public: Monster(); ~Monster(); @@ -39,8 +35,8 @@ public: Uint16 Mana() const { return mana; } int RelativeMana(int max) const { return mana * max / maxMana; } - Stats &GetStats() { return stats; } - const Stats &GetStats() const { return stats; } + common::Stats &GetStats() { return stats; } + const common::Stats &GetStats() const { return stats; } Uint16 ExpReward() const { return expReward; } Uint16 GoldReward() const { return goldReward; } @@ -59,8 +55,8 @@ public: const graphics::Animation *AttackAnimation() const { return attackAnimation; } const graphics::Animation *SpellAnimation() const { return spellAnimation; } - geometry::Vector &Position() { return position; } - const geometry::Vector &Position() const { return position; } + math::Vector &Position() { return position; } + const math::Vector &Position() const { return position; } // temporary setters until loader is implemented public: @@ -71,7 +67,7 @@ public: void SetHealth(Uint16 h) { health = h; } void SetMaxMana(Uint16 m) { maxMana = m; } void SetMana(Uint16 m) { mana = m; } - void SetStats(const Stats &s) { stats = s; } + void SetStats(const common::Stats &s) { stats = s; } void SetReward(Uint16 exp, Uint16 gold) { expReward = exp; goldReward = gold; } void SetMeleeAnimation(const graphics::Animation *a) { meleeAnimation = a; } @@ -97,14 +93,14 @@ private: graphics::AnimationRunner animation; - geometry::Vector position; + math::Vector position; AttackChoice attackChoice; int maxHealth, health; int maxMana, mana; - Stats stats; + common::Stats stats; int expReward, goldReward;