1 #ifndef COMMON_CAPSULE_H_
2 #define COMMON_CAPSULE_H_
13 #include "../common/Stats.h"
14 #include "../math/Vector.h"
26 static const int TYPE_ID = 307;
31 const char *Name() const { return name; }
32 void SetName(const char *n) { name = n; }
33 const char *ClassName() const;
34 const char *Alignment() const { return alignment; }
35 const char *Tribe() const;
36 const Spell *Attack1() const;
37 const Spell *Attack2() const;
38 const Spell *Attack3() const;
40 int NumClasses() const { return numClasses; }
41 int MaxClass() const { return maxClass; }
42 int CurrentClass() const { return curClass; }
44 const math::Vector<int> &AlignmentOffset() const { return alignmentCursor; }
45 const graphics::Sprite *AlignmentSprite() const { return alignmentSprite; }
50 int ClassIndex() const { return curClass; }
51 void SetClass(int index);
53 int HungerEmpty() const;
54 int HungerTotal() const;
55 int HungerFull() const;
56 bool IsHungry() const;
57 void Feed(const common::Item *);
59 const common::Item *UpgradeItem() const;
60 void UpgradeSpecial();
62 Uint16 MaxHealth() const;
64 Stats GetStats() const;
66 Uint8 Level() const { return level; }
67 int Experience() const { return experience; }
68 int NextLevel() const;
70 void AddExperience(int, std::vector<Hero::UpgradeInfo> &);
72 graphics::Sprite *BattleSprite();
73 const graphics::Sprite *BattleSprite() const;
74 graphics::Animation *MeleeAnimation();
75 graphics::Animation *AttackAnimation();
76 graphics::Animation *SpellAnimation();
78 static void CreateTypeDescription();
79 static void Construct(void *);
83 static const int TYPE_ID = 308;
87 static void CreateTypeDescription();
88 static void Construct(void *);
93 graphics::Sprite *battleSprite;
94 graphics::Animation *meleeAnimation;
95 graphics::Animation *attackAnimation;
96 graphics::Animation *spellAnimation;
98 const common::Item *upgradeItem;
108 const Class &GetClass() const;
111 const char *alignment;
113 math::Vector<int> alignmentCursor;
114 const graphics::Sprite *alignmentSprite;
127 int numClasses, curClass, maxClass;