X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHero.h;h=11f1e332400eeed439b8fe021931af1dcd265d88;hb=f615f4edc547d1ca74275382cc7a9cdd8cf30ba6;hp=60bca6dd544d009462d492ed7f0da9caf53a8327;hpb=fb285efc25fccb50a2f1afb96fc1afe95f2d0ef1;p=l2e.git diff --git a/src/battle/Hero.h b/src/battle/Hero.h index 60bca6d..11f1e33 100644 --- a/src/battle/Hero.h +++ b/src/battle/Hero.h @@ -41,7 +41,7 @@ public: int RelativeMana(int max) const { return MaxMana() == 0 ? 0 : Mana() * max / MaxMana(); } bool CanUseMagic() const { return MaxMana() > 0; } - Uint8 MaxIP() const { return 100; } + Uint8 MaxIP() const { return 255; } Uint8 IP() const { return ip; } int RelativeIP(int max) const { return IP() * max / MaxIP(); } @@ -66,6 +66,11 @@ public: bool HasRing() const { return ring; } bool HasJewel() const { return jewel; } + int AttackFrames() const { return attackFrames; } + int AttackFrameTime() const { return attackFrameTime; } + int SpellFrames() const { return spellFrames; } + int SpellFrameTime() const { return spellFrameTime; } + // temporary setters until loader is implemented public: void SetName(const char *n) { name = n; } @@ -87,6 +92,9 @@ public: void AddSpell(const common::Spell *s) { spells.push_back(s); } + void SetAttackFrames(int num, int time) { attackFrames = num; attackFrameTime = time; } + void SetSpellFrames(int num, int time) { spellFrames = num; spellFrameTime = time; } + private: const char *name; graphics::Sprite *sprite; @@ -100,7 +108,11 @@ private: // TODO: vector does not seem to be a good choice std::vector spells; - // TODO: equipment list + + int attackFrames; + int attackFrameTime; + int spellFrames; + int spellFrameTime; Uint16 maxHealth, health; Uint16 maxMana, mana;