X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FMonster.h;h=f37786a076f3f8618449a7148a2faf8539716ff8;hb=8f6a2452408f4ae35396cd7008a6fab0ecb03a46;hp=e77a14b9e326a1e4eae1ec1fb980bafcbe271a0e;hpb=509ef53f0adeb204167aabe1715f3a230f8c59fe;p=l2e.git diff --git a/src/battle/Monster.h b/src/battle/Monster.h index e77a14b..f37786a 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; } @@ -51,7 +51,10 @@ public: // temporary setters until loader is implemented public: + void SetName(const char *n) { name = n; } void SetSprite(graphics::Sprite *s) { sprite = s; } + void SetMaxHealth(Uint16 m) { maxHealth = m; } + void SetHealth(Uint16 h) { health = h; } private: const char *name;