-/*
- * Monster.h
- *
- * Created on: Aug 3, 2012
- * Author: holy
- */
-
#ifndef BATTLE_MONSTER_H_
#define BATTLE_MONSTER_H_
+namespace common {
+ class Item;
+}
+namespace graphics {
+ class Animation;
+ class Sprite;
+}
+
#include "AttackChoice.h"
-#include "Stats.h"
-#include "../geometry/Vector.h"
+#include "../common/Stats.h"
+#include "../math/Vector.h"
#include "../graphics/Animation.h"
#include <SDL.h>
-namespace common { class Item; }
-namespace graphics {
- class Sprite;
-}
-
namespace battle {
class Monster {
+public:
+ static const int TYPE_ID = 202;
+
public:
Monster();
~Monster();
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; }
const graphics::Animation *AttackAnimation() const { return attackAnimation; }
const graphics::Animation *SpellAnimation() const { return spellAnimation; }
- geometry::Vector<int> &Position() { return position; }
- const geometry::Vector<int> &Position() const { return position; }
+ math::Vector<int> &Position() { return position; }
+ const math::Vector<int> &Position() const { return position; }
// temporary setters until loader is implemented
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; }
graphics::AnimationRunner animation;
- geometry::Vector<int> position;
+ math::Vector<int> position;
AttackChoice attackChoice;
int maxHealth, health;
int maxMana, mana;
- Stats stats;
+ common::Stats stats;
int expReward, goldReward;
}
-#endif /* BATTLE_MONSTER_H_ */
+#endif