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; }
29 const char *Name() const;
31 const graphics::Sprite *Sprite();
33 Uint16 MaxHealth() const;
34 Uint16 Health() const;
35 int RelativeHealth(int max) const;
36 void SubtractHealth(int amount);
38 common::Stats &GetStats() { return stats; }
39 const common::Stats &GetStats() const { return stats; }
41 graphics::AnimationRunner &GetAnimation() { return animation; }
42 const graphics::AnimationRunner &GetAnimation() const { return animation; }
43 void SetAnimation(const graphics::AnimationRunner &a) { animation = a; }
45 const graphics::Animation *MeleeAnimation() const;
46 const graphics::Animation *AttackAnimation() const;
47 const graphics::Animation *SpellAnimation() const;
49 math::Vector<int> &Position() { return position; }
50 const math::Vector<int> &Position() const { return position; }
52 AttackChoice &GetAttackChoice() { return attackChoice; }
53 const AttackChoice &GetAttackChoice() const { return attackChoice; }
56 common::Capsule *master;
60 graphics::AnimationRunner animation;
61 math::Vector<int> position;
62 AttackChoice attackChoice;