X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FCapsule.h;h=60d70d2c6b6fd6c2bd01aa4101bc7f170e37d363;hb=b9e715649b41cb69ea1b2d2a588522541eb87b46;hp=8d4791d20b2e4d20c2ed8c59dda9882115ce7bae;hpb=9666839d0ca6c794d28226a007870c82ef4ddb20;p=l2e.git diff --git a/src/common/Capsule.h b/src/common/Capsule.h index 8d4791d..60d70d2 100644 --- a/src/common/Capsule.h +++ b/src/common/Capsule.h @@ -1,13 +1,20 @@ #ifndef COMMON_CAPSULE_H_ #define COMMON_CAPSULE_H_ +namespace common { + class Item; + class LevelUp; + class Upgrade; +} namespace graphics { class Animation; class Sprite; } -#include "../common/Stats.h" +#include "Stats.h" +#include "../math/Vector.h" +#include #include namespace common { @@ -31,6 +38,28 @@ public: const Spell *Attack2() const; const Spell *Attack3() const; + int NumClasses() const { return numClasses; } + int MaxClass() const { return maxClass; } + int CurrentClass() const { return curClass; } + + 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; Stats GetStats() const; @@ -39,6 +68,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(); @@ -65,6 +96,11 @@ private: graphics::Animation *attackAnimation; graphics::Animation *spellAnimation; + const common::Item *upgradeItem; + int upgradeClass; + int hunger; + int hungerFull; + int healthBoost; Stats statBoost; }; @@ -75,6 +111,9 @@ private: const char *name; const char *alignment; + math::Vector alignmentCursor; + const graphics::Sprite *alignmentSprite; + int maxHealth; Stats stats; @@ -82,7 +121,7 @@ private: int level; int experience; - int *levelLadder; + LevelUp *levelLadder; int numLevels; Class *classes; @@ -92,4 +131,4 @@ private: } -#endif /* COMMON_CAPSULE_H_ */ +#endif