]> git.localhorst.tv Git - l2e.git/blob - src/common/Spell.h
switched to static type IDs
[l2e.git] / src / common / Spell.h
1 /*
2  * Spell.h
3  *
4  *  Created on: Aug 10, 2012
5  *      Author: holy
6  */
7
8 #ifndef COMMON_SPELL_H_
9 #define COMMON_SPELL_H_
10
11 #include "HeroGroup.h"
12 #include "TargetingMode.h"
13
14 namespace common {
15
16 class Spell {
17
18 public:
19         static const int TYPE_ID = 304;
20
21 public:
22         Spell();
23
24 public:
25         const char *Name() const { return name; }
26         Uint16 Value() const { return value; }
27         Uint8 Cost() const { return cost; }
28
29         bool CanUseOnStatusScreen() const { return status; }
30         bool CanUseInBattle() const { return battle; }
31
32         TargetingMode &GetTargetingMode() { return targetingMode; }
33         const TargetingMode &GetTargetingMode() const { return targetingMode; }
34
35         HeroGroup &UsableBy() { return usableBy; }
36         const HeroGroup &UsableBy() const { return usableBy; }
37
38 // temporary setters
39 public:
40         void SetName(const char *n) { name = n; }
41         void SetCost(Uint8 c) { cost = c; }
42         void SetUsableInBattle() { battle = true; }
43
44         static void CreateTypeDescription();
45         static void Construct(void *);
46
47 private:
48         const char *name;
49
50         int value;
51
52         int cost;
53         TargetingMode targetingMode;
54         HeroGroup usableBy;
55
56         bool status;
57         bool battle;
58
59 };
60
61 }
62
63 #endif /* COMMON_SPELL_H_ */