Implement per-file license notices
[spiritwrak.git] / src / gurth.inf
1
2 ! **************************************************************
3 ! GURTH.INF -- Add-on for SPIRITWRAK
4 ! (all rights reserved, copyright 1996, D. Yu
5 !
6 ! SPIRITWRAK is free software; you can redistribute it and/or modify
7 ! it under the terms of the GNU General Public License as published by
8 ! the Free Software Foundation; either version 3 of the License, or
9 ! (at your option) any later version.
10 !
11 ! SPIRITWRAK is distributed in the hope that it will be useful, but
12 ! WITHOUT ANY WARRANTY; without even the implied warranty of
13 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 ! General Public License for more details.
15 !
16 ! You should have received a copy of the GNU General Public License
17 ! along with SPIRITWRAK. If not, see <https://www.gnu.org/licenses/>.
18 ! **************************************************************
19
20 ! (author note to self -- Gurth currently isn't going to be too
21 ! exciting -- I'm running out of .z5 code space.  The main 
22 ! planned features are:
23 !   1) The abandoned house with the oven for baking the cake
24 !   2) A deep forest area somewhat north of the city where
25 !      a sphere piece will be hidden  
26
27 ! The string array for labels on the GUE Oven dial (may be changed)
28 Array OVEN_settings table [;
29    "Warm Soup"; 
30    "Hot Chocolate"; 
31    "Pizza"; 
32    "Cake";
33    "Fish";
34    "Roast Chicken";
35    "Baked Potato";
36    "Rib Roast";
37    "Thermo-nuclear Flash";
38 ];
39
40 Object GURTH_GUSStop "Gurth City Streets"
41    with description "A foggy sky covers the ever-busy city of \
42 Gurth. A road heads southeast into a larger \
43 portion of the city, and stairs lead down here.",
44         name "fog" "sky" "road" "stairs",
45         d_to GURTH_GUSStation,
46         se_to GURTH_NDistrict,
47    has light;
48
49 Object umbrella "umbrella" GURTH_GUSStop
50    with name "umbrella",
51         description [;
52            if (self has open)
53               print "An open";
54            else print "A closed";
55            " black-cloth umbrella.";
56         ],
57         !weight 25,
58         size 16,
59         article "an",
60         before [;
61            Open:
62               if (parent(self) == player) {
63               give self open;
64               umbrella.size = 20;
65               "You snap the umbrella open.";
66               }
67               else "You need to be holding the umbrella to do that.";
68            Close:
69               if (parent(self) == player) {
70               give self ~open;
71               umbrella.size = 16;
72               "You snap the umbrella closed.";
73               }
74               else "You need to be holding the umbrella to do that.";
75         ],
76    has openable;
77
78 Object GURTH_NDistrict "North District"
79    with description "Probably the safest district in Gurth, the \
80 North District is mostly cobblestone roads and barricaded \
81 buildings. A main road heads south, or forks northwest and \
82 northeast.",
83         name "cobblestone" "buildings" "road",
84         nw_to GURTH_GUSStop,
85         s_to GURTH_MDistrict,
86         ne_to GURTH_Forest,
87    has light;
88
89 Object GURTH_Forest "Forest Edge"
90    with description "Dark forest meets dark city outskirts here. \
91 The only exit is along an old path to the southwest -- \
92 the forest is too thick for travel otherwise. \
93 Rain falls periodically from a dark stormy sky.",
94         name "forest" "path" "rain",
95         sw_to GURTH_NDistrict,
96         each_turn [;
97         if (random(10) < 4) {
98            "^A rumble of thunder booms overhead.";
99         }
100         ],
101         before [;
102            Listen:
103               if (Treant in GURTH_Forest)
104                  "You hear muffled cries for help from \
105 somewhere inside the log cabin!";
106         ],
107    has light;
108
109 Object storm1 "storm" GURTH_Forest
110    with name "storm" "clouds" "sky" "dark",
111         description "It does look a bit stormy overhead.",
112         before [;
113            Cast:
114               if (the_spell_was == shazok_spell) {
115                  print "A bolt of lightning rips down from the \
116 clouds overhead as you finish your chant! It strikes ";
117                  if (Treant in GURTH_Forest) {
118                     print "the angry treant! \
119 A portion of its top branches catch fire! Howling in pain, \
120 the creature runs off into the woods and disappears!";
121                     SaveWoodsman();
122                     rtrue;
123                  }
124                  else {
125                     deadflag = 1;
126                     "you, frying you to a crisp!";
127                  }
128               }
129         ],
130    has scenery;
131
132 Object Treant "angry treant" GURTH_Forest
133    with name "treant" "angry" "blighted",
134         description "Treants are basically animated trees. They \
135 are considered mythical creatures, usually solitary and quite \
136 rare. This particular treant looks similar to a great elm tree. \
137 You notice that it seems covered with spots of some sort of \
138 blight.",
139    article "an",
140    each_turn [ i ;
141      i = random(20);
142      print "^The treant ";
143      if (i > 10) {
144         if (WOOD_House.number == 3) {
145            WOOD_House.number = 4;
146            remove self;  
147            "pounds the cabin, and it collapses into \
148 splinters! The treant grabs a hapless woodsman from the \
149 wreckage and stalks off into the forest with his victim!";
150         }
151         else {
152           WOOD_House.number = WOOD_House.number + 1;
153           "hammers on the house and you hear a \
154 crack! The cabin sustains some damage!";
155         }        
156      }
157      else "angrily attacks the wood cabin, which shakes \
158 with the continued blows.";
159    ],        
160    before [;
161       Cast:
162          if (the_spell_was == egdelp_spell) {
163             deadflag = 1;
164             "The treant is covered with a waxy buildup, which \
165 washes off in the rain. The treant, already \
166 rather incensed, turns his attentions to you and mauls you \
167 with two giant branches/arms.";
168          }
169          if (the_spell_was == throck_spell) {
170             deadflag = 1;
171             "The treant grows a bit bigger. His current bad \
172 mood seems to increase proportionately! He turns his attentions \
173 to you and pounds you with two huge branches/arms.";
174          }
175          if (the_spell_was == taclor_spell) {
176             print "The treant seems to turn a shade of deep \
177 green, and the patches of blight disappear! The ancient tree \
178 creature pauses, regards you solemnly, and then walks \
179 off into the forest.";
180             SaveWoodsman();
181             rtrue;
182          } 
183    ],
184    has animate;
185
186 Object WOOD_House "log cabin" GURTH_Forest
187    with name "cabin" "log" "house",
188         description [; 
189             print "A small house built of logs";
190             switch (self.number) {
191             0: print ".";
192             1: print ". It looks slightly damaged.";
193             2: print ". It looks partially damaged, the roof logs \
194 are broken in several places.";
195             3: print ". It looks very damaged. One wall is \
196 nearly broken through.";
197             default: print " that has collapsed into little more \
198 than a pile of broken logs."; 
199             } 
200             if (self has general)
201                " You notice some area of wood have spots of wax \
202 on them.";
203             new_line;
204             rtrue;
205         ],
206         before [;
207            Enter:
208               if (Treant in GURTH_Forest)
209               "The angry treant seems to be in the way.";
210               "It's just a tiny log cabin that probably \
211 has nothing interesting inside.";
212            Cast:
213               if (the_spell_was == egdelp_spell) {
214                  give self general;
215                  "The outside of the cabin is now covered \
216 with spots of waxy buildup.";
217               }
218         ],
219         number 0,
220    has static;
221
222 [ SaveWoodsman ;
223    remove Treant;
224    move red_sphere to player;
225    "^^Moments later, a woodsman appears from the battered log \
226 cabin. ~Much thanks, sir,~ he says. ~Appears I mistook that \
227 treant for a dead tree and tried to cut it down. Can't say \
228 he took it too well.~ he says sheepishly. ~Say, you don't \
229 look like you're from around these parts. Kinda like this \
230 funny thing I found in the woods the other day.~ He hands \
231 you a strange round object. ~Maybe you know what to do with \
232 it?~ He hefts a small hatchet over his shoulder. ~Well, \
233 back to do a little logging,~ he says, as he walks off into the \
234 deep forest, whistling.";
235 ];
236
237 Object GURTH_MDistrict "Market District"
238    with description "The famous Gurth Market District is as noisy, \
239 crowded, and dangerous as it ever was. A cobblestone road heads \
240 north and south here.",
241         name "cobblestone" "road",
242         n_to GURTH_NDistrict,
243         s_to GURTH_SDistrict,
244         e_to "~Get out 'o me way!~ some rude fellow says as you \
245 try to pass.",
246         w_to "~No push'n, no shov'n!~ some old hag screams at you, \
247 and promptly shoves you back.",
248         each_turn [;
249            if ((random(10) < 5) && (self hasnt general)) {
250               give self general;
251               move c7 to self;
252               "^A clumsy hawker stumbles into you as he \
253 crosses the street, hustling off without so much as an \
254 apology. You notice he dropped something in his hurry.";
255            }
256         ],
257         has light;
258
259 Object c7 "coin" class coin_class;
260
261 Object GURTH_SDistrict "South District"
262    with description "The general gloomy atmosphere is more noticeable \
263 than ever here, in the extremely dangerous South District. The \
264 general area is filled with boarded-up houses, and a few shifty-eyed \
265 characters are the only people milling about here. A road leads \
266 north. To the east is an abandoned flat, probably in better shape \
267 than the rest.",
268         name "houses" "characters" "people" "road" "flat",
269         n_to GURTH_MDistrict,
270         s_to [;
271            print "You wander down ";
272            if (random(20) == 5) {
273               deadflag = 1;
274               "a back alleyway, and are immediately \
275 assaulted by a group of vicious thugs, who batter you senseless.";
276            }
277            else "an alleyway, find a dead-end, and return \
278 here.";
279         ],
280         w_to [;
281            print "You wander down ";
282            if (random(20) == 5) {
283               deadflag = 1;
284               "a sidestreet, and are immediately \
285 assaulted by a group of vicious thugs. One of them seems to \
286 recognize you. ~That's the Preacher-man who got Davey arrested! \
287 Let's show 'em what we think'o that!~ They proceed to beat you senseless.";
288            }
289            else "a sidestreet, find a dead-end, and return \
290 here.";
291         ],
292         e_to GURTH_House,
293    has light;
294
295 Object GURTH_House "Front of House"
296    with description "You're standing at the rotting front steps of \
297 a small flat. The front door to the east has been battered down and \
298 you could probably walk right in, or return to the street to \
299 the west.",
300         name "street" "steps" "flat",
301         w_to GURTH_SDistrict,
302         e_to House_Ent,
303         in_to House_Ent,
304    has light;
305
306 Object GURTH_House2 "Front of House"
307    with description  "You're standing near a small construction site. \
308 A city street lies west, and a construction ditch is east.",
309         name "street" "ditch",
310         w_to [;
311                deadflag = 1;
312               "You step into the street, and several locals \
313 give you strange looks. The surrounding neighborhood seems \
314 new and busy -- various construction sites mark the \
315 work of enterprising shop-keepers of the area.^^\
316 ~Watch out there!~ someone cries. A sudden \
317 pile of bricks falls from a nearby scaffolding, and \
318 crushes you.";
319         ],
320         e_to Construction_site,
321    has light;                      
322
323
324 Object bad_brick "dusty brick" GURTH_House2
325    with name "brick" "dusty" "old",
326         initial "An old discarded brick lies nearby.",
327         description "An old brick, slightly cracked in several places.",
328         size 15,
329         time_left 0,
330         time_out [;
331            ! Construction Worker appears
332            if ((good_brick in Construction_site) || 
333                ((good_brick notin Construction_site) && 
334                 (bad_brick notin Construction_site))) {
335               remove good_brick; 
336               foundation_wall.number = 1;
337            }
338            else {
339               remove bad_brick;
340               foundation_wall.number = 2;
341            }
342            if (location == Construction_site) {
343               print "^From behind some scaffolding, a construction \
344 worker appears. He walks to a part of the ditch and starts to \
345 make some finishing touches on part of a low wall. \
346 He finds a brick nearby and applies it to the wall with \
347 a good patch of mortar.";
348               if (foundation_wall.number == 1) 
349 " Brushing himself off, he walks off \
350 and is soon out of sight.";
351               else 
352 " He looks at the patch somewhat \
353 unsatisfied, but shrugs, and walks off, soon out of sight.";
354            }
355            else 
356               "^You hear some brief noises from the east."; 
357         ],
358 ;
359
360 Object Construction_site "Construction Site"
361 with description "This is a long square ditch that is \
362 likely to be the starting point for some building. It is \
363 framed by wood slats and short brick walls. The only way \
364 out is to the west.",
365    name "ditch" "slats" "wood",
366    w_to GURTH_House2,
367    has light;
368
369 Object good_brick "thick brick" Construction_site
370    with name "brick" "thick",
371         !weight 30, 
372         size 15,
373         initial "A thick brick lies nearby.",
374         description "A thick brick, solid as a rock.",
375 ;
376
377 Object foundation_wall "portion of wall" Construction_site
378    with name "wall" "foundation" "portion" "hole" "recess",
379         initial "You notice a foundation side wall \
380 in the ditch.",
381         number 0,
382         size 15,
383         description [;
384            switch (self.number) {
385            0: "It looks somewhat unfinished. Part of it \
386 is open into a dark recess in the side of the ditch.";
387            1: "The wall is a finished work of brick and \
388 mortar. It looks quite strong.";
389            2: "The wall is a finished work of brick and \
390 mortar. You see a spot where the brickwork seems a bit \
391 lower in quality.";
392            } 
393         ],
394         before [;
395            Receive:
396               if (self.number > 0)
397                  "The wall is currently sealed shut.";
398               else {
399                  move noun to self;
400                  print "You put ", (the) noun, " into the ";
401                  "small hole in the wall.";
402               }
403            Search, LetGo:
404               if (self.number > 0)
405                  "The wall is currently sealed shut.";
406            Attack:
407               if (self.number == 0) {
408                  deadflag = 1;
409                  "You kick at the wall. Unfortunately, it wasn't \
410 all that stable, and the wall falls apart, burying you under a \
411 pile of loose bricks.";
412               } 
413               if (self.number == 1) {
414                  remove foundation;
415                  print "You try to break the wall, but only end up \
416 hurting your hand. ";
417               }
418               else {
419               give foundation general;
420               print "You knock on the weak portion of the \
421 wall, and produce a slight crack, that no doubt will \
422 cause the homeowners some worry in the future. ";
423               }
424 !              give GURTH_House ~general;
425               while (child(player) ~= 0) remove child(player);
426 !              while (child(GURTH_House) ~= 0) remove child(GURTH_House);
427 print "The wall seems to start to glow a purple color, and you \
428 step back, to find your surroundings replaced by cold natural \
429 cave walls.^";
430               Mystical_Cave.number = Mystical_Cave.number + 1;
431               PlayerTo(Mystical_Cave);
432               rtrue;
433         ],
434    has static container open;
435
436 Object House_Ent "Entrance Room"
437    with description "A bare room, with peeling paint and rotting, \
438 water-stained walls. There's a room to the east, and a rickety \
439 stairway down. The outdoors lie west.",
440         name "paint" "stairway" "outdoors",
441         e_to House_Kitchen,
442         d_to House_Basement,
443         w_to GURTH_House,
444         out_to GURTH_House,
445    has light;
446
447 Object House_Basement "Basement"
448    with description "A musty, smelly basement. Stairs head up.",
449         name "stairs",
450         u_to House_Ent,
451         before [;
452            Smell: "It's smells musty down here, as though \
453 the place has been unused for quite some time.";
454         ],
455 ;
456
457 Object House_switchbox "dusty metal box" House_Basement
458    with name "dusty" "metal" "box",
459         when_closed "There's a dusty metal box attached to the wall here.",
460         when_open [ x;
461          print "There's an open metal box attached to the wall here. ";
462          x = children(self);
463          if (x == 0) "It seems to be empty.";
464          print "It contains:^";
465          x = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT;
466          WriteListFrom (child(self), x, 1); 
467          rtrue;
468         ],
469         capacity 3,
470         size 10,
471         description "A dusty metal box, attached to the wall.",
472         before [;
473            Open, Push, Pull, Turn, Touch:
474               if (GHOST in House_Basement)
475                  "Slowly, but quite deliberately, the zombie \
476 prevents you from getting near the box.";
477         ],
478    has static container openable;
479
480
481 Object wire "thin wire" House_switchbox
482    with name "wire" "thin",
483         ! initial "Inside the box is a loose wire.",
484         description "A thin stiff string of metal.",
485         !weight 2,
486         size 1,  ! must fit in subway gate slot...
487         before [;
488           Cast:
489 if ((the_spell_was == huncho_spell or luncho_spell) &&
490    (self hasnt general))
491 "Your chant goes unanswered.";
492           Take, Push, Pull, Touch, Rub, Squeeze:
493              if (self hasnt general) {
494                 if (rubber_gloves has worn) {
495                    if (action==##Take) give self general;
496                    print "As you touch the wire, you notice a \
497 bright spark! Good thing you were wearing rubber gloves! ";
498                 }
499                 else {
500                    print "As your fingers get near the wire, \
501 a bright spark of electricity ";
502                    if (random(10) < 4) {
503                    deadflag = 1;
504                    move GHOST to House_Basement;
505 "arcs into your hand! The results are quite shocking, I'm afraid.";
506                    }
507                    else
508 "flashes near your fingers! You pull back just in time.";
509                 }
510              }
511         ],
512 ;        
513
514 Object foundation "foundation" House_Basement
515    with name "foundation" "break" "hole",
516         initial "A large break in the wall exposes a good portion of \
517         the house's foundation.",
518         description "Water damage, or simply age, has exposed a large \
519         hole in one of the walls, through which you can see exposed \
520         wood and brick, part of the foundation of the house.",
521         before [;
522            Receive:
523               "No need to put things in the foundation like that.";
524            Search:
525               if (self hasnt general)
526                  "You briefly search the decaying foundation, but find nothing.";
527               else {
528                  print "You dig around in a familiar spot in the hole ";
529                  give self ~general;
530                  if (children(foundation_wall) == 0)
531                     "but find nothing.";
532                  Achieved(17);
533                  while (child(foundation_wall) ~= 0)
534                      move child(foundation_wall) to House_Basement;
535                  "and find something!"; 
536               }
537         ],
538    has static;
539    
540 Object House_Kitchen "Kitchen"
541    with description "You're in the kitchen, by the looks of things. \
542 Some broken cabinets are on the wall. Light from partially boarded-up \
543 windows lets you see the rotting wood floors. Rooms lie to the \
544 north and west.",
545         name "cabinets" "windows" "wood",
546         w_to House_Ent,
547         n_to House_Pantry,
548    has light;
549
550 ! (An oven, a typical inform object)
551 Object OVEN "GUE-Automatic oven" House_Kitchen
552    with name "oven" "GUE-Automatic",
553         when_closed "Strangely untouched and undamaged, a GUE-Automatic oven is \
554 sitting closed in a corner of the room.",
555         capacity 1,
556         when_open [ x;
557          print "Strangely untouched and undamaged, a GUE-Automatic oven is \
558 sitting open in a corner of the room.";
559          x = children(self);
560          if (x == 0) " It seems to be empty.";
561          print "  It contains:^";
562          x = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT;
563          WriteListFrom (child(self), x, 1); 
564          rtrue;
565         ],
566         size 15,
567         description "A FrobozzCo best-seller -- this small green oven is \
568 perfect for those adventurers who want a home-cooked meal, but are short \
569 on time and space. There's a dial and a button \
570 on the top.",
571         before 
572         [ x ;
573            Open:
574               if (self hasnt open) {
575               give self open;
576               print "You open the oven, ";
577               x = children(self);
578               if (x==0) "which is empty.";
579               print "revealing:^";
580               x = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT;
581               WriteListFrom (child(self), x, 1); 
582               rtrue; }             
583         ], 
584         add_to_scope oven_dial oven_button,
585    has static container openable;
586             
587 Object oven_dial "oven dial" 
588    with name "dial",
589         number 5,
590         description [;
591           print "A round dial with small printed words. A line on the \
592 oventop marks which dial setting is currently active, which at the \
593 moment is ~", (string) OVEN_settings-->(oven_dial.number); "~.";
594         ],
595         before [;
596           Turn:
597             oven_dial.number = oven_dial.number + 1;
598             if (oven_dial.number > 9) oven_dial.number = 1;
599             print "The line is now pointing to ~", (string) OVEN_settings-->(oven_dial.number);
600             "~ on the dial.";
601           SetTo:
602             "The dial has somewhat unusual \
603 settings. You'll need to turn to the one you want.";
604         ],
605    has static;
606
607 Object oven_button "oven button" 
608    with name "button" "black",
609         number 0,
610         description "A small round black button on the top of the oven.",
611         before [;
612            Push:
613               if (OVEN has open)
614                  "There is an irritated buzz.";
615               else {
616                  print "You press the button and hear a low spinning noise. \
617 Suddenly, the oven makes a ";
618               if (oven_dial.number == 9) {
619                  ! Ye old nuclear flash setting
620                  if (children(OVEN) ~= 0)
621                     remove child(OVEN);       
622 "tremendous 'bang', and nearly springs off \
623 the floor! A bright flash of light seems to originate from somewhere \
624 inside the oven! Then, just as suddenly, everything is quiet again.";
625               } 
626               ! check object in oven
627               ! if obj exists, check for edible
628               ! or cake, mutate appropriately.
629               if (children(OVEN) ~= 0) {
630                  if ((Baking_Pan in oven) && (cake in Baking_Pan)) {
631                     ! we're no doubt cooking the cake again.
632                     ! as a nice feature of the GUE auto, if the cake
633                     ! was undone, and the oven setting == 4, give
634                     ! the cake the 'done' result
635                     if ((cake.number == 1) && (oven_dial.number == 4))
636                        cake.number = 0;
637                     ! otherwise, nothing changes
638                  }
639                  if ((Baking_Pan in oven) && (dough in Baking_Pan)) {
640                     ! first, check oven setting (too cold or too hot)
641                     ! if setting ok, check number of times folded
642                     ! (too few, too many).  Move 'cake' to pan, make
643                     ! dough child of cake, and set the 'result' number
644                     ! of cake accordingly (0, ok, 1 underdone, 2
645                     ! overdone, 3 underfolded, 4 overfolded) 
646                     ! (assumption is that dough will be only thing
647                     ! in pan [add's are trapped by dough]
648                     move dough to cake;   ! Zen cooking...
649                     move cake to Baking_Pan;
650                     if (oven_dial.number == 4) {
651                        if (dough.number < 83)
652                           cake.number = 3;
653                        if (dough.number > 83)
654                           cake.number = 4;
655                        else cake.number = 0;   ! well done baker
656                     }
657                     else {
658                        if (oven_dial.number < 4)
659                           cake.number = 1;
660                        if (oven_dial.number > 4)
661                           cake.number = 2;
662                     } 
663                  }
664               }
665 "a loud 'pop' and nearly springs off \
666 the floor! Then, just as suddenly, everything is quiet again.";
667               }
668         ],
669    has static;
670
671 Object House_Pantry "Pantry"
672    with description "This was once probably a pantry of some \
673 sort. It's now a bare closet-sized room. The exit is south.",
674    s_to House_Kitchen,
675    has light;
676     
677 Object Baking_Pan "baking pan" House_Pantry  
678    with name "pan" "baking",
679         description "It's a nice round flat-bottomed ceramic pan.",
680         capacity 20,
681         !weight 10,
682         size 14,
683         before 
684         [ i ;
685           Mix:
686              if (children(Baking_Pan) == 0)
687                 "There doesn't seem to be anything in the pan to mix.";
688              else {
689                 if (cake in Baking_Pan)
690                    "You can't mix anything with the already baked cake in the pan.";
691                 ! if the dough is already in the pan, add the 
692                 ! 'new children', if any
693                 if (dough in Baking_Pan) {
694                    i = 0;
695                    move dough to OVEN;  ! Temp
696                    while (child(Baking_Pan) ~= 0) {
697                          i = i + 1;
698                          move child(Baking_Pan) to dough;
699                    }
700                    move dough to Baking_Pan;
701                    if (i == 0) 
702                       "You need to add something to the pan if you \
703 want to mix something new into the dough.";
704                    "You mix in the new ingredients into the dough.";
705                 }
706                 ! Minimally, if the flour, butter and egg are in the 
707                 ! pan, 'dough' will be produced 
708                 if ((flour notin Baking_Pan) || 
709                     (corbie_egg notin Baking_Pan) ||
710                     (butter notin Baking_Pan))
711                    "You mix the contents of the pan around a bit, but \
712 some things don't quite coagulate, and the contents remain unmixed.";
713                 else {
714                    while (child(Baking_Pan) ~= 0) {
715                         move child(Baking_Pan) to dough;
716                    }
717                    move dough to Baking_Pan;
718                    "You start mixing. Like magic, in short time you \
719 have a doughy mixture in the pan."; 
720                 } 
721              }
722           LetGo:
723              if (noun == dough or cake) { 
724                 CDefArt(noun); " is stuck fast in the pan and \
725                 you can't get it out.";
726              }
727              else {
728              ! we've modified certain ingredient objs that we want \
729              ! to 'preserve' in the pan.
730                 if ((noun == flour) || (noun == sugar_cube) ||
731                     (noun == baking_powder) || (noun == butter) ||
732                     (noun == corbie_egg) || (noun==dornberries)) 
733                    "It's somewhat scattered about in the pan right \
734 now, and you can't quite remove it cleanly.";
735              }
736           Receive:
737              if (cake in self)
738                 "The cake takes up the entire space in the pan.";
739              ! -- trap and nicely parse putting
740              ! ingredients in pan, will require modifying 
741              ! 'short_name's of various ingredients.
742              if (noun == flour) {
743                 flour.short_name = "pile of flour";
744                 move flour to Baking_Pan;
745                 flour.description = "A heap of white flour.";
746                 "You break open the bag and add the flour to the pan."; 
747              }
748              if (noun == sugar_cube) {
749                 sugar_cube.short_name = "quantity of sugar";
750                 move sugar_cube to Baking_Pan;
751                 sugar_cube.description = "Some sugar scattered about.";
752                 "You crumble the sugar cube into the pan.";
753              }
754              if (noun == baking_powder) {
755                 baking_powder.short_name = "small sprinkling of baking powder";
756                 move baking_powder to Baking_Pan;
757                 baking_powder.description = "A small pile of very fine white powder.";
758                 "You open the packet and add the powder to the pan.";
759              }
760              if (noun == corbie_egg) {
761                 corbie_egg.short_name = "bit of raw egg";
762                 move corbie_egg to Baking_Pan;
763                 corbie_egg.description = "The yolk and the white parts from an egg.";
764                 "You crack the egg and drop the gooey contents into the \
765                 pan, discarding the shell.";
766              }
767         ],
768    has container open;
769
770 Object pan_sticker "sticker" Baking_Pan
771    with name "sticker",
772         initial "There's a sticker stuck to the bottom of the pan.",
773         description "\
774 Frobozz Magic Baking Pan^^\
775 HELLO, BAKER!^^\
776 To mix ingredients placed in pan, simply say 'MIX PAN'. \
777 Baked goods should be removed with a Frobozz Magic \
778 Spatula.",
779         !weight 1,
780         size 5,
781 ;
782
783 Object dough "lump of dough"
784    with name "dough",
785         number 0,   ! equals the number of times folded
786         !weight 10,
787         size 14,
788         description "It looks like a nice beige lump of uncooked dough.", 
789         before [;
790           Eat, Taste:
791              if (action==##Eat) remove self;
792              "Ugg. Raw dough.";
793           Cast:
794              if (the_spell_was == gloth_spell) {
795                 dough.number = dough.number + 83;
796                 if (dough.number > 500) dough.number = 500;
797                 "As you speak the chant, the dough seems to \
798 twinkle! With a sudden puff of flour, the dough spins and \
799 neatly kneads itself many times!";
800              }
801           Fold:
802              dough.number = dough.number + 1;
803              print "You roll up your sleeves and start kneading. \
804 The dough "; 
805              if (dough.number > 500) dough.number = 500;
806              if (dough.number < 50)
807                 "folds easily.";
808              if (dough.number > 200)
809                 "has the consistency of a soft rock.";
810              "is pliable.";
811         ], 
812    has edible;
813
814 Object cake "cake" 
815    with name "cake",
816         number 0,  
817 ! number = condition:
818 ! 0 ok, 1 undercooked, 2 overck, 3 underfld, 4 overfld
819         description [;
820               print "It's a ";
821               switch (cake.number) {
822                 1: "somewhat raw-looking cake.";
823                 2: "nice-looking cake, except that it \
824 looks a little burned.";
825                 default: "nice-looking cake.";
826                 ! The player will have to taste the cake to check the
827                 ! 'fold quality'.
828               }
829         ],
830         before [;
831            Eat:
832                 remove self;
833                 "Not bad. Unfortunately, it looks like you can't have \
834 your cake and eat it too.";
835            Taste:
836               print "You taste a tiny bit of the cake. ";
837               switch (cake.number) {
838                 1: "It tastes a bit underdone.";
839                 2: "It tastes a little burned.";
840                 3: "It's a little too soft.";
841                 4: "It's a bit tough.";
842                 default: "It tastes great!";
843               }
844            ], 
845         !weight 10,
846         size 14,
847    has edible;
848
849
850
851 ! ***************
852 ! animated beings
853 ! ***************
854
855 Object GHOST "frightening zombie" House_Basement
856    with name "zombie" "frightening",
857         description "A frightening gaunt member of the \
858 living dead, with pale skin, and even paler eyes.",
859         before [;
860            Cast:
861               if (the_spell_was == wigro_spell) {
862                  remove self;
863                  "The zombie crumbles into dust, turned.";
864               }
865         ],
866         life [;
867            ThrowAt:
868               if (noun==holywater) {
869                  remove holywater; remove self;
870                  "The vial breaks into shards, scattering \
871 holy water all over the zombie. The zombie shrieks, and \
872 crumbles into dust."; 
873               }
874            Attack: "Your attack knocks it back, but it \
875 seems completely unharmed, somehow!";
876            Give:
877 if (noun==rubber_gloves) {
878    move wire to House_Basement;
879    move rubber_gloves to House_Basement;
880    give rubber_gloves ~worn;
881    give wire general;
882    give House_switchbox open;
883    remove self;
884    "The zombie seems to regard the gloves, and slowly puts \
885 them on. It proceeds to open the metal box and remove a \
886 loose wire, producing a few sparks in the process. Finally, \
887 it places the loose wire on the floor, satisfied. It \
888 slowly crumbles into dust, but you just manage to hear, \
889 ~Thanks, I've been trying to get rid of that wire for ages,~ \
890 in the faintest of whispers.";
891 }    
892            default: "Zombies are usually not very responsive to \
893 those among the living. This one is no exception.";
894         ],
895    has animate;
896
897 ! ***************
898 ! spells/scrolls
899 ! ***************
900
901 Object gray_scroll "gray scroll" House_Basement
902   class scroll_class,
903   with name "gray",
904 ;
905
906 Object tossio_spell "turn granite to pasta" gray_scroll
907   class spell_class,
908   with name "tossio",
909        magic [;
910          if ((location == THIEF_Storeroom) && 
911              (second == w_obj) && (THIEF_Storeroom hasnt general)) {
912          give THIEF_Storeroom general;
913          move pasta to THIEF_Storeroom;
914          move c50 to THIEF_Storeroom;
915          "As you finish the chant, the granite wall is replaced \
916 by a large mass of pasta. A hidden section of the room is revealed, \
917 along with the mass of gold coins it was holding! The coins spill \
918 out, and nearly flood the room.^^In a flash, a large group of \
919 financial nymphs appear on the scene. ~It looks like we found the \
920 missing GUS earnings,~ one nymph says to another. Producing large \
921 sacks, they quickly collect the mass of coins and disappear with a \
922 twinkle.^^Moments later, a single coin falls out of a crack in the \
923 previously hidden alcove, rolling to a stop near your feet.";
924          }
925          "Your chant goes unanswered. I guess you need pure granite.";
926        ],
927 ;
928
929 ! ***************
930 ! misc items
931 ! ***************
932
933 Object red_sphere "red sphere"
934    class sphere_class
935    with name "red",
936         description "A tiny perfect red sphere, made of some strange \
937          unknown metal.",
938 ;