]> git.localhorst.tv Git - l2e.git/blob - src/battle/AttackChoice.h
added item target selection
[l2e.git] / src / battle / AttackChoice.h
1 /*
2  * AttackChoice.h
3  *
4  *  Created on: Aug 7, 2012
5  *      Author: holy
6  */
7
8 #ifndef BATTLE_ATTACKCHOICE_H_
9 #define BATTLE_ATTACKCHOICE_H_
10
11 #include "TargetSelection.h"
12
13 namespace common { class Item; }
14
15 namespace battle {
16
17 class AttackChoice {
18
19 public:
20         enum Type {
21                 SWORD,
22                 MAGIC,
23                 DEFEND,
24                 IKARI,
25                 ITEM,
26                 UNDECIDED
27         };
28
29 public:
30         explicit AttackChoice(BattleState *b = 0) : thing(0), selection(b), type(UNDECIDED) { }
31         ~AttackChoice() { }
32
33 public:
34         Type GetType() const { return type; }
35         void SetType(Type t) { type = t; }
36         const common::Item *GetItem() const { return (const common::Item *)thing; }
37         void SetItem(const common::Item *i) { thing = i; }
38         TargetSelection &Selection() { return selection; }
39         const TargetSelection &Selection() const { return selection; }
40
41         void Reset();
42
43 private:
44         const void *thing;
45         TargetSelection selection;
46         Type type;
47
48 };
49
50 }
51
52 #endif /* BATTLE_ATTACKCHOICE_H_ */