-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPickable.hpp
50 lines (43 loc) · 1.14 KB
/
Pickable.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
class Pickable : public Persistent {
public:
bool pick(Actor *owner, Actor *wearer);
virtual bool use(Actor *owner, Actor *wearer);
void drop(Actor *owner, Actor *wearer);
static Pickable *create(TCODZip &zip);
virtual ~Pickable() {}
protected:
enum PickableType {
HEALER,REMOTE_HACK,CONFUSER,TARGETED_HACK
};
};
class Healer : public Pickable {
public:
float amount; // how much hp
Healer(float amount);
bool use(Actor *owner, Actor *wearer);
void load(TCODZip &zip);
void save(TCODZip &zip);
};
class RemoteHack : public Pickable {
public:
float range,damage;
RemoteHack(float range, float damage);
bool use(Actor *owner, Actor *wearer);
void load(TCODZip &zip);
void save(TCODZip &zip);
};
class TargetedHack : public RemoteHack {
public:
TargetedHack(float range, float damage);
bool use(Actor *owner, Actor *wearer);
void save(TCODZip &zip);
};
class Confuser : public Pickable {
public:
int nbTurns;
float range;
Confuser(int nbTurns, float range);
bool use(Actor *owner, Actor *wearer);
void load(TCODZip &zip);
void save(TCODZip &zip);
};