]> git.localhorst.tv Git - l2e.git/blob - src/common/Spell.h
f300197427c2d9567ec5c7b878675e7aed3006c4
[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 "TargetingMode.h"
12
13 namespace common {
14
15 class Spell {
16
17 public:
18         static const int TYPE_ID = 304;
19
20 public:
21         Spell();
22
23 public:
24         const char *Name() const { return name; }
25         Uint16 Value() const { return value; }
26         Uint8 Cost() const { return cost; }
27
28         bool CanUseOnStatusScreen() const { return status; }
29         bool CanUseInBattle() const { return battle; }
30
31         TargetingMode &GetTargetingMode() { return targetingMode; }
32         const TargetingMode &GetTargetingMode() const { return targetingMode; }
33
34         int HeroMask() const { return heroMask; }
35
36         static bool Less(const Spell *, const Spell *);
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         int heroMask;
55
56         bool status;
57         bool battle;
58
59 };
60
61 }
62
63 #endif /* COMMON_SPELL_H_ */