-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathenum.h
More file actions
166 lines (146 loc) · 4.78 KB
/
Copy pathenum.h
File metadata and controls
166 lines (146 loc) · 4.78 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#ifndef _ENUM_H_
#define _ENUM_H_
#include <string>
#include <vector> // For get_body_part_list
// TODO: Remove these. For now I'm not sure how to specify them, but no.
#define SIGHT_DIST 20
enum Sense_type
{
SENSE_NULL = 0, // Can't sense anything
SENSE_SIGHT, // Blocked by opaque terrain
SENSE_SOUND, // Semi-blocked by solid terrain, only shows noise sources
SENSE_ECHOLOCATION, // Blocked by solid terrain
SENSE_SMELL, // Blocked by solid terrain, only shows scent
SENSE_INFRARED, // Not blocked, but only works on warm-blooded targets
SENSE_OMNISCIENT, // Not blocked by anything!
SENSE_MAX
};
Sense_type lookup_sense_type(std::string name);
std::string sense_type_name(Sense_type type);
enum Body_part
{
BODY_PART_NULL = 0,
BODY_PART_HEAD,
BODY_PART_EYES,
BODY_PART_MOUTH,
BODY_PART_TORSO,
BODY_PART_LEFT_HAND,
BODY_PART_RIGHT_HAND,
BODY_PART_LEFT_ARM,
BODY_PART_RIGHT_ARM,
BODY_PART_LEFT_FOOT,
BODY_PART_RIGHT_FOOT,
BODY_PART_LEFT_LEG,
BODY_PART_RIGHT_LEG,
BODY_PART_MAX
};
Body_part lookup_body_part(std::string name);
std::string body_part_name(Body_part part);
// get_body_part_list provides support for "legs" referring to both legs, etc.
std::vector<Body_part> get_body_part_list(std::string name);
// A description of what protection on this part means.
std::string get_protection_meaning(Body_part part);
Body_part random_head_part();
Body_part random_extremity();
enum HP_part
{
HP_PART_NULL = 0,
HP_PART_HEAD,
HP_PART_TORSO,
HP_PART_LEFT_ARM,
HP_PART_RIGHT_ARM,
HP_PART_LEFT_LEG,
HP_PART_RIGHT_LEG,
HP_PART_MAX
};
HP_part lookup_HP_part(std::string name);
std::string HP_part_name(HP_part part);
HP_part convert_to_HP(Body_part part);
// TODO: Fire damage? Acid damage? etc etc
enum Damage_type
{
DAMAGE_NULL = 0,
DAMAGE_BASH,
DAMAGE_CUT,
DAMAGE_PIERCE,
DAMAGE_FIRE,
DAMAGE_MAX
};
Damage_type lookup_damage_type(std::string name);
std::string damage_type_name(Damage_type type);
// Terrain_flag has its lookup and name functions in terrain.cpp
enum Terrain_flag
{
TF_NULL,
TF_OPAQUE, // "opaque" - Blocks sight
TF_FLOOR, // "floor" - Displays items on top of it
TF_MUTABLE, // "mutable" - May be changed by adjacency maps
TF_STAIRS_UP, // "stairs_up" - Can be climbed to gain a Z-level
TF_STAIRS_DOWN, // "stairs_down" - Can be climbed to lose a Z-level
TF_OPEN_SPACE, // "open_space" - Air. Shows Z-level below.
TF_WATER, // "water" - Swimmable. Puts out fire.
TF_FLAMMABLE, // "flammable" - Consumed by fire.
TF_CONTAINER, // "container" - Can hold items despite move_cost of 0
TF_PLURAL, // "plural" - Indefinite article is "some" (instead of "a")
TF_INDOORS, // "indoors" - You can open locked doors from this tile.
TF_SEALED, // "sealed" - You can't pick up or see items here.
TF_EXPLOSIVE, // "explosive" - Explodes in fire.
TF_NO_ITEMS, // "no_items" - Items can't be dropped here (they fall off)
TF_MAX
};
// Item_action & Item_flag have their lookup and name functions defd in item.cpp
enum Item_action
{
IACT_NULL = 0,
IACT_WIELD, // Wield as a wearpon
IACT_WEAR, // Wear - only applies for clothing
IACT_DROP, // Drop on the ground
IACT_EAT, // Eat - only applies for food
IACT_APPLY, // Apply as in a tool
IACT_READ, // Read - only applies for books
IACT_UNLOAD, // Applies for launchers and containers
IACT_RELOAD, // Only applies for launchers
IACT_BUTCHER, // Cut into pieces of meat - only applies for corpses
IACT_MAX
};
enum Item_flag
{
ITEM_FLAG_NULL = 0,
ITEM_FLAG_LIQUID, // "liquid" - Puts out fires, needs a container
ITEM_FLAG_FLAMMABLE, // "flammable" - Consumed by fires
ITEM_FLAG_PLURAL, // "plural" - indefinite article is "some," not "a"
ITEM_FLAG_CONSTANT, // "constant_volume_weight" - doesn't use usual food v/w
ITEM_FLAG_RELOAD_SINGLE, // "reload_single" - reloading loads a single round
ITEM_FLAG_OPEN_END, // "open_end" - for containers. Can hold 5x limit.
ITEM_FLAG_GLASSES, // Prevent short-sightedness
ITEM_FLAG_RELOAD_STR, // "reload_strength" - Reduce reload_ap by Str * 30
ITEM_FLAG_MAX
};
enum Stat_id
{
STAT_NULL = 0,
STAT_STRENGTH,
STAT_DEXTERITY,
STAT_INTELLIGENCE,
STAT_PERCEPTION,
STAT_MAX
};
Stat_id lookup_stat_id(std::string name);
std::string stat_id_name(Stat_id id);
std::string stat_id_short_name(Stat_id id);
// These are used, for now, in signal_handlers
// TODO: Expand this? It's simple right now...
enum Math_operator
{
MATH_NULL = 0,
MATH_MULTIPLY,
MATH_GREATER_THAN,
MATH_GREATER_THAN_OR_EQUAL_TO,
MATH_LESS_THAN,
MATH_LESS_THAN_OR_EQUAL_TO,
MATH_EQUAL_TO,
MATH_MAX
};
Math_operator lookup_math_operator(std::string name);
std::string math_operator_name(Math_operator op);
#endif