]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Hero.h
added simple attack animations
[l2e.git] / src / battle / Hero.h
index 60bca6dd544d009462d492ed7f0da9caf53a8327..11f1e332400eeed439b8fe021931af1dcd265d88 100644 (file)
@@ -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<const common::Spell *> spells;
-       // TODO: equipment list
+
+       int attackFrames;
+       int attackFrameTime;
+       int spellFrames;
+       int spellFrameTime;
 
        Uint16 maxHealth, health;
        Uint16 maxMana, mana;