]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.h
run monsters' attack animation
[l2e.git] / src / battle / BattleState.h
index 5898a2d4aa93920ffc9a5a20a1d366240d46de5c..578098fa40f4d6c86c1ee41628be71ba231314fe 100644 (file)
@@ -41,6 +41,7 @@ namespace graphics {
 namespace battle {
 
 class PartyLayout;
+class Stats;
 
 class BattleState
 : public app::State {
@@ -130,9 +131,13 @@ public:
        void NextAttack();
        bool AttacksFinished() const { return attackCursor >= int(attackOrder.size()); }
        void CalculateDamage();
+       void ApplyDamage();
        const Order &CurrentAttack() const { return attackOrder[attackCursor]; };
        void ClearAllAttacks();
 
+       bool Victory() const;
+       bool Defeat() const;
+
 public:
        geometry::Vector<int> CalculateScreenOffset(SDL_Surface *screen) const {
                return geometry::Vector<int>(
@@ -153,6 +158,8 @@ private:
        void LoadIkariMenu(std::vector<Hero>::size_type heroIndex);
        void LoadInventory();
 
+       Uint16 CalculateDamage(const Stats &attacker, const Stats &defender) const;
+
 private:
        SDL_Surface *background;
        const PartyLayout *monstersLayout;