1 #ifndef COMMON_CAPSULE_H_
2 #define COMMON_CAPSULE_H_
15 #include "../math/Vector.h"
27 static const int TYPE_ID = 307;
32 const char *Name() const { return name; }
33 void SetName(const char *n) { name = n; }
34 const char *ClassName() const;
35 const char *Alignment() const { return alignment; }
36 const char *Tribe() const;
37 const Spell *Attack1() const;
38 const Spell *Attack2() const;
39 const Spell *Attack3() const;
41 int NumClasses() const { return numClasses; }
42 int MaxClass() const { return maxClass; }
43 int CurrentClass() const { return curClass; }
45 const math::Vector<int> &AlignmentOffset() const { return alignmentCursor; }
46 const graphics::Sprite *AlignmentSprite() const { return alignmentSprite; }
51 int ClassIndex() const { return curClass; }
52 void SetClass(int index);
54 int HungerEmpty() const;
55 int HungerTotal() const;
56 int HungerFull() const;
57 bool IsHungry() const;
58 void Feed(const common::Item *);
60 const common::Item *UpgradeItem() const;
61 void UpgradeSpecial();
63 Uint16 MaxHealth() const;
65 Stats GetStats() const;
67 Uint8 Level() const { return level; }
68 int Experience() const { return experience; }
69 int NextLevel() const;
71 void AddExperience(int, std::vector<Upgrade> &);
73 graphics::Sprite *BattleSprite();
74 const graphics::Sprite *BattleSprite() const;
75 graphics::Animation *MeleeAnimation();
76 graphics::Animation *AttackAnimation();
77 graphics::Animation *SpellAnimation();
79 static void CreateTypeDescription();
80 static void Construct(void *);
84 static const int TYPE_ID = 308;
88 static void CreateTypeDescription();
89 static void Construct(void *);
94 graphics::Sprite *battleSprite;
95 graphics::Animation *meleeAnimation;
96 graphics::Animation *attackAnimation;
97 graphics::Animation *spellAnimation;
99 const common::Item *upgradeItem;
109 const Class &GetClass() const;
112 const char *alignment;
114 math::Vector<int> alignmentCursor;
115 const graphics::Sprite *alignmentSprite;
124 LevelUp *levelLadder;
128 int numClasses, curClass, maxClass;