-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdarkness.inf
537 lines (477 loc) · 19.7 KB
/
darkness.inf
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
! A game for futures video games class
! fantasy adventure 7289
! back in the darkness
! version 1
Constant Story "Back in the Darkness.";
Constant Headline "^Talk to the townspeople about the mysterious heavy fog.^";
Constant MAX_CARRIED = 7;
Include "parser";
Include "verblib";
Include "grammar";
Attribute sproutable;
[ Initialise;
location = Forest_Glade;
StartDaemon(Oil_Lamp);
! StartDaemon(Pumpkin_Plant);
StartDaemon(Raised_Garden_Box);
print "
I feel warm rays of sunlight. I am laying in what feels like a meadow
of grass. With a pleasant breeze, my eyes flutter open and I hear the
terrifying call of an orc to the north towards town. ^
";
];
Object Forest_Glade "Forest Glade"
has scenery
has light
with description "A lush forest glade! There is the Town Square to the north
and some old ruins to the northeast. To the west there is a field of tall flowers.",
n_to Town_Square,
w_to Field_of_Flowers,
ne_to Ruins;
Object -> Raised_Garden_Box "raised garden box"
has container static open,
with name "box" "garden",
growth_ticks 0,
daemon [x;
if (self.growth_ticks < 10) {
self.growth_ticks++;
} else {
self.growth_ticks = 0;
! for every seed in the box, turn it into a new instance of a plant
objectloop(x in Raised_Garden_Box) {
if (x has sproutable) {
print "The ", (name) x, " sprouts into a full sized plant!^";
remove x;
x = Pumpkin_Plant.create();
StartDaemon(x);
move x to self;
} else {
print "the garden box just has: ", (name) x, " sitting there.^";
}
}
}
],
with description "A raised garden box made from rough-hewn redwood timbers.";
Object -> Pumpkin_Seed "Pumpkin Seed"
has sproutable,
with name "seed" "seeds",
before [;
!Insert:
!print_ret "XXinserting ", noun, " into ", second, "?^";
! also need to do this for Remove:
Take:
print "the parent object of seed is ", (name) parent(self), " !^";
if (parent(self) == Player) {
print_ret "You already have that!";
}
if (parent(self) == Raised_Garden_Box) {
print_ret "You can't remove ", (name) noun, " from the ", (name) parent(noun), "?^";
} else {
print "Removing ", (name) noun, " from ", (name) second, ".^";
move self to player;
return true;
};
Remove:
if (parent(self) == Raised_Garden_Box) {
print_ret "You can't remove ", (name) noun, " from the ", (name) parent(noun), "?^";
} else {
print "Removing ", (name) noun, " from ", (name) second, ".^";
move self to player;
return true;
};
],
with description "A pumpkin seed";
! Pumpkin_Plant
! Pumpkin_Fruit
Class Fruit(50)
has edible,
with name "fruit";
Class Pumpkin_Plant(50)
has edible,
with name "plant",
before [ new_fruit;
Take:
if (self.fruit_growth_ticks > 20) {
self.fruit_growth_ticks = self.fruit_growth_ticks - 20;
new_fruit = Fruit.create();
if (new_fruit == nothing)
"You paw through the pumpkin leaves but find no fruit.";
<<Take new_fruit>>;
} else {
print_ret "There is no pumpkin to be picked: ", self.fruit_growth_ticks;
}
Examine:
print_ret "you look at the pumpkin plant. It has ", self.fruit_growth_ticks / 20, " pumpkins ready to be picked.";
],
daemon [;
if (self.fruit_growth_ticks < 60) {
self.fruit_growth_ticks++;
}
],
fruit_growth_ticks 0,
plural "pumkpins",
with description "a class based pumpkin plant";
! circle back and look
! at whether we want stacked objects
Class Pumpkin(50)
has edible,
with name "pumpkin",
short_name "pumpkin fruit",
plural "pumpkins";
Class Fruit_Plant
with name "fruit",
before [ new_fruit;
Take:
if (self.fruit_growth_ticks > 20) {
self.fruit_growth_ticks = self.fruit_growth_ticks - 20;
new_fruit = Fruit.create();
if (new_fruit == nothing)
"You paw through the pumpkin leaves but find no fruit.";
<<Take new_fruit>>;
} else {
print_ret "There is no pumpkin to be picked: ", self.fruit_growth_ticks;
}
Examine:
print_ret "you look at the pumpkin plant. It has ", self.fruit_growth_ticks / 20, " pumpkins ready to be picked.";
],
daemon [;
if (self.fruit_growth_ticks < 60) {
self.fruit_growth_ticks++;
}
],
fruit_growth_ticks 0,
with description "a fruit plant";
!Object -> Pumpkin_Plant "pumpkin plant"
! with name "pumpkin" "plant",
! before [ new_pumpkin;
! Take:
! if (self.fruit_growth_ticks > 20) {
! self.fruit_growth_ticks = self.fruit_growth_ticks - 20;
! new_pumpkin = Pumpkin.create();
! if (new_pumpkin == nothing)
! "You paw through the pumpkin leaves but find no fruit.";
! <<Take new_pumpkin>>;
! } else {
! print_ret "There is no pumpkin to be picked: ", self.fruit_growth_ticks;
! }
! Examine:
! print_ret "you look at the pumpkin plant. It has ", self.fruit_growth_ticks / 20, " pumpkins ready to be picked.";
! ],
! daemon [;
! if (self.fruit_growth_ticks < 60) {
! self.fruit_growth_ticks++;
! }
! ],
! fruit_growth_ticks 0,
! with description "A pumpkin plant";
! value that starts at zero, fruit_growth_ticks
! count of 20, one fruit is harvestable
! at 40, two fruits are
! at 60 three fruits are
! every time it increments by the fruit growth period
! in this model, we have a plant which is counting ticks (growing)
! and when we harvest we subtract.
Object -> Oil_Lamp "lamp"
with name "lamp" "lantern",
after [;
SwitchOn: give self light;
SwitchOff: give self ~light;
],
before [;
Examine: print "It is an oil burning lamp, ";
if (self hasnt on) "currently off.";
if (self.oil_level < 10) "the flame is flickering.";
"the flame is burning brightly.";
SwitchOn:
if (self.oil_level <= 0)
"Unfortunately it appears to be out of oil.";
Fill: print "You try to fill up the lamp ";
if (Oil_Pool in parent(player)) {
self.oil_level = 45;
"You fill the lamp from the nearby pool of oil";
} else {
"But you are unable to find a nearby source of oil.";
}
],
daemon [;
if (self hasnt on) return;
if (--self.oil_level == 0)
give self ~light ~on;
if (self in location) {
switch (self.oil_level) {
10: "^The oil lamp's light is getting dimmer!";
5: "^The oil lamp flickers, it won't last much longer.";
0: "^The oil lamp suddenly goes out.";
}
}
],
with description "a slightly dinged lamp. It should still work.",
oil_level 0,
has switchable;
Object Field_of_Flowers "Field of Flowers"
has scenery
has light
with description "A tall field of flowers. They all appear to have faces.
They all seem to be staring at you curiously.
There is a forest glade to the east.",
e_to Forest_Glade;
Object Town_Square "Town Square"
has light
with description "The town guard is here. Some militia are fighting creatures of an unknown origin. There is a decrepit old house to the east.",
s_to Forest_Glade,
e_to Haunted_House;
Object -> Oil_Pool "pool of oil"
with name "pool" "tarpit",
with description "a tarpit of bubbling oil.",
has static;
! Velociraptor are pack dinosaurs that hunt their prey
! taming - jump on back, ride long enough become tame
Object -> Velociraptor "velociraptor"
has animate,
with name "velociraptor",
tame 0,
life [;
Attack:
print_ret "You reach for your weapon, then realize you don't have one. You could try using your fists but that would not be wise ";
Taste:
print_ret "You cut your tongue on its scales and the velociraptor stares at you as if to say 'what the heck is your problem?'";
Rub:
print_ret "The velociraptor purrs.";
Give:
!if (noun == Turkey_Leg) {
if (noun has edible) {
self.tame = self.tame + 5;
if (self.tame > 9) {
print_ret "The velociraptor looks tame.";
} else {
print_ret "The velociraptor eats the food but still looks hungry.";
}
} else {
print_ret "The velociraptor growls";
}
],
with description "An 8ft tall velociraptor. When you see it you shrink back in fear.";
Object -> Turkey_Leg "turkey leg"
with name "turkey" "leg",
has edible,
with description "a big long turkey leg, just like the kind they have at theme parks - whatever that is!";
Object -> Cave_Troll "cave troll"
with name "troll",
with description "a 10' tall cave troll";
Object -> Goblins_Orcs "a group of goblins and orcs"
with name "goblins" "orcs",
with description "a group of goblins and orcs. You hear one say 'Meat's back on the menu boys!'";
! path
Object Haunted_House "Haunted House"
has light
with description "A decrepit estate, long since abandoned. It's rumoured to be haunted.",
e_to Haunted_House_Hallway,
w_to Town_Square;
Object Haunted_House_Hallway "Haunted House Hallway"
has light
with description "A long hallway with many doors. On the floor there is a slimy looking manhole. A grey shimmering spot on the wall to the northeast which is hard for your eyes to focus on. A sinister looking red door with strange black markings on it. To the north there is a circular vault door with a nuclear symbol on the front. To the southwest there is a wooden door covered in green stuff. To the southeast there are two oak doors, behind which you can see a magical portal and through that a palace. To the east is a metal door splattered with blood, with a sign made out of skin that reads 'morgue'. On the ceiling you see a out of place yellow door with a symbol made up of tentacles in the shape of a triangle. To the northwest you see a fancy door with patterns and an inscription in Latin. To the south there is a door with many knobs, it's hard to tell which is the real one.",
nw_to Ancient_Ruins, ! Sarah
u_to Rock_Room, ! EmoWolf10
e_to Morgue, ! Spencer Cage
se_to Lobby, !
sw_to Swampy_Room, ! Eddie Suarez
n_to Post_Nuclear_City, ! JamesFenix
d_to Dark_Slide, ! Pez
ne_to Limbo, ! Mystic
w_to Haunted_House;
! Survival_Bunker Gameactive
! Sinister red door - TODO
!
! Limbo
Object Survival_Bunker "Survival Bunker"
has light
has scenery
with description "A concrete bunker loaded with food and water. In the middle of the room is a big red button!";
Object -> Big_Red_Button "Big Red Button"
with name "button",
before [;
Push:
deadflag=1;
! "You push the button and have unleashed something horrible. Good job, hero!";
],
with description "A big red button";
! this is a trap room
Object Dark_Slide "Dark Slide"
has light
has scenery
with description "Opening the manhole you see a slide leading down into a tunnel with barbs pointing down. You think you can enter, but the bards will prevent you from coming back up. There are a pile of bones in front of the door.";
Object -> Death_Keys "Keys"
with name "keys",
before [;
Insert:
if (noun == Many_Locked_Door) {
deadflag=1;
"As you insert the key into the door the flesh starts to melt from your hand. You jump back, but the melting continues until you become a pile of bones on the floor.";
}
],
with description "a set of keys";
Object -> Many_Locked_Door "many locked door"
with name "door"
with description "A door covered in dozens of locks.";
Object Limbo "Limbo"
has light
has scenery
with description "Deciding to go through the wall despite the fact the shimmering grey spot is hard to look at, takes you to a place where it's just different shades of grey. It fills you with a sense that you're being watched. The place you are in seems to go on forever. The feeling you felt of a person watching you grows until it happens a figure appears. Could this be the same shadowy figure that you met in the ruins? This figure looks like it's made from both shadow and light ",
sw_to Haunted_House_Hallway;
Object Post_Nuclear_City "Post-Nuclear City"
has light
has scenery
with description "You see a city desolated by a nuclear missile fallout with ruined buildings that are falling apart some still intact it is slightly cloudy and there seems to be a dark, bleek, atmosphere to the area there is people but they appear to be wearing future like armor.",
s_to Haunted_House_Hallway;
Object Swampy_Room "Swampy Room"
has light
has scenery
with description "A swampy room made of green kelp and a lot of swamp related terrain. There you will see various skeletons buried under the roots, and also various trunks.",
ne_to Haunted_House_Hallway;
Object Lobby "Lobby"
has light
has scenery
with description "A room made to greet people. In the middle of the room you see seven baroque chairs placed around a baroque style table. In the middle of the table you see a baroque style clock.",
nw_to Haunted_House_Hallway;
Object Morgue "Morgue"
has light
has scenery
with description "The room is lined with vaults possibly containing bodies. There is a surgical table with saws. The room is slippery with blood. There's an incenerator nearby.",
w_to Haunted_House_Hallway;
Object Rock_Room "Rock Room"
has light
has scenery
with description "It looks like it's carved out of the stone. There's not much here, the room is basically empty.",
d_to Haunted_House_Hallway;
Object Ancient_Ruins "Ancient Ruins"
has light
has scenery
with description "These ruins are really run down and are probably full of booby traps. Be careful where you step!",
se_to Haunted_House_Hallway;
Object Ruins "Ruins"
has light
with description "Some old ruins. Nearby the ruins to the East are a group of conspicuous bushes.
A forest glade is to the southwest. Some marshes are to the south.",
before [; Go:
if (noun == e_obj && Ruins_Bushes in Ruins) {
! if we are going east but the bushes are still here
print "The bushes are blocking your way! If only someone would cut them down with a sharp object!";
return true;
} else {
return false;
}
],
sw_to Forest_Glade,
e_to Cave_Entrance,
s_to Marshes;
Object -> machete "machete"
with name "machete",
with description "A slightly rusty machete.";
Object -> Ruins_Bushes "bushes"
has static
has pluralname
with name "bushes",
before [; Cut:
! check to see if the player is holding a machete
! if so
! print a message about the bushes being cut
! delete the bushes object
! if not, hint that they need a machete
if (machete in player) {
print "You hack down the bushes with your machete. They won't get in your way anymore!";
remove self;
give Hooded_Figure ~concealed;
print "A hooded figure emerges from the shadows. They say 'Very impressive, for a novice.'";
return true;
} else {
print "You karate chop the bushes with your bare hands to no avail. I wonder if there's a better way?";
return true;
}
return true;
]
with description "A bush of bushy bushes. The branches look small enough to be cut by a machete.";
Object -> Hooded_Figure "Hooded Figure"
has concealed
has animate
has proper
with name "figure",
life [; Answer:
print_ret "...";
Attack:
print_ret "Foolish! You don't want to attack me.";
],
with description "A hooded figure cloaked in mystery";
Object Marshes "Marshes"
has light
with description "The ground softens as you walk through the tall grass. A thick mist envelops the area.
You trip on a rock as you enter the area.",
n_to Ruins;
Object -> Marshes_Rock "Rock"
with name "rock",
with description "A moss-covered rock that you nearly twisted your ankle on. Still, it might be useful for something.";
Object Cave_Entrance "Cave Entrance"
has light
with description "An omnious carving in the mountain leads down further than you can see. There are some ruins to the west.",
! connect to bushes in the ruins, after bushes are cut (machete)
w_to Ruins,
d_to Cave_Room;
Object -> Issac "Issac, the shopkeep"
with name "issac",
description "A weathered man with a two foot beared. ",
life [; Answer:
print_ret "Hello there traveler, are you interested in some of my wares?";
Attack:
print_ret "Issac blocks your attack with his shield and says 'Hey! If you're looking for a fight, you could've just asked to spar!'";
],
has animate proper male;
Object -> Cave_Troll2 "cave troll"
with name "troll",
description "A grungy cave troll. ";
Object Cave_Room "Cave Room"
with description "The cave walls are brownish grey. It smells like sulfur.
There are three tunnels that go to the east, north, and south.",
u_to Cave_Entrance,
e_to Cave_Tunnel_E;
Object Cave_Tunnel_E "East Cave Tunnel"
with description "The heat becomes intense as you continue into the cave. A brightly lit opening is to the east.
The cave room is to the west.",
e_to Magma_Chamber,
w_to Cave_Room;
Object Magma_Chamber "Magma Chamber"
has light
with description "The tunnel expands to a massive chasm floored with magma. On the other side of a narrow bridge, you can see a glimmering artifact.",
before [; Take:
if (noun == Marshes_Rock && Artifact notin Magma_Chamber) {
print "You'd better not take the rock, it's keeping the pressure plate from triggering!";
return true;
};
Drop:
if (noun == Marshes_Rock || noun == Artifact) {
print "You think twice before dropping that.";
return true;
}
],
w_to Cave_Tunnel_E;
Object -> Artifact "Ancient Artifact"
with name "artifact",
with description "This bronze statue looks positively ancient, yet shines like the morning sun.
It's small enough that you might be able to take it.",
before [; Take:
if(noun == Artifact && Marshes_Rock in player)
{
move Marshes_Rock to Magma_Chamber;
move Artifact to player;
print "You carefully replace the artifact with the rock you found. Fortunately, the rock keeps the pressure plate weighed down.";
return true;
} else {
! if the player doesn't have a weight
print "On closer inspection, you find that the artifact is sitting on a pressure plate. You'll need something heavy to put in its place.";
return true;
}
];
! The artifact is a quest item that someone in the town is looking for
! hidden cave discovered by whacking bushes with a machete
! machete, sword, hammer, halbard
!Object -> "sword"
! with name 'sword',
End;