X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FCapsule.h;h=bf99cfa1ad376660c322c97640515ec9b71f4dce;hb=c5e56f45e08fcc6c4dceb586ce3d671a3f3907ab;hp=b1039fa90e2474fe94d54204726a79d36af88a6d;hpb=67f6bb1d9727e7d1e2140cf2913aa89ebba84bf5;p=l2e.git diff --git a/src/common/Capsule.h b/src/common/Capsule.h index b1039fa..bf99cfa 100644 --- a/src/common/Capsule.h +++ b/src/common/Capsule.h @@ -1,12 +1,16 @@ #ifndef COMMON_CAPSULE_H_ #define COMMON_CAPSULE_H_ +namespace common { + class Item; +} namespace graphics { class Animation; class Sprite; } #include "../common/Stats.h" +#include "../geometry/Vector.h" #include @@ -23,6 +27,7 @@ public: Capsule(); const char *Name() const { return name; } + void SetName(const char *n) { name = n; } const char *ClassName() const; const char *Alignment() const { return alignment; } const char *Tribe() const; @@ -30,6 +35,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 geometry::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; @@ -64,6 +91,11 @@ private: graphics::Animation *attackAnimation; graphics::Animation *spellAnimation; + const common::Item *upgradeItem; + int upgradeClass; + int hunger; + int hungerFull; + int healthBoost; Stats statBoost; }; @@ -74,6 +106,9 @@ private: const char *name; const char *alignment; + geometry::Vector alignmentCursor; + const graphics::Sprite *alignmentSprite; + int maxHealth; Stats stats;