]> git.localhorst.tv Git - l2e.git/blob - src/common/Spell.h
e9befa900184ce499ba8135aea6a7e940a0a3bb6
[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         static bool Less(const Spell *, const Spell *);
39
40 // temporary setters
41 public:
42         void SetName(const char *n) { name = n; }
43         void SetCost(Uint8 c) { cost = c; }
44         void SetUsableInBattle() { battle = true; }
45
46         static void CreateTypeDescription();
47         static void Construct(void *);
48
49 private:
50         const char *name;
51
52         int value;
53
54         int cost;
55         TargetingMode targetingMode;
56         HeroGroup usableBy;
57
58         bool status;
59         bool battle;
60
61 };
62
63 }
64
65 #endif /* COMMON_SPELL_H_ */