]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/BattleState.h
randomized monsters' attack target selection
[l2e.git] / src / battle / BattleState.h
index f5268dda931b1403745f6f15dc6709ddac5f6cf2..4fd9a15165696399e2100190c51b77b7c1ff44b3 100644 (file)
@@ -78,7 +78,6 @@ public:
        virtual void UpdateWorld(float deltaT);
        virtual void Render(SDL_Surface *);
 
-       // TODO: turn this mess into a well stuctured interface
 public:
        const Resources &Res() const { return *res; }
        AttackTypeMenu &GetAttackTypeMenu() { return attackTypeMenu; }
@@ -109,7 +108,6 @@ public:
        int MaxHeroes() const { return 4; }
        int MaxMonsters() const { return monsters.size(); }
 
-       const std::vector<geometry::Point<int> > &MonsterPositions() const { return monsterPositions; }
        bool MonsterPositionOccupied(int index) { return index >= 0 && index < int(monsters.size()) && monsters[index].Health() > 0; }
        bool HeroPositionOccupied(int index) const { return index >= 0 && index < numHeroes; }
 
@@ -152,6 +150,7 @@ public:
 private:
        void LoadInventory();
 
+       void DecideMonsterAttack(Monster &);
        Uint16 CalculateDamage(const Stats &attacker, const Stats &defender) const;
 
 private:
@@ -161,8 +160,6 @@ private:
        const Resources *res;
        AttackTypeMenu attackTypeMenu;
        MoveMenu moveMenu;
-       // TODO: combine all data about heros or monsters
-       std::vector<geometry::Point<int> > monsterPositions;
        std::vector<Monster> monsters;
        std::vector<Order> attackOrder;
        Hero heroes[4];