-
Notifications
You must be signed in to change notification settings - Fork 30
/
status_effect.h
59 lines (47 loc) · 1.66 KB
/
status_effect.h
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
51
52
53
54
55
56
57
58
59
#ifndef _STATUS_EFFECT_H_
#define _STATUS_EFFECT_H_
#include <string>
#include <istream>
#include <vector>
struct Stats;
enum Status_effect_type
{
STATUS_NULL = 0,
STATUS_BLIND, // "blind" - lose sense of sight
STATUS_CAFFEINE, // "caffeine" - minor speed & stat boost
STATUS_NICOTINE, // "nicotine" - minor stat boost
STATUS_STIMULANT, // "stimulant" - larger speed & stat boost
STATUS_SLEEP_AID, // "sleep_aid" - gain fatigue faster
STATUS_PAINKILL_MILD, // "painkill_mild" - lift painkill to 10
STATUS_PAINKILL_MED, // "painkill_med" - lift painkill to 50
STATUS_PAINKILL_LONG, // "painkill_long" - lift painkill to 40 & stay there
STATUS_PAINKILL_HEAVY,// "painkill_heavy" - lift painkill to 100
STATUS_DRUNK, // "drunk" - stat loss, mild painkiller
STATUS_MAX
};
Status_effect_type lookup_status_effect(std::string name);
std::string status_effect_name(Status_effect_type type);
std::string status_effect_display_name(Status_effect_type type);
struct Status_effect
{
Status_effect();
Status_effect(Status_effect_type _type, int _duration, int _level = 1);
~Status_effect();
Status_effect& operator=(const Status_effect& rhs);
bool load_data(std::istream& data, std::string owner_name);
std::string get_name();
std::string get_display_name();
std::string get_description();
void boost(int dur, int lev = 1);
void boost(const Status_effect& rhs);
// Returns true if timed out
bool decrement();
// Simple effects - for active use and info screens
int speed_mod();
Stats stats_mod();
Status_effect_type type;
int duration;
std::vector<int> step_down; // The duration(s) at which we lose a level.
int level;
};
#endif