]> git.localhorst.tv Git - l2e.git/blob - src/common/Spell.h
d9601260a007e84ae482c5ffeedcf35d8ad2c99a
[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         Spell();
20
21 public:
22         const char *Name() const { return name; }
23         Uint16 Value() const { return value; }
24         Uint8 Cost() const { return cost; }
25
26         bool CanUseOnStatusScreen() const { return status; }
27         bool CanUseInBattle() const { return battle; }
28
29         TargetingMode &GetTargetingMode() { return targetingMode; }
30         const TargetingMode &GetTargetingMode() const { return targetingMode; }
31
32         HeroGroup &UsableBy() { return usableBy; }
33         const HeroGroup &UsableBy() const { return usableBy; }
34
35 // temporary setters
36 public:
37         void SetName(const char *n) { name = n; }
38         void SetCost(Uint8 c) { cost = c; }
39         void SetUsableInBattle() { battle = true; }
40
41         static void CreateTypeDescription();
42         static void Construct(void *);
43
44 private:
45         const char *name;
46
47         int value;
48
49         int cost;
50         TargetingMode targetingMode;
51         HeroGroup usableBy;
52
53         bool status;
54         bool battle;
55
56 };
57
58 }
59
60 #endif /* COMMON_SPELL_H_ */