8d420a072052526f159834e56f1967d40251f53b
[spiritwrak.git] / src / gurth.inf
1
2 ! **************************************************************
3 ! GURTH.INF -- Add-on for SPIRITWRAK
4 ! (all rights reserved, copyright 1996, D. Yu
5 ! **************************************************************
6
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  
13
14 ! The string array for labels on the GUE Oven dial (may be changed)
15 Array OVEN_settings table [;
16    "Warm Soup"; 
17    "Hot Chocolate"; 
18    "Pizza"; 
19    "Cake";
20    "Fish";
21    "Roast Chicken";
22    "Baked Potato";
23    "Rib Roast";
24    "Thermo-nuclear Flash";
25 ];
26
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,
34    has light;
35
36 Object umbrella "umbrella" GURTH_GUSStop
37    with name "umbrella",
38         description [;
39            if (self has open)
40               print "An open";
41            else print "A closed";
42            " black-cloth umbrella.";
43         ],
44         !weight 25,
45         size 16,
46         article "an",
47         before [;
48            Open:
49               if (parent(self) == player) {
50               give self open;
51               umbrella.size = 20;
52               "You snap the umbrella open.";
53               }
54               else "You need to be holding the umbrella to do that.";
55            Close:
56               if (parent(self) == player) {
57               give self ~open;
58               umbrella.size = 16;
59               "You snap the umbrella closed.";
60               }
61               else "You need to be holding the umbrella to do that.";
62         ],
63    has openable;
64
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 \
69 northeast.",
70         name "cobblestone" "buildings" "road",
71         nw_to GURTH_GUSStop,
72         s_to GURTH_MDistrict,
73         ne_to GURTH_Forest,
74    has light;
75
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,
83         each_turn [;
84         if (random(10) < 4) {
85            "^A rumble of thunder booms overhead.";
86         }
87         ],
88         before [;
89            Listen:
90               if (Treant in GURTH_Forest)
91                  "You hear muffled cries for help from \
92 somewhere inside the log cabin!";
93         ],
94    has light;
95
96 Object storm1 "storm" GURTH_Forest
97    with name "storm" "clouds" "sky" "dark",
98         description "It does look a bit stormy overhead.",
99         before [;
100            Cast:
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!";
108                     SaveWoodsman();
109                     rtrue;
110                  }
111                  else {
112                     deadflag = 1;
113                     "you, frying you to a crisp!";
114                  }
115               }
116         ],
117    has scenery;
118
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 \
125 blight.",
126    article "an",
127    each_turn [ i ;
128      i = random(20);
129      print "^The treant ";
130      if (i > 10) {
131         if (WOOD_House.number == 3) {
132            WOOD_House.number = 4;
133            remove self;  
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!";
137         }
138         else {
139           WOOD_House.number = WOOD_House.number + 1;
140           "hammers on the house and you hear a \
141 crack! The cabin sustains some damage!";
142         }        
143      }
144      else "angrily attacks the wood cabin, which shakes \
145 with the continued blows.";
146    ],        
147    before [;
148       Cast:
149          if (the_spell_was == egdelp_spell) {
150             deadflag = 1;
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.";
155          }
156          if (the_spell_was == throck_spell) {
157             deadflag = 1;
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.";
161          }
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.";
167             SaveWoodsman();
168             rtrue;
169          } 
170    ],
171    has animate;
172
173 Object WOOD_House "log cabin" GURTH_Forest
174    with name "cabin" "log" "house",
175         description [; 
176             print "A small house built of logs";
177             switch (self.number) {
178             0: print ".";
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."; 
186             } 
187             if (self has general)
188                " You notice some area of wood have spots of wax \
189 on them.";
190             new_line;
191             rtrue;
192         ],
193         before [;
194            Enter:
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.";
199            Cast:
200               if (the_spell_was == egdelp_spell) {
201                  give self general;
202                  "The outside of the cabin is now covered \
203 with spots of waxy buildup.";
204               }
205         ],
206         number 0,
207    has static;
208
209 [ SaveWoodsman ;
210    remove Treant;
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.";
222 ];
223
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 \
232 try to pass.",
233         w_to "~No push'n, no shov'n!~ some old hag screams at you, \
234 and promptly shoves you back.",
235         each_turn [;
236            if ((random(10) < 5) && (self hasnt general)) {
237               give self general;
238               move c7 to self;
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.";
242            }
243         ],
244         has light;
245
246 Object c7 "coin" class coin_class;
247
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 \
254 than the rest.",
255         name "houses" "characters" "people" "road" "flat",
256         n_to GURTH_MDistrict,
257         s_to [;
258            print "You wander down ";
259            if (random(20) == 5) {
260               deadflag = 1;
261               "a back alleyway, and are immediately \
262 assaulted by a group of vicious thugs, who batter you senseless.";
263            }
264            else "an alleyway, find a dead-end, and return \
265 here.";
266         ],
267         w_to [;
268            print "You wander down ";
269            if (random(20) == 5) {
270               deadflag = 1;
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.";
275            }
276            else "a sidestreet, find a dead-end, and return \
277 here.";
278         ],
279         e_to GURTH_House,
280    has light;
281
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 \
286 the west.",
287         name "street" "steps" "flat",
288         w_to GURTH_SDistrict,
289         e_to House_Ent,
290         in_to House_Ent,
291    has light;
292
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",
297         w_to [;
298                deadflag = 1;
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 \
305 crushes you.";
306         ],
307         e_to Construction_site,
308    has light;                      
309
310
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.",
315         size 15,
316         time_left 0,
317         time_out [;
318            ! Construction Worker appears
319            if ((good_brick in Construction_site) || 
320                ((good_brick notin Construction_site) && 
321                 (bad_brick notin Construction_site))) {
322               remove good_brick; 
323               foundation_wall.number = 1;
324            }
325            else {
326               remove bad_brick;
327               foundation_wall.number = 2;
328            }
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.";
338               else 
339 " He looks at the patch somewhat \
340 unsatisfied, but shrugs, and walks off, soon out of sight.";
341            }
342            else 
343               "^You hear some brief noises from the east."; 
344         ],
345 ;
346
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",
353    w_to GURTH_House2,
354    has light;
355
356 Object good_brick "thick brick" Construction_site
357    with name "brick" "thick",
358         !weight 30, 
359         size 15,
360         initial "A thick brick lies nearby.",
361         description "A thick brick, solid as a rock.",
362 ;
363
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 \
367 in the ditch.",
368         number 0,
369         size 15,
370         description [;
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 \
378 lower in quality.";
379            } 
380         ],
381         before [;
382            Receive:
383               if (self.number > 0)
384                  "The wall is currently sealed shut.";
385               else {
386                  move noun to self;
387                  print "You put ", (the) noun, " into the ";
388                  "small hole in the wall.";
389               }
390            Search, LetGo:
391               if (self.number > 0)
392                  "The wall is currently sealed shut.";
393            Attack:
394               if (self.number == 0) {
395                  deadflag = 1;
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.";
399               } 
400               if (self.number == 1) {
401                  remove foundation;
402                  print "You try to break the wall, but only end up \
403 hurting your hand. ";
404               }
405               else {
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. ";
410               }
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 \
416 cave walls.^";
417               Mystical_Cave.number = Mystical_Cave.number + 1;
418               PlayerTo(Mystical_Cave);
419               rtrue;
420         ],
421    has static container open;
422
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",
428         e_to House_Kitchen,
429         d_to House_Basement,
430         w_to GURTH_House,
431         out_to GURTH_House,
432    has light;
433
434 Object House_Basement "Basement"
435    with description "A musty, smelly basement. Stairs head up.",
436         name "stairs",
437         u_to House_Ent,
438         before [;
439            Smell: "It's smells musty down here, as though \
440 the place has been unused for quite some time.";
441         ],
442 ;
443
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.",
447         when_open [ x;
448          print "There's an open metal box attached to the wall here. ";
449          x = children(self);
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); 
454          rtrue;
455         ],
456         capacity 3,
457         size 10,
458         description "A dusty metal box, attached to the wall.",
459         before [;
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.";
464         ],
465    has static container openable;
466
467
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.",
472         !weight 2,
473         size 1,  ! must fit in subway gate slot...
474         before [;
475           Cast:
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! ";
485                 }
486                 else {
487                    print "As your fingers get near the wire, \
488 a bright spark of electricity ";
489                    if (random(10) < 4) {
490                    deadflag = 1;
491                    move GHOST to House_Basement;
492 "arcs into your hand! The results are quite shocking, I'm afraid.";
493                    }
494                    else
495 "flashes near your fingers! You pull back just in time.";
496                 }
497              }
498         ],
499 ;        
500
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.",
508         before [;
509            Receive:
510               "No need to put things in the foundation like that.";
511            Search:
512               if (self hasnt general)
513                  "You briefly search the decaying foundation, but find nothing.";
514               else {
515                  print "You dig around in a familiar spot in the hole ";
516                  give self ~general;
517                  if (children(foundation_wall) == 0)
518                     "but find nothing.";
519                  Achieved(17);
520                  while (child(foundation_wall) ~= 0)
521                      move child(foundation_wall) to House_Basement;
522                  "and find something!"; 
523               }
524         ],
525    has static;
526    
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 \
531 north and west.",
532         name "cabinets" "windows" "wood",
533         w_to House_Ent,
534         n_to House_Pantry,
535    has light;
536
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.",
542         capacity 1,
543         when_open [ x;
544          print "Strangely untouched and undamaged, a GUE-Automatic oven is \
545 sitting open in a corner of the room.";
546          x = children(self);
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); 
551          rtrue;
552         ],
553         size 15,
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 \
557 on the top.",
558         before 
559         [ x ;
560            Open:
561               if (self hasnt open) {
562               give self open;
563               print "You open the oven, ";
564               x = children(self);
565               if (x==0) "which is empty.";
566               print "revealing:^";
567               x = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT;
568               WriteListFrom (child(self), x, 1); 
569               rtrue; }             
570         ], 
571         add_to_scope oven_dial oven_button,
572    has static container openable;
573             
574 Object oven_dial "oven dial" 
575    with name "dial",
576         number 5,
577         description [;
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); "~.";
581         ],
582         before [;
583           Turn:
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);
587             "~ on the dial.";
588           SetTo:
589             "The dial has somewhat unusual \
590 settings. You'll need to turn to the one you want.";
591         ],
592    has static;
593
594 Object oven_button "oven button" 
595    with name "button" "black",
596         number 0,
597         description "A small round black button on the top of the oven.",
598         before [;
599            Push:
600               if (OVEN has open)
601                  "There is an irritated buzz.";
602               else {
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)
608                     remove child(OVEN);       
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.";
612               } 
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))
623                        cake.number = 0;
624                     ! otherwise, nothing changes
625                  }
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)
639                           cake.number = 3;
640                        if (dough.number > 83)
641                           cake.number = 4;
642                        else cake.number = 0;   ! well done baker
643                     }
644                     else {
645                        if (oven_dial.number < 4)
646                           cake.number = 1;
647                        if (oven_dial.number > 4)
648                           cake.number = 2;
649                     } 
650                  }
651               }
652 "a loud 'pop' and nearly springs off \
653 the floor! Then, just as suddenly, everything is quiet again.";
654               }
655         ],
656    has static;
657
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.",
661    s_to House_Kitchen,
662    has light;
663     
664 Object Baking_Pan "baking pan" House_Pantry  
665    with name "pan" "baking",
666         description "It's a nice round flat-bottomed ceramic pan.",
667         capacity 20,
668         !weight 10,
669         size 14,
670         before 
671         [ i ;
672           Mix:
673              if (children(Baking_Pan) == 0)
674                 "There doesn't seem to be anything in the pan to mix.";
675              else {
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) {
681                    i = 0;
682                    move dough to OVEN;  ! Temp
683                    while (child(Baking_Pan) ~= 0) {
684                          i = i + 1;
685                          move child(Baking_Pan) to dough;
686                    }
687                    move dough to Baking_Pan;
688                    if (i == 0) 
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.";
692                 }
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.";
700                 else {
701                    while (child(Baking_Pan) ~= 0) {
702                         move child(Baking_Pan) to dough;
703                    }
704                    move dough to Baking_Pan;
705                    "You start mixing. Like magic, in short time you \
706 have a doughy mixture in the pan."; 
707                 } 
708              }
709           LetGo:
710              if (noun == dough or cake) { 
711                 CDefArt(noun); " is stuck fast in the pan and \
712                 you can't get it out.";
713              }
714              else {
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.";
722              }
723           Receive:
724              if (cake in self)
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.
729              if (noun == flour) {
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."; 
734              }
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.";
740              }
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.";
746              }
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.";
753              }
754         ],
755    has container open;
756
757 Object pan_sticker "sticker" Baking_Pan
758    with name "sticker",
759         initial "There's a sticker stuck to the bottom of the pan.",
760         description "\
761 Frobozz Magic Baking Pan^^\
762 HELLO, BAKER!^^\
763 To mix ingredients placed in pan, simply say 'MIX PAN'. \
764 Baked goods should be removed with a Frobozz Magic \
765 Spatula.",
766         !weight 1,
767         size 5,
768 ;
769
770 Object dough "lump of dough"
771    with name "dough",
772         number 0,   ! equals the number of times folded
773         !weight 10,
774         size 14,
775         description "It looks like a nice beige lump of uncooked dough.", 
776         before [;
777           Eat, Taste:
778              if (action==##Eat) remove self;
779              "Ugg. Raw dough.";
780           Cast:
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!";
787              }
788           Fold:
789              dough.number = dough.number + 1;
790              print "You roll up your sleeves and start kneading. \
791 The dough "; 
792              if (dough.number > 500) dough.number = 500;
793              if (dough.number < 50)
794                 "folds easily.";
795              if (dough.number > 200)
796                 "has the consistency of a soft rock.";
797              "is pliable.";
798         ], 
799    has edible;
800
801 Object cake "cake" 
802    with name "cake",
803         number 0,  
804 ! number = condition:
805 ! 0 ok, 1 undercooked, 2 overck, 3 underfld, 4 overfld
806         description [;
807               print "It's a ";
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
814                 ! 'fold quality'.
815               }
816         ],
817         before [;
818            Eat:
819                 remove self;
820                 "Not bad. Unfortunately, it looks like you can't have \
821 your cake and eat it too.";
822            Taste:
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!";
830               }
831            ], 
832         !weight 10,
833         size 14,
834    has edible;
835
836
837
838 ! ***************
839 ! animated beings
840 ! ***************
841
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.",
846         before [;
847            Cast:
848               if (the_spell_was == wigro_spell) {
849                  remove self;
850                  "The zombie crumbles into dust, turned.";
851               }
852         ],
853         life [;
854            ThrowAt:
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."; 
860               }
861            Attack: "Your attack knocks it back, but it \
862 seems completely unharmed, somehow!";
863            Give:
864 if (noun==rubber_gloves) {
865    move wire to House_Basement;
866    move rubber_gloves to House_Basement;
867    give rubber_gloves ~worn;
868    give wire general;
869    give House_switchbox open;
870    remove self;
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.";
878 }    
879            default: "Zombies are usually not very responsive to \
880 those among the living. This one is no exception.";
881         ],
882    has animate;
883
884 ! ***************
885 ! spells/scrolls
886 ! ***************
887
888 Object gray_scroll "gray scroll" House_Basement
889   class scroll_class,
890   with name "gray",
891 ;
892
893 Object tossio_spell "turn granite to pasta" gray_scroll
894   class spell_class,
895   with name "tossio",
896        magic [;
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.";
911          }
912          "Your chant goes unanswered. I guess you need pure granite.";
913        ],
914 ;
915
916 ! ***************
917 ! misc items
918 ! ***************
919
920 Object red_sphere "red sphere"
921    class sphere_class
922    with name "red",
923         description "A tiny perfect red sphere, made of some strange \
924          unknown metal.",
925 ;