]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Capsule.h
put stat increments in level ladder
[l2e.git] / src / common / Capsule.h
index ef4caf687a36af03385b4f4726444da2105a6b93..60d70d2c6b6fd6c2bd01aa4101bc7f170e37d363 100644 (file)
@@ -3,15 +3,18 @@
 
 namespace common {
        class Item;
+       class LevelUp;
+       class Upgrade;
 }
 namespace graphics {
        class Animation;
        class Sprite;
 }
 
-#include "../common/Stats.h"
-#include "../geometry/Vector.h"
+#include "Stats.h"
+#include "../math/Vector.h"
 
+#include <vector>
 #include <SDL.h>
 
 namespace common {
@@ -39,7 +42,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();
@@ -54,6 +57,9 @@ public:
        bool IsHungry() const;
        void Feed(const common::Item *);
 
+       const common::Item *UpgradeItem() const;
+       void UpgradeSpecial();
+
        Uint16 MaxHealth() const;
 
        Stats GetStats() const;
@@ -62,6 +68,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();
@@ -88,6 +96,8 @@ private:
                graphics::Animation *attackAnimation;
                graphics::Animation *spellAnimation;
 
+               const common::Item *upgradeItem;
+               int upgradeClass;
                int hunger;
                int hungerFull;
 
@@ -101,7 +111,7 @@ private:
        const char *name;
        const char *alignment;
 
-       geometry::Vector<int> alignmentCursor;
+       math::Vector<int> alignmentCursor;
        const graphics::Sprite *alignmentSprite;
 
        int maxHealth;
@@ -111,7 +121,7 @@ private:
        int level;
        int experience;
 
-       int *levelLadder;
+       LevelUp *levelLadder;
        int numLevels;
 
        Class *classes;
@@ -121,4 +131,4 @@ private:
 
 }
 
-#endif /* COMMON_CAPSULE_H_ */
+#endif