1 #ifndef BATTLE_CAPSULE_H_
2 #define BATTLE_CAPSULE_H_
8 #include "AttackChoice.h"
9 #include "../common/Stats.h"
10 #include "../geometry/Vector.h"
11 #include "../graphics/Animation.h"
12 #include "../graphics/fwd.h"
13 #include "../graphics/Menu.h"
20 Capsule(common::Capsule *master = 0);
23 bool Active() const { return master; }
25 const char *Name() const;
27 const graphics::Sprite *Sprite();
29 Uint16 MaxHealth() const;
30 Uint16 Health() const;
31 int RelativeHealth(int max) const;
32 void SubtractHealth(int amount);
34 common::Stats &GetStats() { return stats; }
35 const common::Stats &GetStats() const { return stats; }
37 graphics::AnimationRunner &GetAnimation() { return animation; }
38 const graphics::AnimationRunner &GetAnimation() const { return animation; }
39 void SetAnimation(const graphics::AnimationRunner &a) { animation = a; }
41 const graphics::Animation *MeleeAnimation() const;
42 const graphics::Animation *AttackAnimation() const;
43 const graphics::Animation *SpellAnimation() const;
45 geometry::Vector<int> &Position() { return position; }
46 const geometry::Vector<int> &Position() const { return position; }
48 AttackChoice &GetAttackChoice() { return attackChoice; }
49 const AttackChoice &GetAttackChoice() const { return attackChoice; }
52 common::Capsule *master;
56 graphics::AnimationRunner animation;
57 geometry::Vector<int> position;
58 AttackChoice attackChoice;
65 #endif /* BATTLE_CAPSULE_H_ */