]> git.localhorst.tv Git - l2e.git/blob - src/battle/AttackChoice.h
check tile lock in Entity
[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 #include "../common/fwd.h"
13
14 namespace battle {
15
16 class AttackChoice {
17
18 public:
19         enum Type {
20                 SWORD,
21                 MAGIC,
22                 DEFEND,
23                 IKARI,
24                 ITEM,
25                 UNDECIDED
26         };
27
28 public:
29         explicit AttackChoice(BattleState *b = 0) : thing(0), selection(b), type(UNDECIDED) { }
30         ~AttackChoice() { }
31
32 public:
33         Type GetType() const { return type; }
34         void SetType(Type t) { type = t; }
35         const common::Item *GetItem() const { return (const common::Item *)thing; }
36         void SetItem(const common::Item *i) { thing = i; }
37         const common::Spell *GetSpell() const { return (const common::Spell *)thing; }
38         void SetSpell(const common::Spell *s) { thing = s; }
39         TargetSelection &Selection() { return selection; }
40         const TargetSelection &Selection() const { return selection; }
41
42         void Reset();
43
44 private:
45         const void *thing;
46         TargetSelection selection;
47         Type type;
48
49 };
50
51 }
52
53 #endif /* BATTLE_ATTACKCHOICE_H_ */