4 * Created on: Aug 3, 2012
8 #ifndef BATTLE_MONSTER_H_
9 #define BATTLE_MONSTER_H_
13 namespace graphics { class Sprite; }
24 const char *Name() const { return name; }
25 Uint8 Level() const { return level; }
26 const graphics::Sprite *Sprite() const { return sprite; }
28 Uint16 MaxHealth() const { return maxHealth; }
29 Uint16 Health() const { return health; }
30 int RelativeHealth(int max) const { return health * max / maxHealth; }
32 Uint16 MaxMana() const { return maxMana; }
33 Uint16 Mana() const { return mana; }
34 int RelativeMana(int max) const { return mana * max / maxMana; }
36 Uint16 Attack() const { return attack; }
37 Uint16 Defense() const { return defense; }
38 Uint16 Agility() const { return agility; }
39 Uint16 Intelligence() const { return intelligence; }
40 Uint16 Gut() const { return gut; }
41 Uint16 MagicResistance() const { return magicResistance; }
43 Uint16 ExpReward() const { return expReward; }
44 Uint16 GoldReward() const { return goldReward; }
46 const /* Item */ void *DropItem() const { return dropItem; }
47 Uint8 DropChance() const { return dropChance; }
49 const /* Script */ void *AttackScript() { return attackScript; }
50 const /* Script */ void *DefenseScript() { return defenseScript; }
52 // temporary setters until loader is implemented
54 void SetName(const char *n) { name = n; }
55 void SetSprite(graphics::Sprite *s) { sprite = s; }
56 void SetMaxHealth(Uint16 m) { maxHealth = m; }
57 void SetHealth(Uint16 h) { health = h; }
61 graphics::Sprite *sprite;
62 /* Item */ void *dropItem;
63 /* Script */ void *attackScript;
64 /* Script */ void *defenseScript;
66 Uint16 maxHealth, health;
74 Uint16 magicResistance;
76 Uint16 expReward, goldReward;
85 #endif /* BATTLE_MONSTER_H_ */