1 #ifndef COMMON_CAPSULE_H_
2 #define COMMON_CAPSULE_H_
12 #include "../common/Stats.h"
13 #include "../geometry/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 geometry::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 Uint16 MaxHealth() const;
59 Stats GetStats() const;
61 Uint8 Level() const { return level; }
62 int Experience() const { return experience; }
63 int NextLevel() const;
65 graphics::Sprite *BattleSprite();
66 const graphics::Sprite *BattleSprite() const;
67 graphics::Animation *MeleeAnimation();
68 graphics::Animation *AttackAnimation();
69 graphics::Animation *SpellAnimation();
71 static void CreateTypeDescription();
72 static void Construct(void *);
76 static const int TYPE_ID = 308;
80 static void CreateTypeDescription();
81 static void Construct(void *);
86 graphics::Sprite *battleSprite;
87 graphics::Animation *meleeAnimation;
88 graphics::Animation *attackAnimation;
89 graphics::Animation *spellAnimation;
99 const Class &GetClass() const;
102 const char *alignment;
104 geometry::Vector<int> alignmentCursor;
105 const graphics::Sprite *alignmentSprite;
118 int numClasses, curClass, maxClass;
124 #endif /* COMMON_CAPSULE_H_ */