Update the library to version 6.12.4
[spiritwrak.git] / src / frostham.inf
1
2 ! **************************************************************
3 ! frostham.inf
4 ! ------------
5 ! Frostham locations in SPIRITWRAK, included in spirit.inf
6 ! (Do not compile and/or use separately!)
7 !
8 ! SPIRITWRAK is free software; you can redistribute it and/or modify
9 ! it under the terms of the GNU General Public License as published by
10 ! the Free Software Foundation; either version 3 of the License, or
11 ! (at your option) any later version.
12 !
13 ! SPIRITWRAK is distributed in the hope that it will be useful, but
14 ! WITHOUT ANY WARRANTY; without even the implied warranty of
15 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 ! General Public License for more details.
17 !
18 ! You should have received a copy of the GNU General Public License
19 ! along with SPIRITWRAK. If not, see <https://www.gnu.org/licenses/>./>
20 ! **************************************************************
21
22 Object FROSTHAM_Outskirts "Frostham Outskirts"
23    with description [;
24            print  "You are at the northern outskirts of Frostham. \
25 The city proper is to the south. A few \
26 snow covered residences are nearby. \
27 A trail leads into a valley to the north";
28            if (self hasnt general) {
29               give self general;
30  ".^^The last time you saw Frostham was before you \
31 entered the Monastery -- many years ago at least. \
32 Oddly, it seemed bigger and less desolate then.";
33            }
34            else ".";
35         ],
36         name "city" "snow" "residences" "trail" "valley",
37         n_to Valley_trail,
38         s_to FROSTHAM_2,
39         cant_go "You walk around the local area a bit, finding \  
40                  nothing of interest.",
41    has light;
42
43 Object FROSTHAM_2 "Frostham"
44    with description "You are in Frostham City, the famous winter-\
45 lover's haven. The once booming ski vacation spot seems \
46 to be a bit more run-down than in times past. \
47 The city thins out towards the north, while \
48 another section of town is to the south. To the west is \
49 a large wood structure. To the southwest is a small \
50 building. To the southeast is another small building, possibly a \
51 store.",
52         name "wood" "structure" "building" "store",
53         n_to FROSTHAM_Outskirts,
54         w_to FROSTHAM_Resort,
55         sw_to FROSTHAM_Governer1,
56         s_to FROSTHAM_GUSStop,
57         se_to FROSTHAM_Store,
58         cant_go "You walk around the local streets a bit, finding \  
59                  nothing of interest.",
60         each_turn [ i ;
61            if (GROC_hall1 has general)
62               i = CheckHall();
63 ! Why check the grocery hallway here?  
64 ! Conceptually, if the player dies in the hallway (rather
65 ! difficult, but possible by swearing, for example),
66 ! the hallway should 'adjust' itself to the new weight.
67 ! I simply check this here, because the player must go
68 ! this way to reach the hallway for a second time.
69         ],
70    has light;
71
72 Object FROSTHAM_Store "General Store"
73    with description [; 
74 print "This appears to be a small grocery store, \
75 strangely abandoned at the moment. Shelves line the walls, \
76 although, since no one is minding \
77 the store, the current stock seems to be a bit depleted. \
78 You notice an exit south marked ~EMPLOYEES ONLY~ that \
79 appears to lead to ";
80 if (GROC_hall1.number == 1)
81 print "some hallway.";
82 else
83 print "a dark hole.";
84 " The way back out is to the northwest.";
85 ],
86         name "stock" "shelves",
87         nw_to FROSTHAM_2,
88         s_to [;
89 if (GROC_hall1.number == 1) return GROC_hall1;
90 else 
91    "You pull back before falling into what appears to be a deep \
92 pit of some sort beyond the south exit."; 
93 ],
94    after [ i ;
95       Go:
96          if (noun == n_obj) {
97             i = CheckHall();
98             if (i == 1)
99                print "You hear a grinding noise from behind \
100 you.^";
101          }
102    ],
103    has light;   
104
105 Class Barrel_class
106    with name "crate",
107         before [;
108            Take, Pull, Turn: "It's rather heavy.";
109            Push:  "It's heavy, but you manage to make it slide \
110 along the floor a bit.";
111            PushDir:
112 if (location == FROSTHAM_Store && second == nw_obj)
113    "A portion of the door seal blocks the crate from going outside.";
114 if (location == GROC_hall1 && second == s_obj) {
115    print "^You give the crate a good shove.^";
116    move self to GROC_hall2;
117    <<Go s_obj>>;
118 }
119 if (location == GROC_hall1 && second == n_obj) {
120    print "^You give the crate a good shove.^";
121    move self to FROSTHAM_Store;
122    <<Go n_obj>>;
123 }
124 if (location == GROC_hall2 && second == n_obj) {
125    print "^You give the crate a good shove.^";
126    move self to GROC_hall1;
127    <<Go n_obj>>;
128 }
129 if (location == FROSTHAM_Store && second == s_obj && GROC_hall1.number == 1) {
130    print "^You give the crate a good shove.^";
131    move self to GROC_hall1;
132    <<Go s_obj>>;
133 }
134 ! (we do our own version to allow the CheckHall() to
135 ! work properly)
136 AllowPushDir(); rtrue;
137         ],   
138    has static;
139
140 Object BARREL1 "dusty crate" FROSTHAM_Store
141    class Barrel_class,
142    with name "dusty",
143         description "A dust-covered crate.",
144 ;
145 Object BARREL2 "moldy crate" FROSTHAM_Store
146    class Barrel_class,
147    with name "moldy",
148         description "A mold-covered crate.",
149 ;
150 Object BARREL3 "filthy crate" FROSTHAM_Store
151    class Barrel_class,
152    with name "filthy",
153         description "A filth-covered crate.",
154 ;
155
156 Object GROC_hall1 "North end of Hallway"
157    with name "end" "hallway",
158         number 1,
159         description [;
160           print "You're at the north end of a short N-S hall. \
161 The hallway";
162  switch (GROC_hall1.number) {
163  1: print " slopes sharply upwards to the south. \
164 You notice two dark doorways above you along the northern wall, \
165 one above the other, \
166 but no obvious means of getting to them";
167  2: print " travels evenly to the south. \
168 You notice a dark doorway above you along the northern wall, \
169 but no obvious means of getting to it";
170  3: print " slopes sharply downwards to the south";
171  }
172  ". To the north is an exit."; 
173 ],
174    each_turn [;
175       if (self hasnt general) {
176          give self general;
177          "^The hallway suddenly creaks underfoot! The floor \
178 shakes briefly and dust seems to rise from cracks near the \
179 walls. Apparently, your unexpected presence has jarred \
180 some old mechanisms back to life!";
181       }
182    ],
183    n_to [;
184 switch (GROC_hall1.number) {
185    1: return FROSTHAM_Store;
186    2: return GROC_stockroom;
187    3: return GROC_attic;
188 }
189    ], 
190    after [ i ;
191       Go:
192          if (noun == n_obj or s_obj) {
193             i = CheckHall();
194             if (i == 2)
195 print "^You hear a low grinding noise. \
196 The hallway underfoot suddenly shifts and drops!^";
197          }
198    ],
199    s_to GROC_hall2,
200    before [;
201       Jump:  "You jump for a bit. The floor feels strangely \
202 unsteady.";
203    ],
204    has light;
205
206
207 Object GROC_hall2 "South end of Hallway"
208    with name "end" "hallway",
209         number 3,
210         description [;
211           print "You're at the south end of a short N-S hall \
212 that seems to lead nowhere. The hallway";
213  switch (GROC_hall2.number) {
214  1: "  slopes sharply upwards to the north.";
215  2: "  travels evenly to the north.";
216  3: "  slopes sharply downwards to the north.";
217  }
218  ],
219    after [ i ;
220       Go:
221          if (noun == s_obj) {
222             i = CheckHall();
223             if (i == 1)
224 print "^You hear a low grinding noise. \
225 The hallway underfoot suddenly shifts and drops!^";
226          }
227    ],
228    before [;
229       Jump:  "You jump for a bit. The floor feels strangely \
230 unsteady.";
231    ],
232    n_to GROC_hall1,
233    has light;
234
235 ! (Routine for checking 'weights' of two sides of hallway)
236 ! (assumes called from room's _after_ routine, thus all
237 ! barrels and players are in their after_turn places)
238 ! RETURNS: 0 if no change
239 !          1 if NORTH END now higher than before
240 !          2 if NORTH END now lower than before
241 [ CheckHall
242     i ! local total of weight points for north end
243     j ! local total of weight points for south end
244     k ! local -- orig setting of north end (.number)
245     ;
246   i = 0;  j = 0;
247   k = GROC_hall1.number;
248   if (player in GROC_hall1) 
249      i = i + 2;
250   if (player in GROC_hall2) 
251      j = j + 2;
252   if (BARREL1 in GROC_hall1) i = i + 1;
253   if (BARREL1 in GROC_hall2) j = j + 1;
254   if (BARREL2 in GROC_hall1) i = i + 1;
255   if (BARREL2 in GROC_hall2) j = j + 1;
256   if (BARREL3 in GROC_hall1) i = i + 1;
257   if (BARREL3 in GROC_hall2) j = j + 1;
258   if (i == j) {
259      GROC_hall1.number = 2;
260      GROC_hall2.number = 2;
261   }
262   if (i > j) {
263      GROC_hall1.number = 1;
264      GROC_hall2.number = 3;
265   }
266   if (i < j) {
267      GROC_hall1.number = 3;
268      GROC_hall2.number = 1;
269   }
270   if (GROC_hall1.number == k)
271      return 0;
272   if (GROC_hall1.number > k)
273      return 1;
274   if (GROC_hall1.number < k)
275      return 2;
276 ];  
277
278
279 Object GROC_stockroom "Stockroom" 
280     with description [; 
281 print "This is a tiny poorly lit room, that \
282 is covered in dust. An exit south leads to a"; 
283 if (GROC_hall1.number == 2) print " short hallway"; 
284 else print " dark hole"; 
285 if (GROC_attic has general) 
286    print ". Above, a hole has been exposed in the ceiling structure"; 
287 "."; 
288      ],  
289       name "dust", 
290       u_to [; if (GROC_attic hasnt general)
291 "You can't go that way.";
292            else return GROC_attic;
293         ],
294         s_to [;
295 if (GROC_hall1.number == 2) return GROC_hall1;
296 else 
297    "You pull back before falling into what appears to be a deep \
298 pit of some sort beyond the south exit."; 
299         ],
300    after [ i ;
301       Go:
302          if (noun == n_obj) {
303             i = CheckHall();
304             if (i == 2 or 1)
305                print "You hear a low grinding noise behind you.^";
306          }
307    ],
308         has light;
309
310 Object GROC_attic "Attic"
311    with description [;
312 print "This is an exceptionally cramped attic, obviously \
313 unused for some time. The floorboards are starting to crack.";
314 if (self has general)
315    print " One section of the floor is particularly poor, and has \
316 a gaping hole leading downwards into darkness.";
317 " An exit heads south.";
318         ],       
319         name "sag" "crack" "hole",
320         d_to [;
321            if (GROC_attic hasnt general)
322 "You can't go that way.";
323            else return GROC_stockroom;
324         ],
325         s_to [;
326 if (GROC_hall1.number == 3) return GROC_hall1;
327 else 
328    "You pull back at the edge of the exit. The floor, it \
329 appears, is too far below you!";
330         ],
331    after [ i ;
332       Go:
333          if (noun == n_obj) {
334             i = CheckHall();
335             if (i == 2)
336                print "You hear a low grinding noise behind you.^";
337          }
338    ],
339         has light;
340
341 Object attic_floorboards "floorboards" GROC_attic
342    with name "boards" "floorboards",
343         description [;
344 print "Some badly rotting floorboards";
345 if (GROC_attic has general)
346    " with a noticeable hole in one section.";
347 else {
348    if (self has general)
349       " with a noticeable sag in one section.";
350    else ".";
351 }
352         ],
353    before [;
354      Take: "They're nailed into the floor.";
355      Push, Pull, Attack, Shake:
356 if (self has general)
357    "The floor shakes a bit, but nothing else happens.";
358 else {
359    move loose_board to GROC_stockroom;
360    give self general;
361    "The floor shakes under your abuse, and suddenly, a \
362 portion in the middle sags considerably! But nothing else \
363 happens.";
364 }
365    ],     
366    has scenery;
367
368 Object loose_board "loose board"
369    with name "loose" "board",
370         initial "You notice a loose board, partially \
371 broken, hanging from the ceiling structure.",
372         description "A portion of the ceiling boards \
373 has apparently broken loose.",
374         before [;
375            Pull, Attack, Shake:
376 give GROC_attic general;
377 remove self;
378 "You give the board a good couple of yanks. The board \
379 soon breaks off, taking a small portion of the ceiling \
380 with it! After the dust settles, you notice the rather \
381 poor remodeling job you've done to the ceiling.";
382         ], 
383 has static;
384
385
386 ! (the coffee was moved to the cafe in Borphee)
387 Object decaf_coffee_can "can of decaf coffee" 
388    with name "can" "coffee" "decaf",
389         description "The can reads: ~Frobozz coffee crystals~^^\
390                     ~Rich, mountain-grown flavor.~^^DECAFFEINATED.",
391         before [;
392            Open:
393             "You'd need a good can-opener for that.";
394         ],
395         size 15,
396 ;
397    
398 Object icebox_key "square key" GROC_attic
399    with name "key" "square",
400    size 5,
401 ;   
402    
403    
404 Object icebox "icebox" GROC_stockroom
405    with name "icebox" "box",
406         description "A rather old-looking icebox.",
407         capacity 10,
408         size 20,
409         with_key icebox_key,
410         when_closed "A dust-covered icebox stands closed against \
411 the northern wall.",
412         when_open [ x;
413          print "The icebox is open. ";
414          x = children(self);
415          if (x == 0) "It is also empty.";
416          print "Inside ";
417          if (x == 1) print "is: "; else print "are: ^";
418          x = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT;
419          WriteListFrom (child(self), x, 1); 
420          rtrue;
421        ],
422    has static container openable lockable locked;
423
424 Object cerealbox1 "blue cereal box" icebox
425    with name "box" "blue" "Crunchies",
426         description "A blue paper box with lettering that reads:^^\
427                     ~Grueslayer Crunchies!^^\
428                     (It's not just for adventurers anymore!)^^\
429                     [Free bonus scroll surprise inside!]~^^\
430                     Writing on the box reads ~50zm~.",
431         size 10, capacity 5,
432         before [;
433            Receive:
434               if (noun == cerealbox2 or cerealbox3) {
435                  "That doesn't quite fit.";
436               }
437            Cast:
438               if (the_spell_was == zemdor_spell) {
439                  if (self hasnt general) {
440                     give self general;
441                     move cerealbox2 to parent(cerealbox1);
442                     move cerealbox3 to parent(cerealbox1);
443                     Achieved(1);
444                     "The box of cereal suddenly seems to dance with magic! \
445                     Before your very eyes, the box suddenly splits into \
446                     three boxes! The magic fades, but the boxes remain.";
447                  }
448                  else
449                     "The magic fights against the cereal box, but fails. \
450                     I guess you can only triplicate once.";
451               }
452         ],                            
453    has container openable;
454    
455 Object cerealbox2 "navy-blue cereal box"
456    with name "box" "navy-blue" "Sugarglobs",
457         description "A navy-blue paper box with lettering that reads:^^\
458                     ~Frobozz Super Sugar Globs!^^\
459                     (Seventeen times the sugar of any other cereal!)^^\
460                     [Free bonus Frobozz toy inside!]~^^\
461                     Writing on the box reads ~50zm~.",
462         !weight 10,
463         size 10, capacity 5,
464         before [;
465            Receive:
466               if (noun == cerealbox1 or cerealbox3) {
467                  "That doesn't quite fit.";
468               }
469         ],        
470    has container openable;
471
472 Object cerealbox3 "royal-blue cereal box"
473    with name "box" "royal-blue" "Dornflakes",
474         description "A royal-blue paper box with lettering that reads:^^\
475                     ~Dornflakes^^\
476                     (Just like Grandma Dimwit used to make!)^^\
477                     [Free bonus Frobozz toy inside!]~^^\
478                     Writing on the box reads ~50zm~.",
479         !weight 10,
480         size 10, capacity 5,
481         before [;
482            Receive:
483               if (noun == cerealbox1 or cerealbox2) {
484                  "That doesn't quite fit.";
485               }
486         ],        
487    has container openable;
488       
489 ! A Breakfast cereal class -- what a concept   
490 Class cereal_class   
491    with name "cereal",
492         description "A quantity of overly-sweetened breakfast cereal.",
493         !weight 5,
494         size 8,
495         before [;
496            Eat:  
497               remove self;
498               "You consume the cereal. The sugar rush occurs five seconds \
499               later and ends just as quickly.";
500         ],
501    has edible;
502    
503 Object cereal1 "crunchy cereal" cerealbox1
504    class cereal_class
505    with name "crunchy";      
506 Object cereal2 "sugary cereal" cerealbox2
507    class cereal_class
508    with name "sugary";      
509 Object cereal3 "flaky cereal" cerealbox3
510    class cereal_class
511    with name "flaky";   
512    
513 Object baking_powder "packet of baking powder" icebox
514    with name "powder" "baking" "packet",
515         short_name "packet of baking powder",
516         description "A single-use packet of baking powder from \
517 ~Port Foozle Bakers Guild~ products.",
518         !weight 5,
519         size 5,
520         before [;
521            Eat:
522              remove self;
523              "You eat the baking powder. Yuck.";
524         ],
525    has edible;
526
527 Object butter "stick of butter" icebox
528    with name "butter" "stick" "fat",
529         description "A good-sized stick of butter.",
530         !weight 5,
531         size 5,
532         before [;
533            Eat:
534              remove self;
535              print "You eat the entire stick of butter.";
536              if (random(20) < 15)
537 " Your heart will no doubt thank you for that someday.";
538              deadflag = 1;
539              " The sudden \
540 intake of concentrated fat is too much of a shock to your \
541 system, and an important artery somewhere bursts.";
542         ],
543    has edible;
544
545 Object FROSTHAM_Resort "Ski Resort"
546    with description "You are inside a large ski resort. Perhaps \
547                     it's not ski-season, as the entire place is \
548                     basically empty. Frostham city lies to the \
549                     east.",
550         name "resort" "city" "ski" "skis" "earmuff" "earmuffs",
551         e_to FROSTHAM_2,
552         out_to FROSTHAM_2,
553         w_to "You don't have a lift-ticket. Also, you don't have \
554              skis. Most importantly, however, the slopes look \
555              pretty lousy.",
556    has light;
557
558 Object FROSTHAM_Governer1 "Governor's House, Waiting Room"
559    with description "You are in a waiting room in the house of the Frostham \
560                     Governor. The carpet is surprisingly plush. \
561                     The walls have been painted a rather bland \
562                     peach-like color. The furnishings \
563                     are also colored peach, which complements the \
564                     walls without being too nouveau. The way out \
565                     is to the northeast.",
566         name "carpet" "furnishings",
567         ne_to FROSTHAM_2,
568         out_to FROSTHAM_2,
569         s_to Gov_door,
570         after [;
571            Go:
572               if (noun==n_obj) {
573                  give Gov_door ~open locked;
574                  print "You hear the door slam and lock behind you.^";
575               }
576         ],
577    has light;
578
579 Object Gov_couch "couch" FROSTHAM_Governer1 
580    with name "couch" "peach",
581         initial "A comfortable-looking peach-colored couch is here.",
582         description "It looks pretty comfy, but the color wouldn't \
583 have been your first choice.",
584         before [;
585            Search:
586               if (self hasnt general) {
587                  give self general;
588                  move c1 to FROSTHAM_Governer1;
589                  "You rummage through the cushions and a coin falls out!";
590               }
591               "You find nothing of interest.";
592         ],
593    has static enterable supporter;
594
595 Object travel_posters "travel brochure" FROSTHAM_Governer1
596    with name "brochure" "travel",
597         description "The brochure has pictures of various cheerful-looking \
598                      people in rather cheerful-looking places. \
599                      Bold lettering reads ~FEEL BETTER IN MIZNIA~, \
600                      ~IT'S ARAGAIN, AGAIN~, \
601                      and ~NEW BORPHEE, EVERYONE'S FAVORITE CITY~",
602         size 10,
603    ;
604
605 Object c1 "coin" class coin_class;
606
607 Object Gov_desk1 "desk" FROSTHAM_Governer1
608    with name "desk" "waiting" "room",
609         description "A fairly plain-looking desk",
610    has scenery supporter;
611
612 Object Gov_ledger "ledger" Gov_desk1
613    with name "ledger",
614         description [;
615            if (receptionist in FROSTHAM_Governer1) 
616               "The receptionist seems to be using it at the moment.";
617            "The ledger reads:^^\
618            ~ -- New signed petition for presentation and coronation of \
619 new King delivered to Aragain Magistrate, awaiting word of \
620 event schedule.~^^That's all. I guess the governor hasn't been \
621 very busy as of late.";
622         ],
623         !weight 20,
624         size 15,
625         before [;
626            Take: 
627               if (receptionist in FROSTHAM_Governer1) 
628                  "The receptionist gives you a rather menacing look.";
629         ],
630 ;
631
632
633 Object alarm_clock "alarm clock" Gov_desk1
634    with name "clock" "alarm",
635         description [; 
636 print "A small round desk-clock, with a set of bells \
637 on the top, and a small pull-knob on the back. \
638 Strangely, the clock seems to be stopped. Two hands, black and golden, \
639 are sitting at ",alarm_clock.number," and ",
640 alarm_clock_dial.number;
641         " respectively.";
642                      ],
643         article "an",
644         number 9,   ! setting of the clock hand
645         time_left 0,
646         time_out [ x ;
647            alarm_clock.number = alarm_clock.number + 1;
648            if (alarm_clock.number > 12) alarm_clock.number = 1;
649            x = TestScope(alarm_clock,player);
650            if (x==1) print "^The alarm clock suddenly makes an \
651 awful grinding noise";
652            if (alarm_clock.number == alarm_clock_dial.number) {
653               ! alarm goes off
654               if (x==1) print ", followed by a ear-splitting clang!^";
655               ! certain events follow:
656               ! if receptionist still in office and self in office,
657               ! receptionist leaves (if player in office, he'll
658               ! see this, or see it outside the office)
659               if ((receptionist in FROSTHAM_Governer1) &&
660           (((self in FROSTHAM_Governer1) || (self in Gov_desk1)) ||
661            ((self in player) && (player in FROSTHAM_Governer1))) ) {
662                  remove receptionist;  ! a long lunch hour, apparently...
663                  ! give alarm_clock general;
664                  Achieved(2);
665                  if (player in FROSTHAM_Governer1) 
666                     "^The receptionist suddenly jumps from her \
667 seat and rushes out of the room, screaming ~Lunchtime!~";
668                  if (player in FROSTHAM_2)
669                     "^You see a woman rush out of the building \
670 to the southwest, and quickly vanish.";
671                  rtrue;
672               }
673               ! future: boutique in Miznia -- brings salesman to front
674               if (((self in MIZNIA_Boutique) || (self in player)) && 
675                    (player in MIZNIA_Boutique)) {
676                    print "^From somewhere in the back of the \
677 store, a tailor rushes out and";
678                    if (MIZNIA_Boutique hasnt general) {
679                       give MIZNIA_Boutique general;
680                       move fancy_scroll to player;
681                       Achieved(23);
682 " sees you. ~We've got a rather \
683 busy schedule,~ he explains, ~but let me see what I can do.~  \
684 He gives you a somewhat unapproving look. ~The ascetic-monk \
685 look is out, you know. Here.~ He pins a rolled paper object \
686 to your clothes. ~The latest craze -- wearing magic scrolls. \
687 Beats using them nowadays, I hear. Now, like I said, we're \
688 very busy.~ He goes off to the back of the store."; 
689                    }
690                    else 
691 " recognizes you. \
692 ~I've done all I can for you right now,~ he explains as \
693 goes off to the back of the store."; 
694               }
695               rtrue;
696            }
697            else if (x==1) "!";
698         ],
699         size 5,
700         add_to_scope alarm_clock_dial alarm_clock_bells alarm_clock_hands,
701    has transparent;
702
703 Object alarm_clock_dial "knob" 
704    with name "pull" "knob",
705         description "A small, pullable knob on the back of the clock.",
706         number 12,
707         before [;
708            Push:
709               print "The knob ";
710               if (self has general) {
711                  give self ~general;
712                  "pushes in a short bit.";
713               }
714               else "is as far in as it can go.";
715            Pull:
716               print "The knob ";
717               if (self hasnt general) {
718                  give self general;
719                  "pulls out a short bit.";
720               }
721               else "is as far out as it can go.";
722            Turn:
723               if (self hasnt general) {
724                  ! wind clock
725                  StartTimer(alarm_clock,1); 
726                  "The knob turns -- barely. You \
727 hear a small clicking noise as well.";
728               }
729               else {
730                  ! set alarm hand
731                  alarm_clock_dial.number = alarm_clock_dial.number + 1;
732                  if (alarm_clock_dial.number > 12)
733                     alarm_clock_dial.number = 1;
734                  print "The knob turns easily. You notice the \
735 golden hand on the front sweep to ",alarm_clock_dial.number;
736                  ".";
737               }
738             !  if (alarm_clock hasnt general) {
739             !  }
740             !  "It doesn't turn anymore.  I guess the receptionist \
741             !  broke the clock (not that it was in good shape to \
742             !  begin with).";
743        ],
744    has static;
745
746 Object alarm_clock_hands "hands"
747    with name "hand" "hands"
748    has static;
749
750 Object alarm_clock_bells "bells"
751    with name "bell" "bells"
752    has static;
753
754 Object FROSTHAM_Governer2 "Governor's Office"
755    with description "You are in a rather spacious office. The \
756 carpeting is quite plush, and all the furnishings seem \
757 excessively lavish.",
758         name "carpeting" "furnishings", 
759         n_to Gov_door,
760    has light;
761
762 Object Gov_desk2 "desk" FROSTHAM_Governer2
763    with name "desk" "office",
764         description "A fairly impressive looking desk, made from \
765                     a massive lacquered piece of black oak wood.",
766         before [;
767           Cast:
768            if (the_spell_was == egdelp_spell)
769               "The desk is covered with a ugly waxy film. \
770 The governor looks extremely annoyed and wipes the desk clean with \
771 a stack of papers.";
772           Push, Pull, Rub, Attack, Search:
773               "~Do you mind?~ the governor says.";
774         ],
775    has scenery supporter;
776
777 Object Gov_door "door" 
778    with name "door" "office",
779         when_closed [;
780              print "There's a closed door to the ";
781              if (self in FROSTHAM_Governer1) 
782                    "south.";
783              else "north.";
784         ],
785         when_open [;
786              print "There's an open door to the ";
787              if (self in FROSTHAM_Governer1) 
788                    "south.";
789              else "north.";
790         ],
791         description "It's just a thick door.",
792         door_dir [ ; if (location==FROSTHAM_Governer1) return s_to;
793                     return n_to;
794                  ],
795         door_to [ ; if (location==FROSTHAM_Governer1)
796                       return FROSTHAM_Governer2;
797                    return FROSTHAM_Governer1;
798                 ],
799         before [ ;
800            Open:
801               if ((location==FROSTHAM_Governer1) &&
802                   (receptionist in FROSTHAM_Governer1))
803               "The receptionist puts a hand in your way and says, \
804                ~The governor is currently busy.~";
805            Close:
806               if (location==FROSTHAM_Governer2)
807                  "~Close it on your way _out_~, the governor snarls.";
808         ],
809         found_in FROSTHAM_Governer1 FROSTHAM_Governer2,
810    has static door openable lockable;
811
812 Object FROSTHAM_GUSStop "Subway Entrance"
813    with description "You're near the southern end of the city. \
814                      The rest of the city lies to the north. \
815                      There's also a rather conspicuous \
816                      stairway down here.",
817         name "stairway",
818         n_to FROSTHAM_2,
819         u_to "You can't go that way.",
820         d_to FROSTHAM_GUSStation,
821         cant_go "You walk around the local streets a bit, finding \  
822                  nothing of interest.",
823    has light; 
824
825             
826 ! ******************************************************************
827 ! People/Creatures
828 ! ******************************************************************
829
830 Object ski_instructor "ski instructor" FROSTHAM_Resort
831    with name "instructor" "dude" "skier" "guy" "tall" "lanky",
832         initial [;
833            print "A tall lanky guy is here, holding two colorful \
834 skis. He seems to be ";
835            if (waxy_scroll in self)
836                "waxing them with a scroll.";
837             "concentrating greatly on waxing \
838             his skis."; 
839         ],
840         description "A tall lanky guy, like I said. He's \
841             decked out in fancy bright winter clothes.",
842         life [;
843            Attack, ThrowAt:
844               "~Dude, you must chill.~";
845            Answer, Tell:
846              if (special_word == 'hello' or 'hi')
847                 "The skier gives you the 'thumbs-up' sign. \
848 ~Hey, dude.~";
849              else "~Uh, whatever, dude.~";
850            Show:
851              if (noun==rag)
852                 "~Hey dude, can I borrow that?~";
853              "~Uh, whatever, dude.~";
854            Order:
855              if (action==##Give) {
856              if (noun=='skis')
857                 "~No way, dude.~";
858              if (((noun==waxy_scroll) && (self hasnt general)) ||
859                  ((noun==rag) && (self has general)))
860                 "~I'm using it, dude.~";
861              }
862              "~Dude, I have no idea what you're talking about.~";
863            Ask: 
864              if (second=='rag')
865                 "~A rag makes an excellent ski-maintenance accessory, dude.~";
866              if ((second=='scroll' or 'waxy') && (self hasnt general))
867                 "~Something I found at the top of a run. \
868                  Doesn't work too well, but hey, I gotta wax.~";
869              if (second=='skis') 
870                 "~My rad Grayslopes Slaloms. If you don't wax 'em \
871                  every 30 seconds, they lose their speed.~";  
872              if ((second=='slopes') || (second=='slope') ||
873                  (second=='powder') || (second=='runs') ||
874                  (second=='skiing'))
875                 "The skier takes you aside. ~Listen dude, \
876                 between you and me, the slopes here rot. They \
877                 used to be way better. But you know, I hear there \
878                 are some _killer_ drops up north.~";
879              "~Dude, I have no idea what you're talking about.~";
880            Give:
881              if (noun==rag) {
882                 move waxy_scroll to FROSTHAM_Resort;
883                 move rag to self;
884                 give self general;
885                 Achieved(3);
886                 "The skier gladly takes the rag and starts \
887                 polishing immediately. He lets the scroll \
888                 fall to the ground. ~Excellent man, thanks!~";
889              }
890              "~No thanks, dude.~";
891            default: "At the moment, the skier is too busy waxing.";
892         ],
893         each_turn [;
894             if (waxy_scroll notin self && self hasnt general) {
895                 Achieved(3);
896                 remove self;
897                 "^~Dude, like, that scroll thing just \
898 vanished! What a cosmic experience!~ On that note, \
899 the skier opts to head for the slopes, and leaves to the west.";
900             }
901             if (random(20) < 5)
902                "^The skier polishes a spot on his skis.";
903         ], 
904         before [;
905            Cast:
906               if (the_spell_was == foblub_spell or espnis_spell)
907                  "A pair of fluffy earmuffs the skier is wearing \
908 prevents him from hearing the full impact of your sermon.";
909         ],
910    has animate transparent;
911
912 Object receptionist "receptionist" FROSTHAM_Governer1
913    with name "receptionist",
914         initial "A receptionist sits behind a desk, engrossed in \
915                 the ledger.",
916         description "A gruff-looking lady who apparently is far \
917                 more interested in her work than you.",
918         each_turn [;
919            if (receptionist hasnt general) {
920               give receptionist general;
921               "^Without even looking up, the receptionist says, \
922               ~The governor is busy right now.~";
923            }
924            if (random(10) == 1)
925               "^The receptionist turns a page in the ledger.";
926         ],
927         life [;
928            Answer, Order:
929               print "The receptionist";
930               if (special_word=='hello')
931                  ", without looking up, says \
932                  ~Can I help you?~.";
933               " seems to be ignoring you.";
934            Ask:
935               print "The receptionist";
936               if (second=='governor')
937                  ", without looking up, says \
938                  ~He's very busy right now.~.";
939               " shrugs.";
940            default:
941               "The receptionist seems to be ignoring you.";
942         ],   
943         react_before [;
944            Cast: 
945 "The receptionist, in a rather shrill voice says, \
946 ~If you're gonna wait, do it quietly,~ disrupting your chant.";
947            Blow:
948 if (noun==whistle)
949 "You make an unusually high-pitched noise. The receptionist, \
950 in a rather shrill voice says, \
951 ~If you're gonna wait, do it quietly.~";
952            Sneeze:
953 "~If you want to spread germs, do it outside.~";
954            Yell:
955 "~If you're gonna wait, do it quietly.~";
956            Sing:
957 "~We're not holding auditions, you know.~";
958         ],
959    has animate female;
960
961 Object governor "governor" FROSTHAM_Governer2
962    with name "governor" "gov",
963         initial "The governor of Frostham is sitting behind a \
964                  desk here, trying to look busy.",
965         description "A sour-looking man who tries his best not \
966                  to notice you.",
967         each_turn [ i ;
968            if (governor hasnt general) {
969               give governor general;
970               move c2 to player;
971               "^The governor scowls as you enter. ~What do you want?~ \
972                he says, and doesn't wait for a response. ~Oh, I know. \
973                More complaints about the snow, I suppose? Well \
974                look, I didn't ask for this job. Do you want it? I \
975                didn't think so.~ He shoves something into your hand. \
976                ~Here, buy yourself a cup of coffee, and stop \
977                bothering me.~";
978            }
979            i = random(4);
980            print "^The governor ";
981            if (i == 1) 
982               "thumbs through some papers.";
983            if (i==2)
984               "balances a pencil on his nose.";
985            if (i==3)
986               "scribbles something meaningless.";
987            if (i==4)
988               "looks up and notices you. ~Don't you \
989               have anything else to do?~ he says.";
990         ],
991         life [;
992            Ask:
993               if (second=='key' or 'shiny') {
994                  print "~Some key an important visitor \
995 forgot while visiting. Probably useless now";
996                  if (parent(cab_key) == player)
997                     print ". You can keep it, for all I care";
998                  ".~";
999               }
1000               if (second=='receptionist')
1001                  "~I think she's out to lunch,~ he says, \
1002 with obvious annoyance.";
1003               if (second=='magistrate' or 'king' or 'sydney')
1004                  "He looks at you suspiciously. \
1005 ~Never heard of him,~ he says.";
1006               if (second=='ledger')
1007                  "~I think my receptionist has it.~";
1008               if (second=='pencil')
1009                  "~Please! I'm a very busy man!~";
1010               "~Sorry, that's not my problem. Now run along.~";
1011            Kiss:
1012               "The governor brushes you off. ~Are you \
1013 planning on running for office or something?~";
1014            Attack, ThrowAt:
1015               deadflag = 1;
1016               "As you make a threatening move, the governor \
1017 presses some unseen switch behind his desk. Before you \
1018 know it, a hidden trapdoor opens in the floor and you \
1019 plunge to your death. A good politician is always \
1020 prepared, it seems...";
1021            Tell:
1022               "~Sure, sure. Scram, will you?~";
1023            Answer, Order:
1024               if (special_word=='hello')
1025                  "~Yeah, sure. So what's your problem?~";
1026               "The governor is busy trying to look busy.";
1027            Give:
1028               "Bribing a politician, eh?";
1029            Show:
1030               if (noun==Gov_ledger)
1031                  "~Hey, return that to the receptionist!~"; 
1032               "~Please! I'm a very busy man!~";
1033         ],
1034         react_after [;
1035            Take:
1036               if (noun == cab_key)
1037                  "~Oh sure, just go ahead and take things \
1038 from my office. See if I care.~";
1039         ],
1040         before [;
1041            Cast:
1042              if (the_spell_was == foblub_spell)
1043                 "Actually, the governor seems pretty glued to his \
1044 seat already. In any event, nothing seems to happen.";
1045              if (the_spell_was == espnis_spell)
1046                 "The governor seems to nod off, but only for \
1047 a second.";
1048         ],
1049    has animate transparent;
1050
1051
1052 ! ***************
1053 ! More objects...
1054 ! ***************
1055
1056 Object pencil "pencil" governor
1057    with name "pencil";
1058
1059 Object c2 "coin" class coin_class;
1060
1061 ! (cereal box prizes)
1062 Object whistle "whistle" cerealbox2
1063    with name "whistle",
1064         description "A tiny plastic whistle.",
1065         !weight 1,
1066         size 1,
1067         before [;
1068            Blow: 
1069               "You make an unusually high-pitched noise.";
1070         ],
1071 ;
1072 ! (a fancier packaged prize :)
1073 Object plastic_wrapper "plastic wrapper" cerealbox3
1074    with name "wrapper" "plastic",
1075         description "A small plastic see-through package.",
1076         before [;
1077            Open:
1078               while (child(self)~=0) move child(self) to parent(self);
1079               remove plastic_wrapper;
1080               "The wrapper rips open with ease, and disintegrates, \
1081               leaving the contents behind.";
1082         ],
1083         !weight 0,
1084         size 5,
1085    has container openable transparent;
1086    
1087 Object toy_volcano "toy volcano" plastic_wrapper
1088    with name "toy" "volcano",
1089         description "A strange thing indeed -- a miniature \
1090               ceramic toy, that has been painted and shaped \
1091               in painstaking detail to look like a volcano.",
1092         !weight 5,
1093         size 5,
1094 ;
1095
1096 Object volcano_note "instruction notice" plastic_wrapper
1097    with name "notice" "instruction",
1098         article "an",
1099         description "~Frobozz Instant Volcano~^^\
1100         (parental supervision recommended)^^\
1101         To use:  Just add a good quantity of water! We suggest \
1102         a very large safety radius.~",
1103         size 5,
1104 ;
1105         
1106
1107
1108 ! ******************
1109 ! Scrolls and spells
1110 ! ******************
1111
1112 Object waxy_scroll "waxy scroll" ski_instructor
1113    class scroll_class,
1114    with name "waxy",
1115 ;
1116
1117 Object egdelp_spell "create waxy build-up on wood" waxy_scroll
1118    class spell_class,
1119    with name "egdelp",
1120         magic [;
1121            if (second ~= 0 && second ~= player) {
1122            CDefArt(second); " looks pretty polished as is."; }
1123            else { "The chant, seeking wood to polish, fails."; }
1124         ],
1125 ;
1126
1127 Object sugar_scroll "sugar-coated scroll" cerealbox1
1128    class scroll_class,
1129    with name "sugar-coated" "coated",
1130 ;
1131
1132 Object zemdor_spell "triplicate object" sugar_scroll
1133    class spell_class,
1134    with name "zemdor",
1135         number 0,
1136         magic [;
1137            if (second == 0)
1138               "The chant, seeking a locus for \
1139 triplication, fails.";
1140            if (second has animate)
1141               "The chant, not designed for living creatures, fails.";
1142            if (second has is_spell)
1143 "This violates certain unwritten laws of magic.";
1144            if (second has is_coin) {
1145               ! new twist for zemdor, as sugg. by player
1146               print "The coin shimmers suddenly! You blink in \
1147                  disbelief as the coin seems to split \
1148                  into three copies of itself! ";
1149               if (self hasnt general) {
1150                  give self general;
1151                  move c12 to parent(second);
1152                  move c13 to parent(second);
1153                  "You notice there are now three coins where \
1154 there was once but one!";   
1155               }
1156               "Suddenly, a financial nymph appears! She gives \
1157 you a denunciatory look. ~Line 7234-6 of the Pierpont \
1158 tax laws clearly states that repeated unauthorized \
1159 triplication of monetary \
1160 items is strictly forbidden,~ she says, and takes the \
1161 the two newly created coins before disappearing.";
1162            }
1163            print (The) second, " shimmers suddenly! You blink in \
1164                  disbelief as ", (the) second, " seems to split \
1165                  into three copies of itself! ";
1166                  "But, as you finish the chant, \
1167                  the mystic energy seems to fade, and the copies \
1168                  coalesce back into one unchanged object. The \
1169 chant fails.";
1170         ],
1171 ;
1172
1173 Object c12 "coin" class coin_class;
1174 Object c13 "coin" class coin_class;
1175