]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Capsule.h
moved upgrade process to battle class
[l2e.git] / src / common / Capsule.h
index f68ba5301a52ef2b4b7b4503c185996ac13c2f46..1e2a6311f07fe1f27ad871a527f24567f575fa21 100644 (file)
@@ -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 <vector>
 #include <SDL.h>
 
 namespace common {
@@ -36,7 +41,7 @@ public:
        int MaxClass() const { return maxClass; }
        int CurrentClass() const { return curClass; }
 
-       const geometry::Vector<int> &AlignmentOffset() const { return alignmentCursor; }
+       const math::Vector<int> &AlignmentOffset() const { return alignmentCursor; }
        const graphics::Sprite *AlignmentSprite() const { return alignmentSprite; }
 
        void UpgradeClass();
@@ -45,6 +50,15 @@ public:
        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;
@@ -53,6 +67,8 @@ public:
        int Experience() const { return experience; }
        int NextLevel() const;
 
+       void AddExperience(int, std::vector<Upgrade> &);
+
        graphics::Sprite *BattleSprite();
        const graphics::Sprite *BattleSprite() const;
        graphics::Animation *MeleeAnimation();
@@ -79,6 +95,11 @@ private:
                graphics::Animation *attackAnimation;
                graphics::Animation *spellAnimation;
 
+               const common::Item *upgradeItem;
+               int upgradeClass;
+               int hunger;
+               int hungerFull;
+
                int healthBoost;
                Stats statBoost;
        };
@@ -89,7 +110,7 @@ private:
        const char *name;
        const char *alignment;
 
-       geometry::Vector<int> alignmentCursor;
+       math::Vector<int> alignmentCursor;
        const graphics::Sprite *alignmentSprite;
 
        int maxHealth;
@@ -109,4 +130,4 @@ private:
 
 }
 
-#endif /* COMMON_CAPSULE_H_ */
+#endif