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