]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/TargetSelection.h
added target selection type detection for weapons
[l2e.git] / src / battle / TargetSelection.h
index 64500b0b02aca225a117e2005d60f881f63fae11..b57a41df26c5d3ab80bd772b876f07221185cb02 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <vector>
 
+namespace common { class TargetingMode; }
+
 namespace battle {
 
 class BattleState;
@@ -31,6 +33,8 @@ public:
        bool SelectSingle() const { return !SelectMultiple(); }
        void SetSingle() { multiple = false; }
 
+       void ReadMode(const common::TargetingMode &);
+
        void SelectEnemies();
        void SelectHeroes();
        void Select(int index) { selected[index].type = State::SELECTED; selection = index; }
@@ -54,6 +58,9 @@ public:
        void SetGood(int index, int amount) { selected[index].type = State::GOOD; selected[index].number = amount; }
        void SetBad(int index, int amount) { selected[index].type = State::BAD; selected[index].number = amount; }
        int GetAmount(int index) const { return selected[index].number; }
+       bool Missed(int index) const { return selected[index].type == State::MISS; }
+       bool IsGood(int index) const { return selected[index].type == State::GOOD; }
+       bool IsBad(int index) const { return selected[index].type == State::BAD; }
 
 private:
        void FindNextEnemy();