2 ! **************************************************************
3 ! GURTH.INF -- Add-on for SPIRITWRAK
4 ! (all rights reserved, copyright 1996, D. Yu
5 ! **************************************************************
7 ! (author note to self -- Gurth currently isn't going to be too
8 ! exciting -- I'm running out of .z5 code space. The main
9 ! planned features are:
10 ! 1) The abandoned house with the oven for baking the cake
11 ! 2) A deep forest area somewhat north of the city where
12 ! a sphere piece will be hidden
14 ! The string array for labels on the GUE Oven dial (may be changed)
15 Array OVEN_settings table [;
24 "Thermo-nuclear Flash";
27 Object GURTH_GUSStop "Gurth City Streets"
28 with description "A foggy sky covers the ever-busy city of \
29 Gurth. A road heads southeast into a larger \
30 portion of the city, and stairs lead down here.",
31 name "fog" "sky" "road" "stairs",
32 d_to GURTH_GUSStation,
33 se_to GURTH_NDistrict,
36 Object umbrella "umbrella" GURTH_GUSStop
41 else print "A closed";
42 " black-cloth umbrella.";
49 if (parent(self) == player) {
52 "You snap the umbrella open.";
54 else "You need to be holding the umbrella to do that.";
56 if (parent(self) == player) {
59 "You snap the umbrella closed.";
61 else "You need to be holding the umbrella to do that.";
65 Object GURTH_NDistrict "North District"
66 with description "Probably the safest district in Gurth, the \
67 North District is mostly cobblestone roads and barricaded \
68 buildings. A main road heads south, or forks northwest and \
70 name "cobblestone" "buildings" "road",
76 Object GURTH_Forest "Forest Edge"
77 with description "Dark forest meets dark city outskirts here. \
78 The only exit is along an old path to the southwest -- \
79 the forest is too thick for travel otherwise. \
80 Rain falls periodically from a dark stormy sky.",
81 name "forest" "path" "rain",
82 sw_to GURTH_NDistrict,
85 "^A rumble of thunder booms overhead.";
90 if (Treant in GURTH_Forest)
91 "You hear muffled cries for help from \
92 somewhere inside the log cabin!";
96 Object storm1 "storm" GURTH_Forest
97 with name "storm" "clouds" "sky" "dark",
98 description "It does look a bit stormy overhead.",
101 if (the_spell_was == shazok_spell) {
102 print "A bolt of lightning rips down from the \
103 clouds overhead as you finish your chant! It strikes ";
104 if (Treant in GURTH_Forest) {
105 print "the angry treant! \
106 A portion of its top branches catch fire! Howling in pain, \
107 the creature runs off into the woods and disappears!";
113 "you, frying you to a crisp!";
119 Object Treant "angry treant" GURTH_Forest
120 with name "treant" "angry" "blighted",
121 description "Treants are basically animated trees. They \
122 are considered mythical creatures, usually solitary and quite \
123 rare. This particular treant looks similar to a great elm tree. \
124 You notice that it seems covered with spots of some sort of \
129 print "^The treant ";
131 if (WOOD_House.number == 3) {
132 WOOD_House.number = 4;
134 "pounds the cabin, and it collapses into \
135 splinters! The treant grabs a hapless woodsman from the \
136 wreckage and stalks off into the forest with his victim!";
139 WOOD_House.number = WOOD_House.number + 1;
140 "hammers on the house and you hear a \
141 crack! The cabin sustains some damage!";
144 else "angrily attacks the wood cabin, which shakes \
145 with the continued blows.";
149 if (the_spell_was == egdelp_spell) {
151 "The treant is covered with a waxy buildup, which \
152 washes off in the rain. The treant, already \
153 rather incensed, turns his attentions to you and mauls you \
154 with two giant branches/arms.";
156 if (the_spell_was == throck_spell) {
158 "The treant grows a bit bigger. His current bad \
159 mood seems to increase proportionately! He turns his attentions \
160 to you and pounds you with two huge branches/arms.";
162 if (the_spell_was == taclor_spell) {
163 print "The treant seems to turn a shade of deep \
164 green, and the patches of blight disappear! The ancient tree \
165 creature pauses, regards you solemnly, and then walks \
166 off into the forest.";
173 Object WOOD_House "log cabin" GURTH_Forest
174 with name "cabin" "log" "house",
176 print "A small house built of logs";
177 switch (self.number) {
179 1: print ". It looks slightly damaged.";
180 2: print ". It looks partially damaged, the roof logs \
181 are broken in several places.";
182 3: print ". It looks very damaged. One wall is \
183 nearly broken through.";
184 default: print " that has collapsed into little more \
185 than a pile of broken logs.";
187 if (self has general)
188 " You notice some area of wood have spots of wax \
195 if (Treant in GURTH_Forest)
196 "The angry treant seems to be in the way.";
197 "It's just a tiny log cabin that probably \
198 has nothing interesting inside.";
200 if (the_spell_was == egdelp_spell) {
202 "The outside of the cabin is now covered \
203 with spots of waxy buildup.";
211 move red_sphere to player;
212 "^^Moments later, a woodsman appears from the battered log \
213 cabin. ~Much thanks, sir,~ he says. ~Appears I mistook that \
214 treant for a dead tree and tried to cut it down. Can't say \
215 he took it too well.~ he says sheepishly. ~Say, you don't \
216 look like you're from around these parts. Kinda like this \
217 funny thing I found in the woods the other day.~ He hands \
218 you a strange round object. ~Maybe you know what to do with \
219 it?~ He hefts a small hatchet over his shoulder. ~Well, \
220 back to do a little logging,~ he says, as he walks off into the \
221 deep forest, whistling.";
224 Object GURTH_MDistrict "Market District"
225 with description "The famous Gurth Market District is as noisy, \
226 crowded, and dangerous as it ever was. A cobblestone road heads \
227 north and south here.",
228 name "cobblestone" "road",
229 n_to GURTH_NDistrict,
230 s_to GURTH_SDistrict,
231 e_to "~Get out 'o me way!~ some rude fellow says as you \
233 w_to "~No push'n, no shov'n!~ some old hag screams at you, \
234 and promptly shoves you back.",
236 if ((random(10) < 5) && (self hasnt general)) {
239 "^A clumsy hawker stumbles into you as he \
240 crosses the street, hustling off without so much as an \
241 apology. You notice he dropped something in his hurry.";
246 Object c7 "coin" class coin_class;
248 Object GURTH_SDistrict "South District"
249 with description "The general gloomy atmosphere is more noticeable \
250 than ever here, in the extremely dangerous South District. The \
251 general area is filled with boarded-up houses, and a few shifty-eyed \
252 characters are the only people milling about here. A road leads \
253 north. To the east is an abandoned flat, probably in better shape \
255 name "houses" "characters" "people" "road" "flat",
256 n_to GURTH_MDistrict,
258 print "You wander down ";
259 if (random(20) == 5) {
261 "a back alleyway, and are immediately \
262 assaulted by a group of vicious thugs, who batter you senseless.";
264 else "an alleyway, find a dead-end, and return \
268 print "You wander down ";
269 if (random(20) == 5) {
271 "a sidestreet, and are immediately \
272 assaulted by a group of vicious thugs. One of them seems to \
273 recognize you. ~That's the Preacher-man who got Davey arrested! \
274 Let's show 'em what we think'o that!~ They proceed to beat you senseless.";
276 else "a sidestreet, find a dead-end, and return \
282 Object GURTH_House "Front of House"
283 with description "You're standing at the rotting front steps of \
284 a small flat. The front door to the east has been battered down and \
285 you could probably walk right in, or return to the street to \
287 name "street" "steps" "flat",
288 w_to GURTH_SDistrict,
293 Object GURTH_House2 "Front of House"
294 with description "You're standing near a small construction site. \
295 A city street lies west, and a construction ditch is east.",
296 name "street" "ditch",
299 "You step into the street, and several locals \
300 give you strange looks. The surrounding neighborhood seems \
301 new and busy -- various construction sites mark the \
302 work of enterprising shop-keepers of the area.^^\
303 ~Watch out there!~ someone cries. A sudden \
304 pile of bricks falls from a nearby scaffolding, and \
307 e_to Construction_site,
311 Object bad_brick "dusty brick" GURTH_House2
312 with name "brick" "dusty" "old",
313 initial "An old discarded brick lies nearby.",
314 description "An old brick, slightly cracked in several places.",
318 ! Construction Worker appears
319 if ((good_brick in Construction_site) ||
320 ((good_brick notin Construction_site) &&
321 (bad_brick notin Construction_site))) {
323 foundation_wall.number = 1;
327 foundation_wall.number = 2;
329 if (location == Construction_site) {
330 print "^From behind some scaffolding, a construction \
331 worker appears. He walks to a part of the ditch and starts to \
332 make some finishing touches on part of a low wall. \
333 He finds a brick nearby and applies it to the wall with \
334 a good patch of mortar.";
335 if (foundation_wall.number == 1)
336 " Brushing himself off, he walks off \
337 and is soon out of sight.";
339 " He looks at the patch somewhat \
340 unsatisfied, but shrugs, and walks off, soon out of sight.";
343 "^You hear some brief noises from the east.";
347 Object Construction_site "Construction Site"
348 with description "This is a long square ditch that is \
349 likely to be the starting point for some building. It is \
350 framed by wood slats and short brick walls. The only way \
351 out is to the west.",
352 name "ditch" "slats" "wood",
356 Object good_brick "thick brick" Construction_site
357 with name "brick" "thick",
360 initial "A thick brick lies nearby.",
361 description "A thick brick, solid as a rock.",
364 Object foundation_wall "portion of wall" Construction_site
365 with name "wall" "foundation" "portion" "hole" "recess",
366 initial "You notice a foundation side wall \
371 switch (self.number) {
372 0: "It looks somewhat unfinished. Part of it \
373 is open into a dark recess in the side of the ditch.";
374 1: "The wall is a finished work of brick and \
375 mortar. It looks quite strong.";
376 2: "The wall is a finished work of brick and \
377 mortar. You see a spot where the brickwork seems a bit \
384 "The wall is currently sealed shut.";
387 print "You put ", (the) noun, " into the ";
388 "small hole in the wall.";
392 "The wall is currently sealed shut.";
394 if (self.number == 0) {
396 "You kick at the wall. Unfortunately, it wasn't \
397 all that stable, and the wall falls apart, burying you under a \
398 pile of loose bricks.";
400 if (self.number == 1) {
402 print "You try to break the wall, but only end up \
403 hurting your hand. ";
406 give foundation general;
407 print "You knock on the weak portion of the \
408 wall, and produce a slight crack, that no doubt will \
409 cause the homeowners some worry in the future. ";
411 ! give GURTH_House ~general;
412 while (child(player) ~= 0) remove child(player);
413 ! while (child(GURTH_House) ~= 0) remove child(GURTH_House);
414 print "The wall seems to start to glow a purple color, and you \
415 step back, to find your surroundings replaced by cold natural \
417 Mystical_Cave.number = Mystical_Cave.number + 1;
418 PlayerTo(Mystical_Cave);
421 has static container open;
423 Object House_Ent "Entrance Room"
424 with description "A bare room, with peeling paint and rotting, \
425 water-stained walls. There's a room to the east, and a rickety \
426 stairway down. The outdoors lie west.",
427 name "paint" "stairway" "outdoors",
434 Object House_Basement "Basement"
435 with description "A musty, smelly basement. Stairs head up.",
439 Smell: "It's smells musty down here, as though \
440 the place has been unused for quite some time.";
444 Object House_switchbox "dusty metal box" House_Basement
445 with name "dusty" "metal" "box",
446 when_closed "There's a dusty metal box attached to the wall here.",
448 print "There's an open metal box attached to the wall here. ";
450 if (x == 0) "It seems to be empty.";
451 print "It contains:^";
452 x = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT;
453 WriteListFrom (child(self), x, 1);
458 description "A dusty metal box, attached to the wall.",
460 Open, Push, Pull, Turn, Touch:
461 if (GHOST in House_Basement)
462 "Slowly, but quite deliberately, the zombie \
463 prevents you from getting near the box.";
465 has static container openable;
468 Object wire "thin wire" House_switchbox
469 with name "wire" "thin",
470 ! initial "Inside the box is a loose wire.",
471 description "A thin stiff string of metal.",
473 size 1, ! must fit in subway gate slot...
476 if ((the_spell_was == huncho_spell or luncho_spell) &&
477 (self hasnt general))
478 "Your chant goes unanswered.";
479 Take, Push, Pull, Touch, Rub, Squeeze:
480 if (self hasnt general) {
481 if (rubber_gloves has worn) {
482 if (action==##Take) give self general;
483 print "As you touch the wire, you notice a \
484 bright spark! Good thing you were wearing rubber gloves! ";
487 print "As your fingers get near the wire, \
488 a bright spark of electricity ";
489 if (random(10) < 4) {
491 move GHOST to House_Basement;
492 "arcs into your hand! The results are quite shocking, I'm afraid.";
495 "flashes near your fingers! You pull back just in time.";
501 Object foundation "foundation" House_Basement
502 with name "foundation" "break" "hole",
503 initial "A large break in the wall exposes a good portion of \
504 the house's foundation.",
505 description "Water damage, or simply age, has exposed a large \
506 hole in one of the walls, through which you can see exposed \
507 wood and brick, part of the foundation of the house.",
510 "No need to put things in the foundation like that.";
512 if (self hasnt general)
513 "You briefly search the decaying foundation, but find nothing.";
515 print "You dig around in a familiar spot in the hole ";
517 if (children(foundation_wall) == 0)
520 while (child(foundation_wall) ~= 0)
521 move child(foundation_wall) to House_Basement;
522 "and find something!";
527 Object House_Kitchen "Kitchen"
528 with description "You're in the kitchen, by the looks of things. \
529 Some broken cabinets are on the wall. Light from partially boarded-up \
530 windows lets you see the rotting wood floors. Rooms lie to the \
532 name "cabinets" "windows" "wood",
537 ! (An oven, a typical inform object)
538 Object OVEN "GUE-Automatic oven" House_Kitchen
539 with name "oven" "GUE-Automatic",
540 when_closed "Strangely untouched and undamaged, a GUE-Automatic oven is \
541 sitting closed in a corner of the room.",
544 print "Strangely untouched and undamaged, a GUE-Automatic oven is \
545 sitting open in a corner of the room.";
547 if (x == 0) " It seems to be empty.";
548 print " It contains:^";
549 x = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT;
550 WriteListFrom (child(self), x, 1);
554 description "A FrobozzCo best-seller -- this small green oven is \
555 perfect for those adventurers who want a home-cooked meal, but are short \
556 on time and space. There's a dial and a button \
561 if (self hasnt open) {
563 print "You open the oven, ";
565 if (x==0) "which is empty.";
567 x = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT;
568 WriteListFrom (child(self), x, 1);
571 add_to_scope oven_dial oven_button,
572 has static container openable;
574 Object oven_dial "oven dial"
578 print "A round dial with small printed words. A line on the \
579 oventop marks which dial setting is currently active, which at the \
580 moment is ~", (string) OVEN_settings-->(oven_dial.number); "~.";
584 oven_dial.number = oven_dial.number + 1;
585 if (oven_dial.number > 9) oven_dial.number = 1;
586 print "The line is now pointing to ~", (string) OVEN_settings-->(oven_dial.number);
589 "The dial has somewhat unusual \
590 settings. You'll need to turn to the one you want.";
594 Object oven_button "oven button"
595 with name "button" "black",
597 description "A small round black button on the top of the oven.",
601 "There is an irritated buzz.";
603 print "You press the button and hear a low spinning noise. \
604 Suddenly, the oven makes a ";
605 if (oven_dial.number == 9) {
606 ! Ye old nuclear flash setting
607 if (children(OVEN) ~= 0)
609 "tremendous 'bang', and nearly springs off \
610 the floor! A bright flash of light seems to originate from somewhere \
611 inside the oven! Then, just as suddenly, everything is quiet again.";
613 ! check object in oven
614 ! if obj exists, check for edible
615 ! or cake, mutate appropriately.
616 if (children(OVEN) ~= 0) {
617 if ((Baking_Pan in oven) && (cake in Baking_Pan)) {
618 ! we're no doubt cooking the cake again.
619 ! as a nice feature of the GUE auto, if the cake
620 ! was undone, and the oven setting == 4, give
621 ! the cake the 'done' result
622 if ((cake.number == 1) && (oven_dial.number == 4))
624 ! otherwise, nothing changes
626 if ((Baking_Pan in oven) && (dough in Baking_Pan)) {
627 ! first, check oven setting (too cold or too hot)
628 ! if setting ok, check number of times folded
629 ! (too few, too many). Move 'cake' to pan, make
630 ! dough child of cake, and set the 'result' number
631 ! of cake accordingly (0, ok, 1 underdone, 2
632 ! overdone, 3 underfolded, 4 overfolded)
633 ! (assumption is that dough will be only thing
634 ! in pan [add's are trapped by dough]
635 move dough to cake; ! Zen cooking...
636 move cake to Baking_Pan;
637 if (oven_dial.number == 4) {
638 if (dough.number < 83)
640 if (dough.number > 83)
642 else cake.number = 0; ! well done baker
645 if (oven_dial.number < 4)
647 if (oven_dial.number > 4)
652 "a loud 'pop' and nearly springs off \
653 the floor! Then, just as suddenly, everything is quiet again.";
658 Object House_Pantry "Pantry"
659 with description "This was once probably a pantry of some \
660 sort. It's now a bare closet-sized room. The exit is south.",
664 Object Baking_Pan "baking pan" House_Pantry
665 with name "pan" "baking",
666 description "It's a nice round flat-bottomed ceramic pan.",
673 if (children(Baking_Pan) == 0)
674 "There doesn't seem to be anything in the pan to mix.";
676 if (cake in Baking_Pan)
677 "You can't mix anything with the already baked cake in the pan.";
678 ! if the dough is already in the pan, add the
679 ! 'new children', if any
680 if (dough in Baking_Pan) {
682 move dough to OVEN; ! Temp
683 while (child(Baking_Pan) ~= 0) {
685 move child(Baking_Pan) to dough;
687 move dough to Baking_Pan;
689 "You need to add something to the pan if you \
690 want to mix something new into the dough.";
691 "You mix in the new ingredients into the dough.";
693 ! Minimally, if the flour, butter and egg are in the
694 ! pan, 'dough' will be produced
695 if ((flour notin Baking_Pan) ||
696 (corbie_egg notin Baking_Pan) ||
697 (butter notin Baking_Pan))
698 "You mix the contents of the pan around a bit, but \
699 some things don't quite coagulate, and the contents remain unmixed.";
701 while (child(Baking_Pan) ~= 0) {
702 move child(Baking_Pan) to dough;
704 move dough to Baking_Pan;
705 "You start mixing. Like magic, in short time you \
706 have a doughy mixture in the pan.";
710 if (noun == dough or cake) {
711 CDefArt(noun); " is stuck fast in the pan and \
712 you can't get it out.";
715 ! we've modified certain ingredient objs that we want \
716 ! to 'preserve' in the pan.
717 if ((noun == flour) || (noun == sugar_cube) ||
718 (noun == baking_powder) || (noun == butter) ||
719 (noun == corbie_egg) || (noun==dornberries))
720 "It's somewhat scattered about in the pan right \
721 now, and you can't quite remove it cleanly.";
725 "The cake takes up the entire space in the pan.";
726 ! -- trap and nicely parse putting
727 ! ingredients in pan, will require modifying
728 ! 'short_name's of various ingredients.
730 flour.short_name = "pile of flour";
731 move flour to Baking_Pan;
732 flour.description = "A heap of white flour.";
733 "You break open the bag and add the flour to the pan.";
735 if (noun == sugar_cube) {
736 sugar_cube.short_name = "quantity of sugar";
737 move sugar_cube to Baking_Pan;
738 sugar_cube.description = "Some sugar scattered about.";
739 "You crumble the sugar cube into the pan.";
741 if (noun == baking_powder) {
742 baking_powder.short_name = "small sprinkling of baking powder";
743 move baking_powder to Baking_Pan;
744 baking_powder.description = "A small pile of very fine white powder.";
745 "You open the packet and add the powder to the pan.";
747 if (noun == corbie_egg) {
748 corbie_egg.short_name = "bit of raw egg";
749 move corbie_egg to Baking_Pan;
750 corbie_egg.description = "The yolk and the white parts from an egg.";
751 "You crack the egg and drop the gooey contents into the \
752 pan, discarding the shell.";
757 Object pan_sticker "sticker" Baking_Pan
759 initial "There's a sticker stuck to the bottom of the pan.",
761 Frobozz Magic Baking Pan^^\
763 To mix ingredients placed in pan, simply say 'MIX PAN'. \
764 Baked goods should be removed with a Frobozz Magic \
770 Object dough "lump of dough"
772 number 0, ! equals the number of times folded
775 description "It looks like a nice beige lump of uncooked dough.",
778 if (action==##Eat) remove self;
781 if (the_spell_was == gloth_spell) {
782 dough.number = dough.number + 83;
783 if (dough.number > 500) dough.number = 500;
784 "As you speak the chant, the dough seems to \
785 twinkle! With a sudden puff of flour, the dough spins and \
786 neatly kneads itself many times!";
789 dough.number = dough.number + 1;
790 print "You roll up your sleeves and start kneading. \
792 if (dough.number > 500) dough.number = 500;
793 if (dough.number < 50)
795 if (dough.number > 200)
796 "has the consistency of a soft rock.";
804 ! number = condition:
805 ! 0 ok, 1 undercooked, 2 overck, 3 underfld, 4 overfld
808 switch (cake.number) {
809 1: "somewhat raw-looking cake.";
810 2: "nice-looking cake, except that it \
811 looks a little burned.";
812 default: "nice-looking cake.";
813 ! The player will have to taste the cake to check the
820 "Not bad. Unfortunately, it looks like you can't have \
821 your cake and eat it too.";
823 print "You taste a tiny bit of the cake. ";
824 switch (cake.number) {
825 1: "It tastes a bit underdone.";
826 2: "It tastes a little burned.";
827 3: "It's a little too soft.";
828 4: "It's a bit tough.";
829 default: "It tastes great!";
842 Object GHOST "frightening zombie" House_Basement
843 with name "zombie" "frightening",
844 description "A frightening gaunt member of the \
845 living dead, with pale skin, and even paler eyes.",
848 if (the_spell_was == wigro_spell) {
850 "The zombie crumbles into dust, turned.";
855 if (noun==holywater) {
856 remove holywater; remove self;
857 "The vial breaks into shards, scattering \
858 holy water all over the zombie. The zombie shrieks, and \
859 crumbles into dust.";
861 Attack: "Your attack knocks it back, but it \
862 seems completely unharmed, somehow!";
864 if (noun==rubber_gloves) {
865 move wire to House_Basement;
866 move rubber_gloves to House_Basement;
867 give rubber_gloves ~worn;
869 give House_switchbox open;
871 "The zombie seems to regard the gloves, and slowly puts \
872 them on. It proceeds to open the metal box and remove a \
873 loose wire, producing a few sparks in the process. Finally, \
874 it places the loose wire on the floor, satisfied. It \
875 slowly crumbles into dust, but you just manage to hear, \
876 ~Thanks, I've been trying to get rid of that wire for ages,~ \
877 in the faintest of whispers.";
879 default: "Zombies are usually not very responsive to \
880 those among the living. This one is no exception.";
888 Object gray_scroll "gray scroll" House_Basement
893 Object tossio_spell "turn granite to pasta" gray_scroll
897 if ((location == THIEF_Storeroom) &&
898 (second == w_obj) && (THIEF_Storeroom hasnt general)) {
899 give THIEF_Storeroom general;
900 move pasta to THIEF_Storeroom;
901 move c50 to THIEF_Storeroom;
902 "As you finish the chant, the granite wall is replaced \
903 by a large mass of pasta. A hidden section of the room is revealed, \
904 along with the mass of gold coins it was holding! The coins spill \
905 out, and nearly flood the room.^^In a flash, a large group of \
906 financial nymphs appear on the scene. ~It looks like we found the \
907 missing GUS earnings,~ one nymph says to another. Producing large \
908 sacks, they quickly collect the mass of coins and disappear with a \
909 twinkle.^^Moments later, a single coin falls out of a crack in the \
910 previously hidden alcove, rolling to a stop near your feet.";
912 "Your chant goes unanswered. I guess you need pure granite.";
920 Object red_sphere "red sphere"
923 description "A tiny perfect red sphere, made of some strange \