X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FMonster.h;h=d3a7162111939c1f887cf4c63fa548f4575b0beb;hb=3c72a71fbf6de96333a641051a20c6bf8b3a5df3;hp=0b35d31b742d43ca17bc8b906717806ccea2eecd;hpb=5421c812b9fc64371c7f8ce3886b0b091eef458f;p=l2e.git diff --git a/src/battle/Monster.h b/src/battle/Monster.h index 0b35d31..d3a7162 100644 --- a/src/battle/Monster.h +++ b/src/battle/Monster.h @@ -27,11 +27,11 @@ public: Uint16 MaxHealth() const { return maxHealth; } Uint16 Health() const { return health; } - int RelativeHealth(int max) { return health * max / maxHealth; } + int RelativeHealth(int max) const { return health * max / maxHealth; } Uint16 MaxMana() const { return maxMana; } Uint16 Mana() const { return mana; } - int RelativeMana(int max) { return mana * max / maxMana; } + int RelativeMana(int max) const { return mana * max / maxMana; } Uint16 Attack() const { return attack; } Uint16 Defense() const { return defense; } @@ -49,6 +49,12 @@ public: const /* Script */ void *AttackScript() { return attackScript; } const /* Script */ void *DefenseScript() { return defenseScript; } +// temporary setters until loader is implemented +public: + void SetSprite(graphics::Sprite *s) { sprite = s; } + void SetMaxHealth(Uint16 m) { maxHealth = m; } + void SetHealth(Uint16 h) { health = h; } + private: const char *name; graphics::Sprite *sprite;