namespace common {
class Item;
+ class LevelUp;
class Spell;
+ class Upgrade;
}
namespace graphics {
class Animation;
EQUIP_COUNT,
};
+ enum UpgradeType {
+ UPGRADE_LVL,
+ UPGRADE_MHP,
+ UPGRADE_MMP,
+ UPGRADE_ATK,
+ UPGRADE_DFP,
+ UPGRADE_STR,
+ UPGRADE_AGL,
+ UPGRADE_INT,
+ UPGRADE_GUT,
+ UPGRADE_MGR,
+ };
+
const char *Name() const { return name; }
Uint16 MaxHealth() const { return maxHealth; }
int Experience() const { return experience; }
int NextLevel() const;
+ void AddExperience(int, std::vector<Upgrade> &);
+
bool CanEquip(const Item &) const;
bool CanInvoke(const Spell &) const;
static void CreateTypeDescription();
static void Construct(void *);
-// temporary setters
public:
+ void SetMaxHealth(int h) { maxHealth = h; }
+ void SetHealth(int h) { health = h; }
void AddSpell(Spell *s) { spells.push_back(s); }
private:
int level;
int experience;
- int *levelLadder;
+ LevelUp *levelLadder;
int numLevels;
int useMask;
}
-#endif /* COMMON_HERO_H_ */
+#endif