1 #ifndef BATTLE_CAPSULE_H_
2 #define BATTLE_CAPSULE_H_
12 #include "AttackChoice.h"
13 #include "../common/Stats.h"
14 #include "../graphics/Animation.h"
15 #include "../graphics/Menu.h"
24 Capsule(common::Capsule *master = 0);
27 bool Active() const { return master; }
28 common::Capsule &Master() { return *master; }
29 const common::Capsule &Master() const { return *master; }
32 const char *Name() const;
34 const graphics::Sprite *Sprite() const;
36 Uint16 MaxHealth() const;
37 Uint16 Health() const;
38 int RelativeHealth(int max) const;
39 void SubtractHealth(int amount);
41 common::Stats &GetStats() { return stats; }
42 const common::Stats &GetStats() const { return stats; }
44 graphics::AnimationRunner &GetAnimation() { return animation; }
45 const graphics::AnimationRunner &GetAnimation() const { return animation; }
46 void SetAnimation(const graphics::AnimationRunner &a) { animation = a; }
48 const graphics::Animation *MeleeAnimation() const;
49 const graphics::Animation *AttackAnimation() const;
50 const graphics::Animation *SpellAnimation() const;
52 math::Vector<int> &Position() { return position; }
53 const math::Vector<int> &Position() const { return position; }
55 AttackChoice &GetAttackChoice() { return attackChoice; }
56 const AttackChoice &GetAttackChoice() const { return attackChoice; }
59 common::Capsule *master;
63 graphics::AnimationRunner animation;
64 math::Vector<int> position;
65 AttackChoice attackChoice;