X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FHero.h;h=1b4c8d10954c3076007d38730a2a622daf900f3d;hb=3d69f521b593457304b282e5f23e36ab165288b6;hp=00924d400ef7eaf3f2fca291d80c695132141076;hpb=ec18252fd6199492c40b98abab289c375a5a41b7;p=l2e.git diff --git a/src/common/Hero.h b/src/common/Hero.h index 00924d4..1b4c8d1 100644 --- a/src/common/Hero.h +++ b/src/common/Hero.h @@ -1,16 +1,17 @@ -/* - * Hero.h - * - * Created on: Oct 7, 2012 - * Author: holy - */ - #ifndef COMMON_HERO_H_ #define COMMON_HERO_H_ -#include "fwd.h" +namespace common { + class Item; + class Spell; + class Upgrade; +} +namespace graphics { + class Animation; + class Sprite; +} + #include "Stats.h" -#include "../graphics/fwd.h" #include "../map/Entity.h" #include @@ -37,6 +38,19 @@ public: 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; } @@ -60,6 +74,8 @@ public: int Experience() const { return experience; } int NextLevel() const; + void AddExperience(int, std::vector &); + bool CanEquip(const Item &) const; bool CanInvoke(const Spell &) const; @@ -83,8 +99,9 @@ public: 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: @@ -99,6 +116,7 @@ private: int level; int experience; + // TODO: ladder should contain hp, mp, and stats mods. int *levelLadder; int numLevels; @@ -120,4 +138,4 @@ private: } -#endif /* COMMON_HERO_H_ */ +#endif