1 #ifndef COMMON_CAPSULE_H_
2 #define COMMON_CAPSULE_H_
12 #include "../common/Stats.h"
13 #include "../math/Vector.h"
24 static const int TYPE_ID = 307;
29 const char *Name() const { return name; }
30 void SetName(const char *n) { name = n; }
31 const char *ClassName() const;
32 const char *Alignment() const { return alignment; }
33 const char *Tribe() const;
34 const Spell *Attack1() const;
35 const Spell *Attack2() const;
36 const Spell *Attack3() const;
38 int NumClasses() const { return numClasses; }
39 int MaxClass() const { return maxClass; }
40 int CurrentClass() const { return curClass; }
42 const math::Vector<int> &AlignmentOffset() const { return alignmentCursor; }
43 const graphics::Sprite *AlignmentSprite() const { return alignmentSprite; }
48 int ClassIndex() const { return curClass; }
49 void SetClass(int index);
51 int HungerEmpty() const;
52 int HungerTotal() const;
53 int HungerFull() const;
54 bool IsHungry() const;
55 void Feed(const common::Item *);
57 const common::Item *UpgradeItem() const;
58 void UpgradeSpecial();
60 Uint16 MaxHealth() const;
62 Stats GetStats() const;
64 Uint8 Level() const { return level; }
65 int Experience() const { return experience; }
66 int NextLevel() const;
68 graphics::Sprite *BattleSprite();
69 const graphics::Sprite *BattleSprite() const;
70 graphics::Animation *MeleeAnimation();
71 graphics::Animation *AttackAnimation();
72 graphics::Animation *SpellAnimation();
74 static void CreateTypeDescription();
75 static void Construct(void *);
79 static const int TYPE_ID = 308;
83 static void CreateTypeDescription();
84 static void Construct(void *);
89 graphics::Sprite *battleSprite;
90 graphics::Animation *meleeAnimation;
91 graphics::Animation *attackAnimation;
92 graphics::Animation *spellAnimation;
94 const common::Item *upgradeItem;
104 const Class &GetClass() const;
107 const char *alignment;
109 math::Vector<int> alignmentCursor;
110 const graphics::Sprite *alignmentSprite;
123 int numClasses, curClass, maxClass;