]> git.localhorst.tv Git - l2e.git/blob - src/common/Ikari.h
557e77d857baf9f2d8e63b00fa1ca7c565ebd3a7
[l2e.git] / src / common / Ikari.h
1 /*
2  * Ikari.h
3  *
4  *  Created on: Aug 10, 2012
5  *      Author: holy
6  */
7
8 #ifndef COMMON_IKARI_H_
9 #define COMMON_IKARI_H_
10
11 #include "TargetingMode.h"
12
13 namespace common {
14
15 // TODO: looks like Ikari and Spell have _quite_ a lot in common…
16 class Ikari {
17
18 public:
19         static const int TYPE_ID = 302;
20
21 public:
22         Ikari();
23
24 public:
25         const char *Name() const { return name; }
26         Uint8 Cost() const { return cost; }
27
28         TargetingMode &GetTargetingMode() { return targetingMode; }
29         const TargetingMode &GetTargetingMode() const { return targetingMode; }
30
31         bool IsMagical() const { return !isPhysical; }
32         bool IsPhysical() const { return isPhysical; }
33
34 // temporary setters
35 public:
36         void SetName(const char *n) { name = n; }
37         void SetCost(Uint8 c) { cost = c; }
38         void SetMagical() { isPhysical = false; }
39         void SetPhysical() { isPhysical = true; }
40
41         static void CreateTypeDescription();
42         static void Construct(void *);
43
44 private:
45         const char *name;
46
47         int cost;
48         TargetingMode targetingMode;
49
50         bool isPhysical;
51
52 };
53
54 }
55
56 #endif /* COMMON_IKARI_H_ */