X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FCapsule.h;h=a1afc1b2c012ddd1b0647f1ff185ecffdc46e3d3;hb=8f4cb4e8ad954ba73fb78a030c969c933a7ed60c;hp=f168506b21d59c5dfcd9870ff804b0832387c2e4;hpb=988ba6d1b4e18a4ae5d30a892224f76cee2355cc;p=l2e.git diff --git a/src/common/Capsule.h b/src/common/Capsule.h index f168506..a1afc1b 100644 --- a/src/common/Capsule.h +++ b/src/common/Capsule.h @@ -1,14 +1,19 @@ #ifndef COMMON_CAPSULE_H_ #define COMMON_CAPSULE_H_ +namespace common { + class Item; +} namespace graphics { class Animation; class Sprite; } +#include "Hero.h" #include "../common/Stats.h" -#include "../geometry/Vector.h" +#include "../math/Vector.h" +#include #include namespace common { @@ -36,12 +41,23 @@ public: int MaxClass() const { return maxClass; } int CurrentClass() const { return curClass; } - const geometry::Vector &AlignmentOffset() const { return alignmentCursor; } + const math::Vector &AlignmentOffset() const { return alignmentCursor; } const graphics::Sprite *AlignmentSprite() const { return alignmentSprite; } void UpgradeClass(); void NextClass(); void PreviousClass(); + int ClassIndex() const { return curClass; } + void SetClass(int index); + + int HungerEmpty() const; + int HungerTotal() const; + int HungerFull() const; + bool IsHungry() const; + void Feed(const common::Item *); + + const common::Item *UpgradeItem() const; + void UpgradeSpecial(); Uint16 MaxHealth() const; @@ -51,6 +67,8 @@ public: int Experience() const { return experience; } int NextLevel() const; + void AddExperience(int, std::vector &); + graphics::Sprite *BattleSprite(); const graphics::Sprite *BattleSprite() const; graphics::Animation *MeleeAnimation(); @@ -77,6 +95,11 @@ private: graphics::Animation *attackAnimation; graphics::Animation *spellAnimation; + const common::Item *upgradeItem; + int upgradeClass; + int hunger; + int hungerFull; + int healthBoost; Stats statBoost; }; @@ -87,7 +110,7 @@ private: const char *name; const char *alignment; - geometry::Vector alignmentCursor; + math::Vector alignmentCursor; const graphics::Sprite *alignmentSprite; int maxHealth; @@ -107,4 +130,4 @@ private: } -#endif /* COMMON_CAPSULE_H_ */ +#endif