X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FTargetSelection.h;h=dc03285ced2c7884b8f67bdb412d1c896cbabe13;hb=cc3d698b8c1ad09d7a3f9e3f28bc84e0ac1735ea;hp=70c95b52a469ad9f5280aa1ed554ba911c7fbe8a;hpb=fbf5a98f8fd0da951e469003fe87d575a6bb30a4;p=l2e.git diff --git a/src/battle/TargetSelection.h b/src/battle/TargetSelection.h index 70c95b5..dc03285 100644 --- a/src/battle/TargetSelection.h +++ b/src/battle/TargetSelection.h @@ -1,27 +1,21 @@ -/* - * TargetSelection.h - * - * Created on: Aug 9, 2012 - * Author: holy - */ - #ifndef BATTLE_TARGETSELECTION_H_ #define BATTLE_TARGETSELECTION_H_ +#include "fwd.h" +#include "../common/fwd.h" + #include namespace battle { -class BattleState; - class TargetSelection { public: explicit TargetSelection(BattleState *battle = 0, bool multiple = false, bool atEnemy = true); public: - bool TargetsEnemies() const { return enemy; } - bool TargetsHeroes() const { return !TargetsEnemies(); } + bool TargetsMonsters() const { return enemy; } + bool TargetsHeroes() const { return !TargetsMonsters(); } bool IsSelected(int index) const { return index >= 0 && index < int(selected.size()) && selected[index].type != State::IGNORE; } bool HasSelected() const { return selection >= 0; } int SingleSelection() const { return selection; } @@ -31,7 +25,9 @@ public: bool SelectSingle() const { return !SelectMultiple(); } void SetSingle() { multiple = false; } - void SelectEnemies(); + void ReadMode(const common::TargetingMode &); + + void SelectMonsters(); void SelectHeroes(); void Select(int index) { selected[index].type = State::SELECTED; selection = index; } void Unselect(int index) { selected[index].type = State::IGNORE; }