+/*
+ * Hero.h
+ *
+ * Created on: Aug 6, 2012
+ * Author: holy
+ */
+
+#ifndef BATTLE_HERO_H_
+#define BATTLE_HERO_H_
+
+#include <SDL.h>
+
+namespace graphics { class Sprite; }
+
+namespace battle {
+
+class Hero {
+
+public:
+ Hero();
+ ~Hero();
+
+public:
+ const char *Name() const { return name; }
+ Uint8 Level() const { return level; }
+ const graphics::Sprite *Sprite() const { return sprite; }
+
+ Uint16 MaxHealth() const { return maxHealth; }
+ Uint16 Health() const { return health; }
+ int RelativeHealth(int max) { return health * max / maxHealth; }
+
+ Uint16 MaxMana() const { return maxMana; }
+ Uint16 Mana() const { return mana; }
+ int RelativeMana(int max) { return mana * max / maxMana; }
+
+ Uint16 Attack() const { return attack; }
+ Uint16 Defense() const { return defense; }
+ Uint16 Agility() const { return agility; }
+ Uint16 Intelligence() const { return intelligence; }
+ Uint16 Gut() const { return gut; }
+ Uint16 MagicResistance() const { return magicResistance; }
+
+// temporary setters until loader is implemented
+public:
+ void SetSprite(graphics::Sprite *s) { sprite = s; }
+
+private:
+ const char *name;
+ graphics::Sprite *sprite;
+ // TODO: equipment and spells lists
+
+ Uint16 maxHealth, health;
+ Uint16 maxMana, mana;
+
+ Uint16 attack;
+ Uint16 defense;
+ Uint16 agility;
+ Uint16 intelligence;
+ Uint16 gut;
+ Uint16 magicResistance;
+
+ Uint8 level;
+
+};
+
+}
+
+#endif /* BATTLE_HERO_H_ */