-
Notifications
You must be signed in to change notification settings - Fork 0
/
rooms.c
330 lines (307 loc) · 10.8 KB
/
rooms.c
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
#include <stdbool.h>
#include <stddef.h>
#include "rooms.h"
char introtext[4][13][80] = {
{
"DARK SKY",
"Press RETURN to start"
},
{
"It is the year 2089.",
"",
"Mankind has developed a reliance on satellite technology.",
"",
"An unexpected pulse from an unidentified stellar phenomenon",
"strikes the satellite network.",
"",
"A chain reaction causes one explosion, then another.",
"The gigantic satellite network which serves as Earth's",
"\"artificial ring\" becomes burning wreckage.",
"",
"What isn't destroyed by falling steel is destroyed by",
"opportunistic bandits.",
},
{
"You are Kara.",
"",
"You are a twin sister. You and Sara have survived by relying",
"on each other and salvaging everything you can.",
"",
"But she is diabetic, and you are out of insulin. She doesn't have long.",
"",
"Kara: \"Don't worry. I'll find your medicine and be back before you know it.\"",
"",
"You step out of the door to your makeshift home and lock it behind you.",
"Better get a move on.",
},
{
"INSTRUCTIONS",
"",
"You have 15 turns to complete the game.",
"",
"Your objective is to find the medicine that your sister",
"sister needs and return it to her before the turns reach zero.",
"",
"Sometimes, you can find food to increase the number of turns left.",
"You can move between areas in the given direction, and search.",
"Press ESCAPE at any time to quit.",
"",
"Good luck!",
}
};
struct room rooms[ROOM_MAX] = {
/* desc and search string lengths - max 76 or so */
/* 10 20 30 40 50 60 70 80*/
/*12345678901234567890123456789012345678901234567890123456789012345678901234567890*/
[room_zero] =
{ .name = "Room Zero",
.desc = { "You're not supposed to be here" },
.search = { "You find a note from the developer wondering how you got here." },
.exit_n = 0,
.exit_s = 0,
.exit_e = 0,
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_office] =
{ .name = "Ruined Office Building",
.desc = { "A sticky grey layer of dust covers everything. Cobwebs hang from filing",
"cabinets stretched to the tiled ceiling. If you are lucky, you are the",
"only one here." },
.search = { "You take a moment and look around.",
"You and Sara have already stripped this place of all useful supplies." },
.exit_n = room_office_alley,
.exit_s = room_main_drag_north,
.exit_e = room_plaza_side_road,
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_office_alley] =
{ .name = "Office Building - Alley",
.desc = { "A chill wind blows through the alley in between the office building",
"main and the nearby annex. A howl is heard in the distance, but you",
"aren't sure if it's some animal or just the wind..." },
.search = { "You poke through the refuse piles in the alley corners.",
"You can't find anything useful." },
.exit_n = room_office_annex,
.exit_s = room_office,
.exit_e = 0,
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_office_annex] =
{ .name = "Office Building - Annex",
.desc = { "This secondary office building has been completely stripped to the under-",
"lying structure. It doesn't look like anyone has been in here for a while." },
.search = { "You check every corner of every room, but turn up nothing. Just as you",
"turn to leave, you spy one last candy bar left in a vending machine." },
.exit_n = 0,
.exit_s = room_office_alley,
.exit_e = 0,
.exit_w = 0,
.gives_food = true,
.searched = false,
},
[room_plaza_side_road] =
{ .name = "Plaza Side Road",
.desc = { "This road leads away from the office plaza and main drag. The sun beats",
"down hard here, tinging everything yellow through the smog." },
.search = { "Nothing can be found around the road here besides rocks and weeds." },
.exit_n = 0,
.exit_s = 0,
.exit_e = room_chickn_shack,
.exit_w = room_office,
.gives_food = false,
.searched = false,
},
[room_chickn_shack] =
{ .name = "Run-down Chick'n Shack",
.desc = { "This old restaurant reeks of mold and refuse. The smell eminating from",
"the kitchen area is nearly vomit-inducing." },
.search = { "Covering your mouth with your arm, you force yourself to poke through the",
"disgusting green goo that fills the pots in the kitchen. Shockingly, you",
"find some dried goods that look edible." },
.exit_n = 0,
.exit_s = 0,
.exit_e = 0,
.exit_w = room_plaza_side_road,
.gives_food = true,
.searched = false,
},
[room_main_drag_north] =
{ .name = "Main Drag - North",
.desc = { "This is the north part of main street. The pavement is cracked and broken",
"here, making progress slow." },
.search = { "You spend the better part of an hour searching through all of the",
"abandoned cars on the street. Unfortunately you found nothing." },
.exit_n = room_office,
.exit_s = room_main_drag,
.exit_e = room_pet_store,
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_pet_store] =
{ .name = "Pet Store",
.desc = { "Old blood stains the empty cages. The pet food shelves have already been",
"searched and anything edible has been taken." },
.search = { "You find one small can of cat food tucked away beneath the shelves. The",
"other people who searched this building must have kicked it underneath." },
.exit_n = 0,
.exit_s = 0,
.exit_e = 0,
.exit_w = room_main_drag_north,
.gives_food = true,
.searched = false,
},
[room_main_drag] =
{ .name = "Main Drag",
.desc = { "You are in the center of town, on main street. The broken road stretches",
"beyond sight into the smog." },
.search = { "You poke around for a while but can find nothing." },
.exit_n = room_main_drag_north,
.exit_s = room_main_drag_south,
.exit_e = room_main_drag_east,
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_garbage_alley] =
{ .name = "Garbage Alley",
.desc = { "Bins here are overflowing with nasty-smelling refuse." },
.search = { "All you find is the urge to regurgitate your breakfast." },
.exit_n = room_main_drag_east,
.exit_s = 0,
.exit_e = 0,
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_main_drag_east] =
{ .name = "Main Drag - East",
.desc = { "The main street turns east here and stretches on out of sight." },
.search = { "Surprisingly, a small rodent scurries away as you overturn a cardboard",
"box. Maybe not all life is gone from the city, after all." },
.exit_n = 0,
.exit_s = room_garbage_alley,
.exit_e = room_power_plant,
.exit_w = room_main_drag,
.gives_food = false,
.searched = false,
},
[room_power_plant] =
{ .name = "Power Plant",
.desc = { "To your shock, you detect a faint hum and vibration in the air. The power",
"plant is active - but you certainly haven't seen any evidence of",
"electricity thus far. Whoever is using the power plant is probably trying",
"to keep it a secret..." },
.search = { "In the basement you find the master breaker.",
"You flip it off. Whoever is uing the power doesn't have it now.",
"",
"[The power grid has been disabled.]" },
.exit_n = 0,
.exit_s = 0,
.exit_e = 0,
.exit_w = room_main_drag_east,
.gives_food = false,
.searched = false,
},
[room_power_plant_dark] =
{ .name = "Power Plant",
.desc = { "The power plant is dark." },
.search = { "You're not supposed to be here" },
.exit_n = 0,
.exit_s = 0,
.exit_e = 0,
.exit_w = room_main_drag_east,
.gives_food = false,
.searched = true,
},
[room_main_drag_south] =
{ .name = "Main Drag - South",
.desc = { "The southern part of main street has seen more ravage than the rest of",
"the area. There must have been a lot of scuffles around here." },
.search = { "You can't find anything save some expended bullet shells and empty food",
"canisters." },
.exit_n = room_main_drag,
.exit_s = room_bandit_hq,
.exit_e = room_dirt_road,
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_dirt_road] =
{ .name = "Dirt Road",
.desc = { "This unpaved stretch connects the rural portion of town with the city." },
.search = { "You dig around the surrounding area for a bit but find nothing." },
.exit_n = 0,
.exit_s = 0,
.exit_e = room_old_house,
.exit_w = room_main_drag_south,
.gives_food = false,
.searched = false,
},
[room_old_house] =
{ .name = "Old House",
.desc = { "After walking some distance, you arrive at a cul-de-sac of an abandonded",
"neighborhood. Most of the houses have had the doors ripped off or are",
"stained with graffiti. One retains its integrity, however, and you find",
"yourself inside to catch a breath." },
.search = { "The remnants that you find at the bottom of a box of stale cereal do",
"a little to quiet your stomach" },
.exit_n = 0,
.exit_s = 0,
.exit_e = 0,
.exit_w = room_dirt_road,
.gives_food = true,
.searched = false,
},
[room_bandit_hq] =
{ .name = "Bandit Headquarters",
.desc = { "There are bandits everywhere here. You are safe where you are, but it's",
"too dangerous to proceed right now. You think you can see flickering",
"lights inside..." },
.search = { "Oh, no! The bandits catch you as you are rummaging around.",
"Thankfully, they make your end quick...",
"",
"GAME OVER" },
.exit_n = room_main_drag_south,
.exit_s = 0,
.exit_e = 0, /* will change to room_cold_storage later */
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_bandit_hq_no_power] =
{ .name = "Bandit Headquarters",
.desc = { "The bandits must have been using power from the plant. They are running",
"around in a panic, trying to figure out what happened. Now is your chance",
"to sneak inside." },
.search = { "Oh, no! The bandits catch you as you are rummaging around.",
"Thankfully, they make your end quick...",
"",
"GAME OVER" },
.exit_n = room_main_drag_south,
.exit_s = 0,
.exit_e = room_cold_storage,
.exit_w = 0,
.gives_food = false,
.searched = false,
},
[room_cold_storage] =
{ .name = "Bandit HQ - Cold Storage",
.desc = { "The bandits must have been stashing goods here for ages. There's all",
"kinds of medicines. Surely you can find something for Kara here." },
.search = { "You very quickly find packs of insulin that Kara can use. Thank goodness!",
"Time to get back to her before it's too late." },
.exit_n = 0,
.exit_s = 0,
.exit_e = 0,
.exit_w = room_bandit_hq_no_power,
.gives_food = false,
.searched = false,
},
}; /* end of rooms[ROOM_MAX] array */