X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FCapsule.h;h=1e2a6311f07fe1f27ad871a527f24567f575fa21;hb=3d69f521b593457304b282e5f23e36ab165288b6;hp=c70d07fdf28cb41368160f3dfb314208dcf2e68a;hpb=6dff93b1a6e9b727dbe26747456f4b23efca86da;p=l2e.git diff --git a/src/common/Capsule.h b/src/common/Capsule.h index c70d07f..1e2a631 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; + class Upgrade; +} namespace graphics { class Animation; class Sprite; } #include "../common/Stats.h" -#include "../geometry/Vector.h" +#include "../math/Vector.h" +#include #include namespace common { @@ -36,10 +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; @@ -49,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(); @@ -75,6 +95,11 @@ private: graphics::Animation *attackAnimation; graphics::Animation *spellAnimation; + const common::Item *upgradeItem; + int upgradeClass; + int hunger; + int hungerFull; + int healthBoost; Stats statBoost; }; @@ -85,7 +110,7 @@ private: const char *name; const char *alignment; - geometry::Vector alignmentCursor; + math::Vector alignmentCursor; const graphics::Sprite *alignmentSprite; int maxHealth; @@ -105,4 +130,4 @@ private: } -#endif /* COMMON_CAPSULE_H_ */ +#endif