Set serial number to reflect the current date
[spiritwrak.git] / src / spirit.inf
1 ! *****************************************************************
2 ! SPIRITWRAK -- An exercise in copyright infringement :)
3
4 !    Release 1, 12/95 -- 3/96 
5 !    Release 2, 3/96 --  
6 !    Release 3, 4/96 --  
7 !    Copyright (C) 1996, D. S. Yu
8 !
9 !    This program is free software; you can redistribute it and/or modify
10 !    it under the terms of the GNU General Public License as published by
11 !    the Free Software Foundation; either version 3 of the License, or
12 !    (at your option) any later version.
13 !
14 !    This program is distributed in the hope that it will be useful,
15 !    but WITHOUT ANY WARRANTY; without even the implied warranty of
16 !    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 !    GNU General Public License for more details.
18 !
19 !    You should have received a copy of the GNU General Public License
20 !    along with this program; if not, write to the Free Software
21 !    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 !
23 !    To contact the author (Dan Yu), send email to dsyu@holonet.net.
24 !
25 ! *****************************************************************
26
27 ! SPECIAL THANKS:
28 !   Mr. Blank, Lebling, Meretzky, Moriarty for the Zork universe.
29 !   Graham Nelson for Inform, and for various code I've shamelessly cribbed.
30
31 ! NUTRITION NOTE:  No Microsoft(tm) products were used in the 
32 ! construction of this game
33
34 ! ** inform compile switches here **
35 Switches exv5b;
36
37 ! ** abbreviations
38 Include "spirita.inf"; 
39
40 ! ** Story Constants **
41 Constant Story "SPIRITWRAK";
42 Constant Headline "^An Interactive Fantasy Adventure^\
43                    Copyright (C) 1996, by D.S. Yu.^\
44 Portions copyright Graham Nelson.^^\
45 'SPIRITWRAK' comes with ABSOLUTELY NO WARRANTY ^\
46 This is free software, and you are welcome to redistribute it \
47 under conditions as described in the GNU General Public License as published by \
48 the Free Software Foundation; either version 3 of the License, or \
49 (at your option) any later version.^^";
50
51 Release 3;
52 Serial "190819";
53
54 ! ** Scoring System
55 Constant MAX_SCORE 250;
56 Constant NUMBER_TASKS 27;
57 Constant TASKS_PROVIDED;
58 Constant OBJECT_SCORE 2;
59 ! Constant ROOM_SCORE 1;
60 ! Global task_scores initial t1 t2 t3.....
61 Array task_scores -> 2 5 5 5 10 15 5 5 5 5 5 5 10 10 10 5 5 5 10 10 5 5 10 5 5 5 10; 
62
63 ! ** Player inventory and weight system
64 Constant MAX_CARRIED 15;  ! Max of 15 items carried at start
65          ! This can be changed on the fly by adjusting player.capacity
66 Property weight; 
67 ! Entire weight system removed 3/16/96, however certain puzzles
68 ! inadvertently depend on this, so...
69 Property size;
70
71 global Player_HP_MAX = 20; ! number of hp MAX (should be 20 + score)
72 global Player_HP_CUR = 20; ! number of hp left (< MAX)
73 global Player_Lives_Left = 3;  ! number of resurrects left 
74 global in_hades = 0;           ! Is the player in Hades? (we certainly hope not)
75 global in_atrii = 0;           ! Is the player in Atrii? 
76 ! global all_my_spells data 32;   array for spells in spell book
77 Array all_my_spells -> 64;  ! array for spells in spell book
78 global has_resist_gravity = 0; ! is player resisting gravity?(see feeyuk spell)
79 global spell_block = 0;        ! block spell-related stuff (end-game)
80
81 ! Any actions that are replaced get mentioned here
82 Replace PraySub;
83 Replace StrongSub;
84 Replace InsertSub;  ! for relative sizes
85
86 ! *** Include Parser and VerbLib
87 Include "parser";
88 Include "verblib";
89
90 ! -- two global location ptrs for Barsap's Gambit
91 global WN_TO;
92 global ES_TO;
93
94 ! ******************* CLASS DEFS *****************
95
96 ! ** rod (part) class and attribute
97 Attribute is_rod;
98
99 Class rod_class
100    with name "rod",
101         description "A thin rod made from some undeterminable material.",
102         !weight 10,
103         size 10,
104         before [;
105            Cast:
106               "You complete the chant, but the rod lies unaffected! \
107               Perhaps it is protected from magic somehow?";
108            Join:
109               if (second has is_rod)
110                  "You try to bring the rods together, but a \
111 sudden blast of energy prevents you, and stings your hands!";
112 ! (note that true rod pieces have their own Join befores, which
113 ! should, in theory, get called instead of this one).
114         ],
115    has is_rod scored;
116
117 Class parchment_class
118    with name "parchment",
119         description "A piece of blank parchment.",
120         !weight 10,
121         size 15,
122 ;
123
124 Attribute is_sphere;
125
126 Class sphere_class
127    with name "sphere",
128         description "A small hard sphere made from some undeterminable material.",
129         !weight 5,
130         size 3,
131         before [;
132            Cast:
133               "You complete the chant, but the sphere lies unaffected! \
134               Perhaps it is protected from magic somehow?";
135         ],
136    has is_sphere scored;
137
138 Attribute is_flag;
139
140 Class flag_class
141    with name "flag" "cloth",
142         plural "flags",
143         description "A short square piece of colored cloth.",
144         !weight 10,        
145         size 15,
146    has is_flag;
147
148 Class trophy_dep_class
149    with name "depression" "niche" "hole" "keyhole",
150       initial [;
151 print "There is a circular depression in the center of the floor";
152 if (trophy in self)
153    ". Sitting in the depression is a trophy.";
154 else ".";
155       ],
156       description [;
157 print "A small circular depression in the center \
158       of the stone floor";
159 if (trophy in self)
160      ". At the moment, the depression holds a trophy.";
161 else ". There seem to be three small concave \
162       marks in the otherwise flat stone of the depression.";
163       ],
164       size 8,
165       capacity 1,
166 has static container open;
167    
168 Attribute is_niche;
169 Property counter_niche;  
170 Property niche_dir;  ! assoc with the dir a niche is facing.
171
172 Class niche_class 
173    with name "niche",
174         capacity 1,
175         niche_dir 1,  ! default north
176         description "It looks like a chiseled-out niche in the floor.",
177         initial [;
178            switch (self.niche_dir) {
179            1: print "There's a square niche in the northern edge of the floor here";
180            2: print "There's a square niche in the western edge of the floor here";
181            3: print "There's a square niche in the southern edge of the floor here";
182            4: print "There's a square niche in the eastern edge of the floor here";
183            }
184            if (children(self) ~= 0) {
185               print ". Resting in the niche is ";
186               InDefArt(child(self));
187               print " that extends into the darkness";
188 ! weird -- There is no "CInDefArt(), equiv to (A) obj, which
189 ! is probably pretty simple...
190            }
191            ".";
192         ],
193         before 
194         [ j ;
195           Receive:
196             if (noun hasnt is_wood_beam)
197                  "That's not going to stay in the niche.";
198             else {
199                ! (odd capacity check, seems like I'm stepping in front...)
200                if (children(self) ~= 0)
201                   "The niche space is currently full.";
202                ! place both pieces in niches
203                j = child(noun);  ! child piece (whichever)
204                move j to self.counter_niche;
205                move noun to self;
206                "You carefully place one end of the beam in the niche and \
207                extend the other end into the darkness. You feel something \
208                solid support the far end!";
209             }
210           LetGo:
211             ! (reconstruct wood beam) Assumption is that noun must have 
212             ! wood_beam attrib.
213             move child(self.counter_niche) to child(self);
214             move child(self) to player;
215             "Taken.";
216         ],  
217         has static container open is_niche; 
218
219 ! ** multiple coins, cribbed from "Balances"
220 Attribute is_coin;
221  
222 Class  coin_class
223   with name "coin",
224        description "A round metal disc, with ~1zm~ stamped on both sides.",
225        !weight 1,
226        size 1,
227        parse_name
228        [ i j w;
229          if (parser_action==##TheSame)
230          {   if ((parser_one.&name)-->0 == (parser_two.&name)-->0) return -1;
231              return -2;
232          }
233          w=(self.&name)-->0;
234          for (::i++)
235          {   j=NextWord();
236              if (j=='coins') parser_action=##PluralFound;
237              else if (j~='coin' or w) return i;
238          }
239        ], 
240        plural "coins",
241   has  is_coin;
242
243 ! ** Spell-casting system, again cribbed from Graham's "Balances",
244 !    except stuffy priests call them 'chants'...
245 ! ----------------------------------------------------------------------------
246 !   Now the whole spell-casting system
247 ! ----------------------------------------------------------------------------
248
249 Attribute is_spell;
250 Attribute known_about;
251 Attribute is_scroll;    
252 Attribute is_spell_book;
253 Property magic;
254 Fake_Action SayName;
255
256 [ SpellName obj; print (address) (obj.&name)-->0; ];
257
258 Class  spell_class
259   with name "spell" "spells" "chant" "chants", article "the", number 0,
260        short_name
261        [; SpellName(self); print " chant"; give self known_about; rtrue;
262        ],
263        before
264        [; 
265   !        SayName: SpellName(self); print " chant:  ", object self;
266           SayName: SpellName(self); print " chant:  ", self;
267                    give self known_about; rtrue;
268           Examine: <SayName self>; ".";
269        ],
270        size 0,
271   has  is_spell;
272
273 Object memory "memory"
274   with capacity 5,   ! will change periodically, given God-granted powers...
275        number 1,
276        size 0,
277        before
278        [ i j k;
279          Examine:
280            if (spell_block == 1)
281                "Currently, your mystic powers don't seem to be working.";
282            objectloop (i in self) if (i.number==100) j++;
283            if (j>0)
284            {   print "The ";
285                objectloop (i in self)
286                    if (i.number==100)
287                    {   k++; SpellName(i);
288                        if (k==j-1) print " and ";
289                        if (k<j-1) print ", ";
290                    }
291                if (j==1) print " chant is"; else print " chants are";
292                print " yours forever. Other than that, y";
293            }
294            else print "Y";
295            print "ou have ";
296            j=0; k=0;
297            objectloop (i in self) if (i.number<100) j++;
298            if (j>0)
299            {   print "the ";
300                objectloop (i in self)
301                    if (i.number<100)
302                    {   k++;
303                        PrintShortName(i);
304                        if (i.number==2) print " (twice)";
305                        if (i.number==3) print " (thrice)";
306                        if (i.number==4) print " (four times)";
307                        if (i.number>=5) print " (many times)";
308                        if (k==j-1) print " and ";
309                        if (k<j-1) print ", ";
310                    }
311            }
312            else print "no chants";
313            " prepared.";
314          Insert:
315            if (spell_block==1)
316                "Currently, your mystic powers don't seem to be working.";
317            if (second.number==100) "You always know that chant.";
318            self.number=self.number+1;
319            print "Making a quick prayer to the Gods, you prepare the ";
320            SpellName(second);
321            print " chant";
322            if (second notin self) second.number=0;
323            move second to self;
324            second.number=second.number+1;
325            if (second.number==1) print ".";
326            if (second.number==2) print " once again.";
327            if (second.number==3) print " a third time.";
328            if (second.number>3) print " yet another time.";
329            if (self.number <= self.capacity) { new_line; rtrue; }
330            i=youngest(self); <Remove self i>;
331            "^A voice booms out ~Do not try to exceed your powers, mortal!~";
332          Remove:
333            if (second notin self || second.number==100) rtrue;
334            if (self.number>0) self.number=self.number-1;
335            second.number=second.number-1;
336            if (second.number==0) remove second;
337            rtrue;
338        ];
339
340 Object gnusto_spell "copy a chant into your prayer book" memory
341  class spell_class
342   with name "gnusto",
343        number 100,
344        magic
345        [ i a_book;
346             if (spell_block==1)
347                "Currently, your mystic powers don't seem to be working.";
348             if (amulet hasnt worn)
349                "You speak the chant, and absolutely nothing happens!";
350             if (second has is_spell_book)
351                "Unlike scrolls, prayer books are magically guarded against \
352                 the 'theft' of their lore.";
353             if (second==0 || second hasnt is_scroll)
354                "Your chant goes unanswered.";
355             if (second notin player)
356                 "A gnusto chant would require close scrutiny of the scroll \
357                  it is to copy, which you do not seem to be holding.";
358             objectloop (i in player)
359                 if (i has is_spell_book) a_book=i;
360             if (a_book==0)
361                 "Your chant fails, as you have no prayer book.";
362             i=child(second);
363             if (i==0 || i hasnt is_spell)
364             {   print "Your chant fails, as "; DefArt(second);
365                 " is illegible.";
366             }
367             <Learn a_book i>; remove second;
368             print "Your prayer book begins to shake! Slowly, ornately, \
369                    the words of "; DefArt(i); " are inscribed, \
370                    into the book with a violet glow. \
371                    The book's brightness fades, but the chant remains! \
372                    However, the scroll on which it was written vanishes as \
373                    the last word is copied.";
374        ];
375
376 Class  spell_book_class
377   with magic 0,
378        capacity 20,
379        size 15, 
380        before
381        [ p i; Open, Close:
382               CDefArt(self); " will always open to the desired page thanks \
383               to the powers of the Gods, may they never forget us.";
384           Attack:
385               print "When you are done, "; DefArt(self); " remains unmarred.";
386           Learn:
387               if (self.magic==0) "(This prayer book has no pages.)";
388               p = self.magic;
389               for (i=0:i<self.capacity && (p-->i)~=0:i++) ;
390               if (i==self.capacity) rtrue;
391               p-->i = second;
392               rtrue;
393        ],
394        after
395        [ p i j; Examine:
396               if (self.magic==0) "(This prayer book has no pages.)";
397               p = self.magic;
398               for (i=0:i<self.capacity && (p-->i)~=0:i++)
399               {   j=p-->i; <Examine j>;
400               }
401               rtrue;
402        ],
403   has  is_spell_book;
404
405 Class  scroll_class
406   with parse_name
407        [ i j k; j=-1;
408               if (self has general)
409               {   if (child(self)~=0 && child(self) has is_spell)
410                       j=(child(self).&name)-->0; else j='illegible';
411               }
412               for (::) {
413                  k = NextWord();
414                  if (k=='scrolls') parser_action = ##PluralFound;
415                  if ((k=='scrolls' or 'scroll' or j) || (k==(self.&name)-->0))
416                     i++;
417                  else return i;
418               }
419               ! while (NextWord()==j or 'scroll' or (self.&name)-->0) i++;
420               ! return i;
421        ],
422        before
423        [ i; Examine:
424             i=child(self);
425             give self general;
426             if (i==0 || i hasnt is_spell)
427                 "The scroll has faded, and you cannot read it.";
428             print "The scroll reads ~"; <SayName i>; "~.";
429        ],
430        invent
431        [;   if (inventory_stage==2 && self has general)
432             {   if (child(self)==0 || child(self) hasnt is_spell)
433                     print " (which is illegible)";
434                 else
435                 {   print " (of "; DefArt(child(self)); print ")"; }
436             }
437        ],
438        size 10,
439   has scored is_scroll;
440
441 ! NOTE: This routine has a slight bug (as cribbed from GN's
442 ! Balances, rel2) in that Examine, if the routine reaches
443 ! scope_stage 3, prints a rather confusing msg.  However,
444 ! the appropriate msg is printed for, say, Learn, if the
445 ! spell is unknown/out-of-scope.  Oddly, action can't
446 ! be checked at stage 3, so I copied a second version of
447 ! the routine for Examine only.  -DY
448 ! 3/19 update: Checking Graham's release 3 of Balances, 
449 ! I stumble across the "action_to_be" var.  Most useful.
450 [ ReadableSpell i j k;
451   if (scope_stage==1) return 1;
452   if (scope_stage==2)
453   {   objectloop (i in player)
454           if (i has is_spell_book)
455           {   for (k=0:k<i.capacity && (i.magic)-->k~=0:k++)
456               {   j=(i.magic)-->k; PlaceInScope(j);
457               }
458           }
459       rtrue;
460   }
461   if (action_to_be == ##Examine) 
462      "You can't see any such thing.";
463   !"You have never seen or heard of such a chant.";
464   "You can't see such a chant, if that is indeed a chant.";
465 ];
466
467 [ SpellsSub; <Examine memory>; ];  ! for our case, 'chants' will work also
468
469 [ LearnSub; if (location==thedark)
470                 print "(The magic purple glow of the chants casts enough light \
471                         that you can read them.)^";
472             <Insert memory noun>;
473 ];
474
475 global the_spell_was = gnusto_spell;
476
477 [ CastOneSub; <Cast the_spell_was noun>; ];
478
479 ! Property long unmagic;
480
481
482 ! (wood beams and niches -- for Barsap's Gambit)
483 ! (put after 'the_spell_was' global defined)
484
485 Attribute is_wood_beam;
486
487 Class wood_beam_class
488   with name "wood" "beam",
489        plural "beams",
490        description "A long thin wooden beam.",
491        !weight 10,
492        size 50,
493        number 0,   ! number is the 'strength left' qualifier
494        before [;
495           Cast:
496           if (the_spell_was == egdelp_spell)
497              "The wood beam is covered in a waxy film! Thinking \
498 better of this, you hastily wipe off the offending build-up.";
499           if ((the_spell_was == luncho_spell or huncho_spell) &&
500               (parent(self) has is_niche)) {
501           ! reconstruct beam before teleporting
502           ! due to problem below, I'm denying this...
503 "Your chant goes unanswered.";
504            !  move child(parent(self).counter_niche) to self;
505            !  <<Cast the_spell_was self>>; 
506            ! NOTE NOTE This may recursively explode...
507           }
508        ],
509   has is_wood_beam;
510
511 Class balsa_beam_class
512    class wood_beam_class,
513    with name "balsa",
514         plural "balsa wood beams",
515         description "A long thin balsa wood beam.",
516         number 0;  ! always breaks
517
518 Class pine_beam_class
519    class wood_beam_class,
520    with name "pine",
521         plural "pine wood beams",
522         description "A long thin pine wood beam.",
523         number 1;
524         
525 Class ebony_beam_class
526    class wood_beam_class,
527    with name "ebony",
528         article "an",
529         plural "ebony wood beams",
530         description "A long thin ebony wood beam.",
531         number 2;
532                 
533 [ CastSub k;
534   the_spell_was = noun; <Remove memory noun>;
535
536 !  if (noun has general)
537 !  {   give noun ~general;
538 !      if (RunRoutines(noun,unmagic)~=0) rfalse;
539 !      "Nothing happens.";
540 !  }
541
542   if (amulet hasnt worn)
543      "You speak the chant, and absolutely nothing happens!";     
544   if (spell_block==1)
545      "Currently, your mystic powers don't seem to be working.";
546   if (in_hades == 1)
547      "Your Gods can't save you now...";
548   if (second~=0)
549   {   ResetVagueWords(second);                     ! Set "it", "him", "her"
550       if (RunRoutines(second,before)~=0) rfalse;   ! Run before routine(s)
551   }
552   k = random(10);
553   if (k<=3) {
554      if (k==1)
555         "You speak the chant, but the Gods are not kind this time, as nothing happens!";
556      if (k==2 or 3)
557         "You speak the chant, but something sounds wrong. Nothing happens \
558 this time."; 
559   }
560   if (RunRoutines(noun,magic)~=0) rfalse;
561   "Nothing happens.";
562 ];
563
564 [ InScope i;
565   if (verb_word=='c,cast' or 'cast')
566       objectloop (i in memory) PlaceInScope(i);
567   rfalse;
568 ];
569
570 [ ParserError x i flag vb;
571   if (etype==VERB_PE or ASKSCOPE_PE)
572   {   if (etype==ASKSCOPE_PE)
573       {   if (verb_word=='cast') vb=1;
574           if (verb_word=='learn' or 'memorise' or 'memorize') vb=2;
575           if (verb_word=='copy') vb=3;
576           if (vb==0) { etype=CANTSEE_PE; rfalse; }
577       }
578       wn=verb_wordnum; if (vb~=0) wn++;
579       x=NextWordStopped();
580       for (i=player+1:i<=top_object:i++)
581           if (i has is_spell && Refers(i,x)==1
582               && i has known_about) flag=1;
583       if (flag==1)
584       {   if (vb==0 or 1)
585              "You haven't got that chant prepared. [Type ~spells~ \
586               or ~chants~ to see what you do have prepared.]";
587           if (vb==2)
588              "Your training is such that you can only prepare such a chant \
589               with the aid of a prayer book containing it.";
590           if (vb==3)
591              "You have no text of that chant to copy.";
592       }
593       if (vb==1)
594          "You haven't prepared that chant, if indeed it is a chant.";
595       if (vb==2 or 3)
596          "You haven't access to that chant, if indeed it is a chant.";
597   }
598   rfalse;
599 ];
600
601 ! Random attempt to code a ChooseObjects for the
602 ! coin choosing problem often seen in the Bank of Zork
603 [ ChooseObjects obj code;
604   if (code < 2) rfalse;
605   if ((action_to_be == ##Remove or ##Insert) &&
606       (obj has is_coin) && (obj in player)) return 9;
607   return 0;
608 ];
609
610 [ UnknownVerb word i;
611   objectloop (i in memory)
612       if (word==(i.&name)-->0) { the_spell_was = i; return 'c,cast'; }
613   rfalse;
614 ];
615
616 [ PrintVerb v;
617   if (v=='c,cast') { print "cast a chant at"; rtrue; }
618   rfalse;
619 ];
620
621 ! ----------------------------------------------------------------------------
622 !   The player's spell book, and initial spells (to go with gnusto):
623 ! ----------------------------------------------------------------------------
624
625 Object prayer_book "prayer book"
626  class spell_book_class,
627   with name "prayer" "book" "my" "spellbook",
628        description "Mystical Chants^";
629
630 Object frotz_spell "cause an object to give off light"
631  class spell_class,
632   with name "frotz",
633        magic
634        [;  if (second==0) "There is a brief, blinding flash of light.";
635            if (second has animate)
636                "The chant, not designed for living creatures, is denied.";
637            if (parent(second)==compass)
638                "The chant fails.";
639            give second light;
640       print "There is an almost blinding flash of light as "; DefArt(second);
641       print " begins to glow! It slowly fades to a less painful level, but ";
642       DefArt(second); " is now quite usable as a light source.";
643        ],
644 ;
645
646 ! ** Start of locations (and other objs) **
647
648 ! ***********************************************************************
649 ! **
650 ! ** LOCATIONS INSIDE MONESTARY (Mostly)
651 ! **
652 ! ***********************************************************************
653
654 Object MON_Chapel1 "Monastery Chapel"
655       with description "You are standing in a monastery chapel. \
656 All around you, fellow Brothers of the Order are standing, chanting. \
657 The eerie droning voices seem to reverberate into the air. At the \
658 front of the chapel, Brother Joseph stands in deep concentration, \
659 holding the Rod of the Ancients.",
660       name "brothers",
661       number 0,
662       each_turn [ ;
663           MON_Chapel1.number = MON_Chapel1.number + 1;
664           Startup1(MON_Chapel1.number);
665       ],
666       before [ ;
667           if (action==##Listen) "You hear heavy chanting";
668           if (action==##look) rfalse;
669           if (action==##Wait) rfalse;
670           "You are caught up in the collective chanting, and cannot break \
671            your concentration to do much of anything else.";
672       ],
673       has light;
674     
675 ! A fake obj to handle 'look at Joseph'
676 Object MON_FAKE "the Order" MON_Chapel1
677    with name "Joseph" "rod" "brothers",
678    description [; <<Look>>;],
679 has scenery;
680
681 ! A somewhat bulky routine to set our stage.  
682 [ Startup1 currturn;
683    if (currturn <= 1) {
684       print "^Brother Joseph now speaks directly to the entire Order.^^\ 
685       ~Fellow Brothers, the year, as you know, is 976 GUE. \
686       A difficult time indeed. Ten years have passed since the Cataclysm \
687       brought forth by the Circle of Enchanters changed our world forever. \
688       The outside world as we know it is in turmoil. A period of great \
689       change is upon all of us.~^";
690       rtrue;
691    }
692    if (currturn == 2) {
693       print "^Brother Joseph continues speaking.^^\
694       ~Our order has always maintained the strictest secrecy. Few \
695       outside of our order know of our existence. \
696       We are the keepers of the mystic balance \
697       that which embodies pure magic that can keep our world \
698       safe. It has always been thus -- we watch over all \
699       of Quendor, never interfering in the affairs of others, yet \
700       striving to maintain harmony.~^";
701       rtrue;
702    }
703    if (currturn == 3) {
704       print "^Brother Joseph continues speaking.^^\
705       ~But we can no longer depend on enchantments to keep \ 
706       outsiders at bay. Magic as we know it is dying. The dreaded \
707       Age of Science is already upon us, and in short time, our \
708       order will be discovered, and the balance will be no more. Many of \
709       our order have gone out into the world in secret, in attempts \
710       to repair what has been broken, but alas, this appears to be \
711       impossible.~^"; 
712       rtrue;  
713    }
714    if (currturn == 4) {
715       print "^Brother Joseph continues.^^\
716       ~I have brought you all forth today to say that although we \
717       cannot protect the future of Quendor, we can protect ourselves!~ \
718       He holds the Rod of the Ancients high. ~This holy Rod, which \
719       the Ancient Ones used to defeat the demon Anabais, \
720       has the power to protect our order. I have discovered a lost mystic \
721       cube!~ He holds a white, featureless cube high in his other hand. \
722       ~This cube, when joined with the Rod of the Ancients, will \
723       preserve our order forever, sequestering all of us in another time, \
724       another place!~^";
725       rtrue;
726    }
727    if (currturn >= 5) {
728       print "^There is a momentous pause. ^^\
729       Brother Joseph looks at the entire Order. \
730       ~May the Gods smile down upon us on this day! We go now, \
731       into the unknown!~ He triumphantly joins the white cube to \
732       the end of the Rod of the Ancients.^^\
733       There is a sudden, blinding white flash! The chanting is instantly \
734       broken by a tremendous thunderclap! Brother Joseph is suddenly \
735       thrown back by a great force, and to your horror, the Rod of the \
736       Ancients breaks apart! Four pieces now float serenely above the \
737       altar, above a strange black globe that seems to crackle with energy.^^\
738       ~AT LAST!~^^\
739       The voice comes from nowhere and everywhere. The black sphere \
740       pulsates with lightning.^^\
741       ~ANABAIS IS FREE AGAIN!~ The voice pauses. \
742       ~I see you found my fake mystic cube \
743       Joseph. I knew that someday, someone would find it, and free \
744       me from my prison!~ The voice pauses again. ~To show my gratitude, I'm \
745       scattering this broken symbol to the corners of the world!~ \
746       The pieces of the rod suddenly disappear!^^\
747       ~Watch out!~ someone cries. \
748       The black sphere suddenly expands with alarming speed. \  
749       Seconds later, a violent explosion seems to jar the very \
750       ground you stand on, and a black void covers all.^^\
751       You awaken in your room in a cold sweat. Was it all a terrible \
752       dream? The day beckons...^";
753       PlayerTo(MON_your_quarters);
754       ! remove MON_Chapel1;  clean up memory (NOTE: This is futile)
755       rfalse;
756    }
757 ];
758
759
760 Object MON_your_quarters "Your Quarters"
761    with name "furnishing" "furnishings",
762    description "You are in your room in the Monastery. It is \
763 sparsely furnished, but certainly feels like home. The exit \
764 is north.",
765    n_to MON_f1hall1,
766    has light;
767
768 Object note "note" MON_your_quarters
769 with name "note",
770         description "The note, in a hastily written scrawl, reads:^\
771             ~Please stop by the chapel as soon as you can.^\
772             -- Joseph~",
773         !weight 1,
774         size 5, 
775 ;
776
777 !Object staff "staff" MON_your_quarters
778 !   with name "staff" "walking" "trusty" "stick",
779 !        initial "Your trusty walking staff is right where you left it.",
780 !        description "A stout piece of pine you found while on a nature \
781 !                     walk, this staff has served you well on many journeys.",
782         !weight 20,
783 !        size 20,
784 !;
785
786 Object sleeppallet "sleeping pallet" MON_your_quarters
787    with name "pallet" "sleeping" "roll",
788    description "This is your sleeping pallet, a short portable sleeping roll \
789                made of straw. It's softer than it looks.",
790    size 25,
791    react_before [;
792       Go: if (player in self) "You'll have to get off the sleeping \
793 pallet first.";
794    ],
795    has supporter enterable;
796
797 Object MON_f1hall1 "Hallway (near your quarters)"
798    with description "You are in a hallway running west and east. The \
799 vaulted ceilings are a nice touch. Your \
800 quarters are to the south.",
801    name "vaulted" "ceiling",
802    s_to MON_your_quarters,
803    w_to MON_f1hall2,
804    e_to MON_f1hall3,
805    has light;
806
807 Object MON_f1hall3 "Hallway (near quarters of Palemon and TuffBerry)"
808    with description "You are in a hallway running west and east. \
809 Brother TuffBerry's quarters lie to the south. Brother Palemon's \
810 quarters are to the north.",
811    w_to MON_f1hall1,
812    e_to MON_f1hall4,
813    n_to MON_Palemon_quarters,
814    s_to MON_Tuffberry_quarters,
815    has light;
816    
817 Object MON_f1hall4 "Hallway (east end)"
818    with description "You are at the east end of an east-west hallway. \
819 Brother Joseph's quarters lie to the north, and Brother Toolbox's \
820 quarters lie to the south.",
821 ! The acolyte chambers lie to the east.",
822    w_to MON_f1hall3,
823    ! n_to MON_Joseph_quarters,
824    n_to "It doesn't look like Joseph is in. Perhaps you can find \
825 him elsewhere.",
826    s_to MON_Toolbox_quarters,
827 !   e_to MON_acolyte_chambers,
828    has light;
829       
830 ! Object MON_acolyte_chambers "Acolyte Chambers"
831 !    with description "You are in a long chamber that serves as the home \
832 ! for the many devoted acolytes of the Order.  The room is currently \
833 ! empty.",
834 !    w_to MON_f1hall4,
835 !    has light;
836    
837 Object MON_f1hall2 "Hallway (west end)"
838    with description "You are at the west end of an east-west hallway. \
839 There are stairs up and down here, and an exit to the west.",
840    name "stairs",
841    e_to MON_f1hall1,
842    u_to MON_f2hall1,
843    d_to MON_f0hall1,
844    w_to MON_garden,
845    has light;     
846
847 Object MON_garden "Monastery Gardens"
848    with description "You are in the Monastery gardens, where various \ 
849 shrubs and conifers are covered in a light blanket of snow. \
850 An open cloister lies to the west, while \
851 a doorway heads east.",
852    name "cloister" "doorway" "shrubs" "conifers",
853    w_to MON_cloister,
854    e_to MON_f1hall2,
855    has light;
856  
857 !Nearby shrubs "snow-covered shrubs"
858 !   with name "shrubs" "shrub" "snow-covered" "conifers" "conifer" "plants",
859 !        description "Good thing they're evergreen.",
860 !   has scenery;
861    
862 Object sand "sand" MON_garden
863    with name "sand",
864         initial "A small area in the snow has been cleared for late winter \
865 planting, and some sand has been sprinkled here and there.",
866         description "A handful of sand, nothing more, nothing less.",
867         !weight 5,
868         size 5,
869         article "some",
870 ;
871
872 Object MON_cloister "Cloister Walkway"
873    with description "You are in an open cloister, that runs along the \
874 Monastery gardens to the east. To the north is the main wing of the \
875 Monastery. To the south is the entrance hall.",
876    name "cloister",
877    e_to MON_garden,
878    n_to MON_Main_hall,
879    s_to MON_Entrance_hall,
880    has light;
881    
882 Object MON_Entrance_hall "Entrance Hall"
883    with description "This is the large entrance hall to the Monastery. \
884 Many a devoted visitor has passed through this place. \
885 There is an exit to the outside world to the \
886 south, and the rest of the Monastery lies to the north.",
887    s_to Cliff_face, out_to Cliff_face,
888    n_to MON_cloister,
889    before [;
890       Go:
891          if ((noun==s_obj) || (noun==out_obj))
892             print "You are surprised by a cold blast of wind as you leave the Monastery!^";
893    ],
894    after [;
895       Go:
896          if ((noun==in_obj) || (noun==n_obj))
897             print "You are greeted by relatively warm and cozy air.^";
898    ],
899    has light;
900
901 Object MON_Main_hall "Main Hall"
902    with description "This is the main hall of worship in the Monastery. \
903 A large domed ceiling hides some sort of lighting that create a warm yet \
904 serene atmosphere. A covered walk to the rest of the Monastery lies to \
905 the south. To the north is the Monastery chapel. A brazier sits in \
906 the center of the room.",
907         name "dome" "ceiling" "lighting" "atmosphere",
908         s_to MON_cloister,
909         n_to MON_Chapel2,
910    has light;
911    
912 Nearby brazier "brazier"
913    with name "brazier",
914         description "This is a silver incense brazier, somewhat similar to \
915 an ornamental bowl on a tripod. Brother Palemon supposedly \
916 found it on one of his many journeys.",
917         before [;
918            Take:
919               "That's been in the Monastery for years. People would \
920               be upset if you took it.";
921            Receive:
922       !        if (noun~=incense)
923                if (noun has is_sphere) {
924                   print "As you place the sphere in the brazier, \
925 you feel a strange sensation. Suddenly, the brazier is filled \
926 with ";
927                   if (noun == brown_sphere)
928                      print "earthworms!";
929                   if (noun == green_sphere)
930                      print "seawater!";
931                   if (noun == red_sphere)
932                      print "burning embers!";
933                   if (noun == silver_sphere)
934                      print "white vapors!";
935                   " No, wait, it's empty again. You hastily \
936 withdraw the sphere, and try to clear your mind.";
937                }
938                else "That doesn't seem quite appropriate.";                 
939         ],
940         size 9,
941    has scenery container open;
942
943 Object MON_Chapel2 "Monastery Chapel"
944    with description "You are in the Monastery Chapel, the site of the \
945 recent appearance of the legendary Anabais. Signs of the \
946 recent visit include the slightly scorched walls, and the \
947 reek of brimstone. Wood pews are arranged in a circle \
948 around the central altar. The exit is south.",
949    name "pews" "scorched",
950    s_to MON_Main_hall,
951    before [;
952       Smell:
953          "You detect the faint odor of brimstone.";
954 !      Yell: 
955 !         if ((parent(Joseph)==MON_Chapel2) && (Joseph hasnt general))
956 !            "Shhh.  You don't want to abruptly disturb Joseph like that.";
957 !      Go: 
958 !         if (noun==s_obj) {
959 !            if ((parent(Joseph)==MON_Chapel2) && (Joseph has general) &&
960 !                (WeightOf(Joseph) > 140)) {
961 !               if (WeightOf(Joseph) == 149) {
962 !                  Joseph.weight = 139;
963 !                  print "^As you leave, Brother Joseph calls out \
964 !                   ~Oh, and take something for that cold!~^";
965 !                   rfalse;
966 !               }
967 !               if (WeightOf(Joseph) == 148) {
968 !                  Joseph.weight = 139;
969 !                  print "^As you leave, Brother Joseph calls out \
970 !                  ~Oh, and remember -- reading the scriptures \
971 !                  is one sure way of maintaining an active mind!~^";
972 !                  rfalse;
973 !               }
974 !               if (WeightOf(Joseph) == 147) {
975 !                  Joseph.weight = 139;
976 !                  print "^As you leave, Brother Joseph calls out \
977 !                  ~Oh, and remember -- mirth is wonderful for the soul, \
978 !                  in moderation, of course.~^";
979 !                  rfalse;
980 !               }
981                ! add in any others here...
982 !            }
983 !         }
984 !      Sneeze:
985 !              if (Joseph hasnt general) {
986 !                 give Joseph general;
987 !                 Joseph.weight = 149;
988 !                 JosephWakeAction();
989 !                 rtrue;
990 !              }
991 !      Yawn:
992 !              if (Joseph hasnt general) {
993 !                 give Joseph general;
994 !                 Joseph.weight = 148;
995 !                 JosephWakeAction();
996 !                 rtrue;
997 !              }
998 !      Laugh:
999 !              if (Joseph hasnt general) {
1000 !                 give Joseph general;
1001 !                 Joseph.weight = 147;
1002 !                 JosephWakeAction();
1003 !                 rtrue;
1004 !              }                                          
1005 !      Drop:
1006 !              if (Joseph hasnt general) {
1007 !                 give Joseph general;
1008 !                 Joseph.weight = 146;
1009 !                 JosephWakeAction();
1010 !                 move (inp1) to MON_Chapel2;
1011 !                 rtrue;
1012 !              }                                          
1013     ],
1014    has light;
1015    
1016 ! And now, the incredible shrinking Brother Joseph...
1017 ! Modified 3/16 -- this puzzle seems to be unpopular...
1018 Object Joseph "Joseph" MON_Chapel2
1019    with name "Brother" "Joseph",
1020         description "Brother Joseph is a pale man, with gray eyes, a fine \
1021             beard, and a finer disposition.",
1022 !        weight 150,
1023         number 0,  ! used to hold count of (fake) rod pieces received
1024         describe [;
1025 !           if (self hasnt general)
1026 !            "Brother Joseph is kneeling in front of the remains of the altar, \
1027 !            his eyes closed, deep in meditation.";
1028 !           else
1029               "Brother Joseph is here, standing by the altar.";
1030         ],
1031         life [;
1032 !           if ((WeightOf(Joseph) == 150) && ((action ~= ##Attack) || 
1033 !                                             (action ~= ##WakeOther)))
1034 !              "Perhaps it's best not to bother him, he seems very \
1035 !              deep in meditation.";
1036 !           WakeOther:
1037 !              if (WeightOf(Joseph) == 150)
1038 !                 "Joseph isn't asleep, just meditating.  You may need to \
1039 !do something subtle to rouse him.";
1040            Attack, ThrowAt:
1041               deadflag = 1;
1042               Player_Lives_Left = 0;
1043 "Your blow sends Brother Joseph staggering back.^^\
1044 Brother Joseph gets up and brushes himself off, and glares \
1045 at you. Ro-roo, I think you made him mad. \
1046 You remember, of course, that Brother Joseph is a renowned \
1047 full-contact martial artist?^^\
1048 ~Impudent wretch! I'll show you how we deal with non-believers here!~\
1049 ^^Suddenly, Brother Joseph produces a gigantic mallet from \
1050 beneath his robes and clobbers you into a pulp.";
1051            Ask:
1052               if (second=='amulet')
1053                  "~Don't leave the Monastery without it!~";
1054               if (second=='joseph')
1055                  "Joseph smiles. ~I believe we've been introduced.~";
1056               if (second=='rod')
1057                  "~We must recover the Rod before it is too late!~";
1058               if (second=='anabais')
1059                  "~Beware the demon!  He is most cunning and dangerous!~";
1060               if (second=='scriptures')
1061                  "~Study the holy scriptures, and you will be rewarded.~";
1062               if (second=='palemon' or 'tuffberry' or 'toolbox')
1063                  "~I fear I know not where his feet now tread.~";
1064               "~I don't know anything about that. Perhaps you should \
1065               consult our library upstairs?~";
1066
1067            Tell:
1068               "~Do tell.~";
1069  
1070            Show:
1071               if (noun has is_rod)
1072                  "~Have you succeeded in retrieving the Rod? If so, \
1073 do what you feel is right.~";
1074                  
1075            Give:
1076               if (noun has is_rod) {
1077                  if ((noun==black_rod_piece) || (noun==white_rod_piece) ||
1078                      (noun==smoke_rod_piece) || (noun==gray_rod_piece)) {
1079                     Joseph.number = Joseph.number + 1;
1080                     remove noun;
1081                     print "Joseph takes the rod piece. ";
1082                     if (Joseph.number==4) {
1083                        ! trouble -- got the whole fake rod to Joseph...
1084                        deadflag = 1;
1085                        Player_Lives_Left = 0; 
1086                        "~The Order will \
1087 remember your acts of bravery forever,~ Joseph says, as he brings out \
1088 all four rod pieces and tries to join them together. A sudden burst \
1089 of light blinds you!^^\
1090 When you can see again, a large black sphere of malevolent energy \
1091 floats nearby! Joseph, either dead or stunned, lies in one corner \
1092 of the room. The four rod pieces are floating above the sphere.^^\
1093 ~Foolish little priest,~ a evil voice says in you mind. ~You \
1094 have only brought upon yourself your own undoing. With my rod returned \
1095 by an innocent, the pact is complete. Come forth, my brothers, \
1096 for our time of power is at hand!~^^\
1097 The last thing you hear is mocking laughter, before the world \
1098 as you know it comes to a close.";
1099                     } 
1100                     else 
1101                     "~Well done, brave Priest!~ he says.";
1102                  }
1103                  else
1104 "Joseph looks at the rod piece and seems puzzled. ~This isn't any part \
1105 of the Rod of the Ancients that I've ever seen. And yet, it seems similar.~ \
1106 He hands it back to you. ~In this, my teachings can help you no \
1107 further.~";
1108               }
1109               else "Joseph waves off your offering. ~You may \
1110 need that in your quest.~";
1111            Answer, Order:
1112               if (special_word=='hello' or 'hi') 
1113                  "Joseph smiles. ~Hello.~";
1114            default:
1115               "At the moment, Joseph seems to be \
1116 preoccupied with spiritual matters.";
1117         ],                     
1118         before [;
1119            Cast:
1120              "Brother Joseph stops you in mid-chant. ~That won't be necessary~";             
1121         ],
1122         each_turn [;
1123            if (self hasnt general) {
1124               give self general;
1125            move Amulet to player;
1126            "^Joseph smiles as you enter. \
1127 ~I'm glad you found me. As you know, thanks to the old \
1128 fool standing before you, the demon Anabais is loose upon \
1129 the world once more. He has broken the Rod of the Ancients \
1130 which was keeping our house and Order protected from outsiders. \
1131 It is a sorry day for us all.~ Joseph pauses for a moment. \
1132 ~You are our final hope in a time of chaos. Brothers \
1133 Palemon, TuffBerry and Toolbox have left the Order, and only \
1134 you remain. I must now ask you to serve the Order which you \
1135 have so faithfully served in the past. No short order this, for \
1136 our continued existence depends on it, but you must go out into \
1137 a world gone mad alone, and retrieve the four broken pieces of \
1138 the Rod of the Ancients, and return them here to me, so that we \
1139 can rid the world of the evil we have loosed!~^^Brother Joseph \
1140 pauses and searches his robes.^^~Here, you will need this,~ he \
1141 says, giving you a strange amulet. ~Without this amulet, the \
1142 Ancient Ones cannot give you the mystic aid that you will most \
1143 certainly need. But I waste much time. Go now, and may the \
1144 Gods smile upon us all.~";
1145            }
1146         ],
1147    has animate proper;
1148     
1149 Object Amulet "holy amulet" 
1150    with name "amulet" "holy",
1151         description "This small golden amulet and chain seem to \
1152 shimmer with a strange mystic saffron energy. The \
1153 pendant portion of the amulet is in the shape of a small \
1154 golden cube.",
1155  !       weight 10,
1156         size 7,
1157         before [;
1158            Wear:
1159               if (self hasnt worn) { give self worn;
1160               "As you place the amulet around your neck, \
1161               you feel a strange sense of mystic power.";
1162               } 
1163               else "You're already wearing that.";
1164         ],              
1165    has clothing scored;
1166            
1167 ! [ JosephWakeAction;
1168 !      print "^You make a subtle noise^^\
1169 !           Brother Joseph opens his eyes, breathes deeply, and smiles.^^\
1170 !            ~I'm glad you found me.  As you know, thanks to the old \
1171 !            fool standing before you, the demon Anabais is loose upon \
1172 !            the world once more.  He has broken the Rod of the Ancients \
1173 !            which was keeping our house and Order protected from outsiders. \
1174 !          It is a sorry day for us all.~  Joseph pauses for a moment. \
1175 !          ~You are our final hope in a time of chaos.  Brothers \
1176 !          Palemon, TuffBerry and Toolbox have left the Order, and only \
1177 !          you remain.  I must now ask you to serve the Order which you \
1178 !          have so faithfully served in the past.  No short order this, for \
1179 !          our continued existence depends on it, but you must go out into \
1180 !          a world gone mad alone, and retrieve the four broken pieces of \
1181 !          the Rod of the Ancients, and return them here to me, so that we \
1182 !          can rid the world of the evil we have loosed!~^^Brother Joseph \
1183 !          pauses and searches his robes.^^~Here, you will need this,~ he \
1184 !          says, giving you a strange amulet.  ~Without this amulet, the \
1185 !          Ancient Ones cannot give you the mystic aid that you will most \
1186 !          certainly need.  But I waste much time.  Go now, and may the \
1187 !          Gods smile upon us all.~";
1188 !     move Amulet to player;
1189 !     rtrue;
1190 !];
1191
1192 Object altar "altar" 
1193    with name "altar" "damaged" "cube",
1194       description "The altar is roughly the shape of a five foot \
1195          white cube. The top edges appear to be singed black and there \
1196          are cracks and chips all over.",
1197    found_in MON_Chapel1 MON_Chapel2,
1198    before [;
1199       Search:
1200          if (self hasnt general) {
1201             give self general;
1202             move holywater to player;
1203             "You uncover a vial of holy water.";
1204          }
1205    ],
1206    has scenery supporter;
1207
1208 Object holywater "vial of holy water"
1209    with name "holy" "water" "vial",
1210         description "A small glass vial of holy water.",
1211         before [;
1212            Eat: "You might want to try drinking it instead.";
1213            Drink: remove self;
1214               Player_HP_CUR = Player_HP_MAX;
1215               "You quaff the holy water with a simple ceremony. \
1216 You feel physically and spiritually refreshed."; 
1217         ],
1218         size 5,
1219 ;
1220    
1221 Object MON_Palemon_quarters "Brother Palemon's Quarters"
1222    with description [;
1223         print "You are in Brother Palemon's quarters, which \
1224            have been left unattended ever since Brother Palemon's \
1225            unexplained disappearance many years ago";
1226         if (self has general)
1227            print ". To the west, a small secret door in the wall leads \
1228             into darkness";
1229         ". The exit is south.";
1230         ],        
1231    s_to MON_f1hall3,
1232    w_to [;
1233       if (self hasnt general)
1234          "You can't go that way.";      
1235       else return MON_Hidden_sanctum;
1236    ],
1237    before [;
1238       Push:
1239         if (noun == w_obj) {
1240            if (self hasnt general) {
1241               give self general;
1242               "Pushing the west wall reveals a hidden secret door! \
1243 You've been in these quarters before, but certainly never noticed \
1244 anything like this!";
1245               }
1246               else "Nothing happens."; 
1247            }
1248        Touch, Rub:
1249           if ((noun == w_obj) && (self hasnt general))
1250              "Oddly, a section of the west wall feels slightly thin.";
1251    ],
1252    has light;
1253    
1254 Object journal "thin journal" MON_Palemon_quarters
1255    with name "journal" "thin",
1256         description "This journal is very strange indeed. Brother \
1257         Palemon seems to have been very preoccupied up to the point \
1258         of his disappearance with strange accursed places that he \
1259         claims are located all over Quendor. He also makes several \
1260         references to evil 'spirits' found in these places. You also \
1261         notice that several pages of parchment near the back of \
1262         the journal have been torn out.",
1263         !weight 20,
1264         size 15,
1265 ;
1266
1267 Object MON_Hidden_sanctum "Hidden Sanctum"
1268    with description "You are standing in a small chamber that obviously hasn't \
1269 been used in quite some time -- the cobwebs and dust are several \
1270 layers thick. There is a short crawl east.",
1271    name "cobwebs" "dust",
1272    e_to MON_Palemon_quarters,
1273 ;   
1274  
1275
1276 Object dusty_scroll "dusty scroll" MON_Hidden_sanctum
1277    class scroll_class,
1278    with name "dusty",
1279 ;
1280
1281 Object foblub_spell "deliver magnificent sermon (glue audience to seats)" dusty_scroll
1282    class spell_class,
1283    with name "foblub",
1284         magic [;
1285            if (second hasnt animate)
1286               "Your sermon goes unheard.";
1287            if (second == player)
1288               "Well, I know you like listening to yourself, but \
1289 isn't this a bit much?";
1290            "You give a wonderful sermon about how one's future \
1291            affects one's past, but no one seems to be listening."; 
1292         ],
1293 ;
1294
1295       
1296 Object MON_TuffBerry_quarters "Brother TuffBerry's Quarters"
1297    with description "You are in Brother TuffBerry's quarters, vacant \
1298 since he undertook his quest for Joseph not long ago. The \
1299 exit is north.",
1300    n_to MON_f1hall3,
1301    has light;
1302    
1303 Object page "torn page" MON_TuffBerry_quarters
1304    with name "torn" "page",
1305         !weight 5,
1306         size 5,
1307            description "This page was apparently \
1308 torn from a larger document of some sort. All that is left \
1309 now reads:^^\
1310            ~...fear. Just today I heard again something below \
1311            me when I was meditating upstairs. \
1312            It sounded like a person, or something alive at least \
1313            was just below, trying to quietly move around unnoticed. \   
1314            Clearly this is \
1315            impossible, and yet I cannot doubt what I heard. \
1316            Palemon tells me I'm hearing spirits, but little does \
1317            he know that I once heard the same noises in his \
1318            very chambers! He was not around at the time, but \
1319            to the west, behind the wall, I...~",
1320 ;           
1321         
1322
1323 !Object MON_Joseph_quarters "Brother Joseph's Quarters"
1324 !   with description "You are in Brother Joseph's quarters.  The hallway lies \
1325 !           to the south.",
1326 !   s_to MON_f1hall4,
1327 !   has light;
1328    
1329 Object MON_Toolbox_quarters "Brother Toolbox's Quarters"
1330    with description "You are in Brother Toolbox's quarters, vacant \
1331 ever since he left the order due to differences many years \
1332 ago. The exit is north.",
1333    n_to MON_f1hall4,
1334    has light;
1335
1336 Object tb_diary "diary" MON_Toolbox_quarters
1337    with name "diary" "toolbox",
1338         description "\
1339         ~-- <944 GUE> Today Brother Joseph tried to explain the \
1340         essence of how we channel magic energy through our \
1341         amulets. To me, this seems to pale in comparison with \
1342         the seemingly innate abilities of those who call \
1343         themselves Enchanters. Joseph did show me a nice \
1344         trick, however. He brought the Rod of the Ancients near \
1345         my amulet, and the amulet gave off a sudden purple flash of light! \
1346         I'll have to try that one on the Acolytes tomorrow.~^^\
1347         (there isn't much else of interest until the \
1348         very last entry, which is not dated)^^\        
1349         ~-- So long diary. I'm now off to seek greater spiritual \
1350         guidance in Thriff. I hear the summers there are very nice \
1351         too.~",
1352         !weight 12,
1353         size 12,
1354 ;
1355    
1356 Object folded_scroll "folded scroll" MON_Toolbox_quarters
1357    class scroll_class,
1358    with name "folded",
1359 ;
1360
1361 Object espnis_spell "deliver dull sermon (cause sleep)" folded_scroll
1362    class spell_class,
1363    with name "espnis",
1364         magic [;
1365            if (second hasnt animate)
1366               "Your sermon goes unheard.";
1367            if (second == player)
1368               "A preacher boring himself to sleep with his \
1369 own sermon? This doesn't seem prudent.";
1370            CDefArt(second); 
1371            " listens as you begin your sermon about the general \
1372               religious practices of the royal families of the past, but \
1373               only stifles a yawn when you finish.";  
1374         ],
1375 ;
1376    
1377    
1378 Object MON_f2hall1 "Hallway (second floor, west)"
1379    with description "You are in a hallway on the second floor \
1380            of the Monastery. The hallway continues east, while \
1381            stairs lead downwards.",
1382         name "stairs",
1383         d_to MON_f1hall2,
1384         e_to MON_f2hall2,
1385    has light;
1386    
1387 Object MON_f2hall2 "Hallway (second floor, east)"
1388    with description "You are in a hallway on the second floor \
1389            of the Monastery that runs east-to-west. To the \
1390            north is the private meditation room. To the east \
1391            is the Monastery library. To the northeast is an \
1392            entrance to the steeple room.",
1393         w_to MON_f2hall1,
1394         n_to MON_priv_med_room,
1395         e_to MON_Library,
1396         ne_to MON_Steeple_room,
1397    has light;
1398    
1399 Object MON_priv_med_room "Private Meditation Room"
1400    with description "You are in a small bare chamber that is \
1401            used for private meditation and worship. The only \
1402            exit lies to the south.",
1403         s_to MON_f2hall2,
1404    has light;
1405    
1406 Object MON_Library "Monastery Library"
1407    with description "You are in the Monastery library, a cozy, \
1408            almost cramped room with shelves of various books. \
1409            The exit is to the west.",
1410         w_to MON_f2hall2,
1411    has light;
1412
1413 Object lib_shelves "shelves" MON_Library
1414    with name "shelves" "bookshelves",
1415         description "Just some bookshelves.",
1416    has scenery supporter;
1417    
1418 ! *** LIBRARY BOOKS
1419
1420 ! Scriptures:
1421 ! -- Of course, this is a ruse created from the deviations of 
1422 ! Anabais.  Grounded in some fact though.  Each section has a
1423 ! lie, which may not initially be obvious.  Truthful sections 
1424 ! are scattered over Quendor.
1425 Object HolyScriptures1 "a copy of the Holy Scriptures" lib_shelves
1426    with name "holy" "scriptures" "copy",
1427         description "This sacred tome details the teachings and \
1428 beliefs of the Order, of which it's certainly always good \
1429 practice to re-familiarize yourself with. The scriptures are \
1430 divided into several sections. Sections that \
1431 can be consulted in greater detail include:^^\
1432 ~Doctrines~^\
1433 ~Demons~^\
1434 ~Spirits~^\
1435 ~(Book of the) Mystical~^\
1436 ~(Book of the) Planes~^\
1437 ~(Book of the) Ancients~^\
1438 ~Legend of the Rod~",
1439         before [ w1; Consult:
1440         if (consult_words > 1)
1441                "You'll have to consult the sacred book by \
1442 individual section.";               
1443             wn = consult_from; w1 = NextWord();
1444             switch (w1) {
1445                'doctrines', 'doctrine', 'canon':
1446 "~THE SACRED DOCTRINES OF THE ORDER OF BALANCE:^^\
1447 Thou shalt strive to achieve balance in a world filled with unbalance.^\
1448 Thou shalt pray to the Deities in moments of inner reflection.^\
1449 Thou shalt not harm innocents nor aid them -- this is the way of balance.~"; 
1450 ! TODO add add
1451                'demons', 'demon', 'anabais':
1452 "~Fear not, mortal men^\
1453 though your world be filled with demons^\
1454 and the wicked.^^\
1455 Thou alone can prevail^\
1456 as The Ancient Ones^\
1457 against Anabais, the trickster^\
1458 were victorious.~";               
1459 ! LIE - The ancient ones lost to Anabais and the other demons
1460                'spirits', 'spirit':
1461 "~Before the dawn of time, know that our world was \
1462 filled with evil spirits of the elements, \
1463 until mankind came upon the land and vanquished them \
1464 forever.~";
1465 ! LIE - spirits still exist.
1466                'mystic', 'mystical', 'magic', 'chant':
1467 "~If one is true of doubts, then a believer in the \
1468 great Harmony can draw upon the powers of the Ancients \
1469 and perform feats of mystic power anywhere. Remember that in \
1470 so doing, thou must act only as the channel of mystical \
1471 power for the Ancient Ones.~";               
1472 ! LIE - powers don't work everywhere, and not always.
1473                'planes', 'plane', 'atrii', 'hades':
1474 "~Let not the ways of the mortal life \
1475 dissuade the knowledge of higher and lower planes \
1476 of existence.^^\
1477 For, beyond mortal reach are places where those who \
1478 have truly served the Order and those who have truly \
1479 forsaken the Harmony of Balance will find themselves \
1480 in death. These are the Ethereal Plane of Atrii and \
1481 the plane of the damned -- Hades.~";               
1482 ! LIE - don't have to die to reach Atrii.
1483                'ancients', 'ancient':
1484 "~Trust in The Ancient Ones, those Three who showed mankind the \
1485 way of Balance and Harmony.~";
1486 ! LIE - Four ancient ones existed.
1487                'rod', 'legend':
1488 "~Anabais foresaw his own demise when he dared to \
1489 challenge the Ancient Ones. From powers of light and \
1490 darkness, the Ancient Ones constructed that holy Rod that \
1491 we know only as the Rod of the Ancients, and did smite \
1492 the demon Anabais so grievously, that they did imprison \
1493 him in that very Rod, where he could do no harm. This \
1494 very Rod was made of pieces of ancient elemental energy, \
1495 once separated. Only the powers of the Ancients could \
1496 bring them together.~";               
1497 ! LIE - Anabais never imprisoned, etc.
1498                default: "There doesn't seem to be a section \
1499 about that.";               
1500             }
1501           Cast:
1502              if (the_spell_was == ledak_spell) {
1503                 remove self;
1504                 "The scriptures are surrounded by a \
1505 yellow glow. To your horror, the tome evaporates into nothing!";
1506              }
1507         ],
1508         !weight 20, 
1509         size 15,
1510 has proper;
1511      
1512 ! *** parchments
1513 ! (Several scraps of
1514 ! Palemon's journal are scattered around Quendor, 
1515 ! contradicting the ancient scriptures) 
1516
1517 ! (faded -- spirits exist)
1518 Object p2 "faded parchment" MON_Hidden_sanctum
1519    class parchment_class,
1520    with name "faded",
1521 description "~...are real! I have seen much evidence in the \
1522 jungles of Miznia, marshes of Fublio Valley, the ruins \
1523 of old Egreth and in Aragain itself! I believe that \
1524 they are associated with certain basic elements in the \
1525 surrounding area. But they dare not show themselves now, \
1526 not while magic is strong! Woe unto us, should the powers \
1527 of magic cease, as there would be nothing to stop their \
1528 terror...~",
1529 ;
1530
1531 Object MON_Steeple_room "Steeple Room"
1532    with description "You are in a round room with colored-glass \
1533            windows. Wood beams line the walls and rise to form \
1534            a short point in the peaked ceiling above. A small \
1535            walkway returns to the southwest. A long wood table \
1536            sits in the center of the room.",
1537         name "windows" "glass" "beams" "walkway" "handle" "latch",
1538         sw_to MON_f2hall2,
1539         !out_to MON_Steeple_roof,        
1540         out_to steeple_window,        
1541         before [;
1542            Go: 
1543               if ((noun == out_obj) && (steeple_window has open)) {
1544                  if (random(10) < 3) {
1545                     print "^You climb out the open window and somehow manage \
1546                           not to fall.^";
1547                  }
1548                  else {
1549                     deadflag = 1;
1550 print "^You climb out the open window, but slip on the icy sill";
1551 if (has_resist_gravity == 0) ", and plummet to the ground!";
1552 else 
1553 "! As you float slowly downwards, you can't help but notice the \
1554 hungry-looking winter dire wolf below, waiting for you to land...";
1555                  }
1556               }              
1557         ],
1558    has light;
1559    
1560 Object MON_Steeple_roof "Steeple Roof"
1561    with description "You are on a very narrow ledge outside \
1562            the Monastery steeple. The snow and wind are doing \
1563            their best to send you to a ungracious death below. The \
1564            steeple roof is quite sharply slanted.",
1565         in_to steeple_window,
1566         name "roof" "ledge" "wind",
1567         cant_go "It's hard enough staying on the ledge.",
1568         before [;
1569            Jump:
1570              deadflag = 1;
1571              if (has_resist_gravity==0)
1572              "Well, if you insist. The ground breaks most of the \
1573              bones in your body, including the important ones.";
1574              else
1575              "You float downwards gracefully, into the waiting \
1576 jaws of a winter dire wolf."; ! <shrug>
1577         ],
1578    has light;        
1579    
1580 Object steeple_window "steeple window" 
1581    with name "window" "rose" "steeple",
1582         found_in MON_Steeple_room MON_Steeple_roof,
1583         description [;
1584            print "A large rose-colored glass window";
1585            if (location==MON_Steeple_room) 
1586               ", with a handle and latch";
1587            ".";
1588         ],
1589         describe [;
1590            if (location==MON_Steeple_room) {
1591               if (self has open)
1592                  "Someone has left a rose-colored window open and some \
1593 snow drifts in.";
1594               "A large rose-colored window lets some light in.";
1595            }
1596            if (location==MON_Steeple_roof) {
1597               if (self has open)                
1598                  "A window opens into the steeple proper.";
1599               "A large rose-colored window is partially covered with snow here.";
1600            }
1601         ],
1602         door_dir [;
1603            if (location==MON_Steeple_room) return out_to;
1604            return in_to;
1605         ],
1606         door_to [;
1607            if (location==MON_Steeple_room) return MON_Steeple_roof;
1608            return MON_Steeple_room;
1609         ],
1610         before [;
1611            Enter:
1612               if (location==MON_Steeple_room) <<Go out_obj>>;
1613               else <<Go in_obj>>;
1614            Open:
1615               if ((self hasnt open) && (location==MON_Steeple_roof))
1616                  "Unfortunately, the window opens inward, and the latch \
1617                  and handle are on the inside.";
1618               if ((self hasnt open) && (location==MON_Steeple_room)) {
1619                  give self open;
1620                  "You turn and yank the window handle and pull. \
1621                   A rush of wind and snow greets you as you open \
1622                   the window.";
1623               }
1624            Close:
1625               if ((self has open) && (location==MON_Steeple_roof))
1626                  "It doesn't seem to want to stay shut. You can't \
1627 quite reach the window latch from out here.";                 
1628            Attack:
1629               "The window glass remains unmarred. It's probably made of \
1630               that especially thick lead-glass that the Monastery got \
1631               because Brother Toolbox kept complaining about drafts.";
1632            Push:
1633               if (self hasnt open)
1634                  "It doesn't budge.";
1635            Search:
1636               "The window looks out into a winter wonderland.";
1637         ],        
1638    has static door openable;
1639
1640 Object steeple_table "long table" MON_Steeple_room
1641    with name "table" "long" "steeple",
1642         description "This long wood table has been used for various \
1643            private meetings and impromptu get-togethers between \
1644            members of the Order in the past.",
1645    has scenery supporter;   
1646    
1647 Object MON_f0hall1 "Hallway (basement)"
1648    with description "You are in a hallway in the Monastery basement. \
1649            The hallway continues to the east, and stairs lead upwards.",
1650         name "stairs",
1651    u_to MON_f1hall2,
1652    e_to MON_Refectory,
1653    has light;
1654
1655 Object MON_Refectory "Refectory"
1656    with description "You are in the Refectory, the general dining \
1657 area for members of the Order. You grimace at the lingering scent of \
1658 Brother Pufpistery's favorite dish -- Borphbelly stew. \
1659 Several large oak tables and benches adorn this otherwise \
1660 bare room. An exit lies to the west, the kitchen is to \
1661 the north, and another exit lies to the east.",
1662         name "oak" "tables" "benches", 
1663    w_to MON_f0hall1,
1664    n_to MON_Kitchen,
1665    e_to MON_Storeroom,
1666    before [;
1667       Smell: "Even the faintest lingering scent of Borphbelly stew \
1668 is enough to make you feel like fasting.";
1669    ],
1670    has light;
1671    
1672 Object MON_Kitchen "Monastery Kitchen"
1673    with description "You are in Brother Pufpistery's domain -- the \
1674 dreaded acolyte kitchen. A huge soup \
1675 cauldron sits unused nearby. The refectory is \
1676 south.",
1677    s_to MON_Refectory,
1678    before [;
1679       Smell: "The lingering scent of Borphbelly stew \
1680 is stronger here, unfortunately.";
1681    ],
1682    has light;
1683
1684 Object cauldrons "cauldron" MON_Kitchen
1685    with name "cauldron" "vat",
1686         description "This large iron soup cauldron has the \
1687            unmistakable odor of Borphbelly stew. Ugg.",
1688         size 25,
1689         capacity 10,
1690         before [;
1691            Cast:
1692              if (the_spell_was == bekdab_spell)
1693                 "The soup cauldron rusts a bit.";
1694         ],
1695    has scenery container open;
1696
1697 Object preparing_table "preparing table" MON_Kitchen
1698    with name "table" "preparing",
1699         description "A heavy wood table with a well-used look.",
1700         before [;
1701            Cast:
1702               if (the_spell_was == egdelp_spell)
1703                  "The table is now covered in a waxy film. \
1704 All things considered, it actually looks cleaner now.";
1705         ],
1706    has static supporter;
1707    
1708 Object recipe_paper "scrap of paper" preparing_table
1709    with name "scrap" "recipe" "paper",
1710         description "It's a recipe torn from an issue of \
1711              ~Better Homes and Caverns~:^^\
1712              GUILDMASTER SNEFFLE'S PRIZE WINNING BIRTHDAY CAKE \
1713              ^^\
1714              Ingredients:^^\
1715              -- 1 small sack of flour^\
1716              -- 1 large sugar cube^\
1717              -- 1 packet of baking powder^\
1718              -- 1 stick butter^\
1719              -- 1 large corbie egg^\
1720              -- Dornberries, to taste^^\
1721              Mix the ingredients together. Fold the resulting \
1722              mixture the correct number of times (a single gloth \
1723              spell should do the trick). Bake in a GUE \
1724              Automatic oven on the ~cake~ setting.^^\
1725              Guildmaster Sneffle claims that ~the dornberries are \
1726              the secret to making a cake even the King would be \
1727              impressed with.~ He also notes that ~improper folding \
1728              of the dough will produce very poor results.~",
1729    !weight 1,
1730    size 5,
1731 ;
1732       
1733 Object MON_Storeroom "Storeroom"
1734    with description "You are in a small cramped storeroom, stocked \
1735 with various crates and barrels of foodstuffs. \
1736 The refectory is west.",
1737         name "crate" "crates" "foodstuffs",
1738         w_to MON_Refectory,
1739         d_to secret_trapdoor,
1740         each_turn [;
1741            if ((random(20) == 1) && (secret_trapdoor notin MON_Storeroom))
1742               print "^A tiny mouse scurries into view, then disappears \
1743                     under a barrel.^";
1744         ],
1745         before [;
1746            Go:
1747               if (noun==d_obj)
1748                  if (secret_trapdoor hasnt general)
1749                     "You can't go that way.";
1750         ],
1751    has light;
1752    
1753 Object crate1 "large barrel" MON_Storeroom
1754    with name "barrel",
1755         description "A large wooden barrel labeled ~DRIED PRUNES~.",
1756         before [;
1757            Cast:
1758               if (the_spell_was==egdelp_spell)
1759                  "The barrel is covered with a light \
1760 waxy film.";
1761            Take, Remove:
1762               "The barrel is far too bulky to take.";
1763            Open:
1764               "You'd probably need a hacksaw to do that. Besides, \
1765               look what it says it contains.";
1766            Push, Pull:
1767               if (secret_trapdoor hasnt general) {
1768                  give secret_trapdoor general;
1769                  move secret_trapdoor to MON_Storeroom;
1770                  "Well whaddya know, a trapdoor...";                           
1771               }
1772         ],
1773    has supporter;   
1774    
1775 Object flour "sack of flour" crate1
1776    with name "flour" "sack",
1777         short_name "sack of flour",
1778         description "A small sack of flour, all-purpose.",
1779         !weight 15,
1780         size 14,
1781    has edible;
1782            
1783 Object MON_Caverns "Caverns"
1784    with description "You are in an low underground cavern, made of roughly \
1785 worked stone. An even lower tunnel travels east.",
1786         name "stone" "worked" "tunnel",
1787         u_to secret_trapdoor2,
1788         e_to cave_intersection,
1789 ;       
1790
1791 ! A two-way initially hidden trapdoor, which affects rooms.
1792 ! To my great chagrin, I couldn't code this in one obj (sigh).
1793 ! I admit it, this is my first Inform project.
1794 Object secret_trapdoor "trapdoor"
1795    with name "trapdoor" "trap" "door",
1796         description "A wooden trapdoor in the floor.",
1797         door_to MON_Caverns,
1798         door_dir d_to,
1799         describe [;
1800            if (self has open)
1801               "A trapdoor opens into darkness below.";
1802            "There is a closed trapdoor in the floor here.";
1803         ],
1804         before [;
1805            Enter: <<Go d_obj>>;
1806            Open:
1807                give MON_Caverns light;
1808                give secret_trapdoor2 open;
1809                rfalse;
1810            Close:
1811                give MON_Caverns ~light;
1812                give secret_trapdoor2 ~open;
1813                rfalse;
1814         ],
1815      has static door openable;
1816      
1817 Object secret_trapdoor2 "trapdoor" MON_Caverns
1818    with name "trapdoor" "trap" "door",
1819         description "A wooden trapdoor in the ceiling.",
1820         door_to MON_Storeroom,
1821         door_dir u_to,
1822         describe [;
1823            if (self has open)
1824               "Light gleams in from an open trapdoor above.";
1825            "You notice a closed trapdoor in the ceiling.";
1826         ],
1827         before [;
1828            Enter: <<Go u_obj>>;
1829            Open:
1830                give MON_Caverns light; 
1831                give secret_trapdoor open;
1832                rfalse;
1833            Close:
1834                give MON_Caverns ~light; 
1835                give secret_trapdoor ~open;
1836                rfalse;
1837         ],
1838      has static door openable;
1839      
1840 Object cave_intersection "Cave Intersection"
1841    with description [; 
1842            print "You are in a large open cavern. The rough \
1843            limestone here was probably eroded by underground springs \
1844            to form the somewhat circular chamber you now stand in. \
1845            Oddly, there seems to have been a recent cave-in, as \
1846            piles of rubble line the walls. A tunnel \
1847            snakes off to the west";
1848            if (self has general)
1849            ". To the southeast, there is a wide square hole!";
1850            else ".";
1851            ],
1852            name "limestone" "rubble" "tunnel",
1853   ! cant_go "There's too much rubble",           
1854    w_to MON_Caverns,
1855    se_to [;
1856            if (self hasnt general) rfalse;
1857            if (self has general) return Mystical_Cave;
1858    ],
1859    before [;
1860       Go:
1861          if ((noun == se_obj) && (self has general)) {
1862             if ((white_rod_piece in player) && 
1863             (black_rod_piece in player) &&
1864             (gray_rod_piece in player) &&
1865             (smoke_rod_piece in player)) {
1866             remove white_rod_piece;
1867             remove black_rod_piece;
1868             remove gray_rod_piece;
1869             remove smoke_rod_piece;
1870             Player_Lives_Left = 0;   ! hope you saved...
1871             spell_block = 1;  ! going into the endgame...
1872             print "^As you enter the tunnel, a strange \
1873 light surrounds you! The four rod pieces you were \
1874 carrying crumble into dust!^";                       
1875             }
1876             else
1877             "Well, the hole to the southeast seems obvious \
1878 enough. But, some mysterious force blocks the way! \
1879 Try as you might, you can't seem to enter it!";
1880          }
1881      ],            
1882 ;
1883            
1884 Object steel_wall "steel wall" cave_intersection
1885    with name "steel" "wall",
1886       description "A ten-by-ten slab of solid steel, this wall \
1887          must be at least a foot thick, and is accented by \
1888          large steel rivets that bolt it to the surrounding \
1889          rock.",
1890       initial "To the southeast, a huge steel wall demonstrates \
1891                a marked contrast to the otherwise drab surroundings.",
1892       before [;
1893          Open:  "I presume you have a blow-torch handy?";
1894          Push, Pull, Turn: "Not surprisingly, it doesn't move an inch.";
1895          LookUnder: "It's flush with the rock floor.";
1896          Cast: "The wall seems to absorb and nullify all magic!";
1897       ],         
1898    has static;
1899         
1900          
1901 ! ***********************************************************************
1902 ! ** 
1903 ! ** GRAY MOUNTAINS AREA NEARBY MONESTARY   
1904 ! **
1905 ! ***********************************************************************
1906    
1907 Object Cliff_face "Cliff Face"
1908    with description "You are standing near the top of a snowy mountain peak. \
1909 The wind is quite cold and is making your teeth chatter. \
1910 The general vicinity is mostly snow and rock; however, the \
1911 entrance into the Monastery is to the north, all but hidden from view \
1912 by the enormous slabs of snow-covered rock that make up the \
1913 cliff face. There is a rough but obvious trail leading down \
1914 the mountain to the south. There is also another trail that \
1915 winds even further up the mountain peak almost hidden in the \
1916 snow to the east.",
1917    name "peak" "wind" "rock" "structure" "slabs" "trail",
1918    n_to MON_Entrance_hall, in_to MON_Entrance_hall,
1919    s_to rocky_trail, d_to rocky_trail,
1920    e_to Covered_trail, u_to Covered_trail,
1921    has light;
1922    
1923 Object Covered_trail "Covered Trail"
1924    with description "You are climbing up a small trail that gets periodically \
1925 lost in great bluffs of snow. The swirling snow makes seeing \
1926 an unusual effort. The trail leads downwards to a cliff face \
1927 to the west, and rises towards the mountain top to the north.",
1928         name "bluffs" "trail",
1929    w_to Cliff_face, d_to Cliff_face,
1930    n_to Mountain_peak, u_to Mountain_peak,
1931    has light;
1932
1933 Object Mountain_peak "Mountain Peak"
1934    with description [;
1935         print "You are standing on the top of a peak of the Gray \
1936 Mountains. A cold wind blows snow everywhere, obscuring what \
1937 would otherwise surely be a wonderful view of the surrounding \
1938 countryside. You can just make out some buildings to the far \
1939 south in Frostham. A snowy bluff marks the way back down";   
1940         if (self hasnt general)
1941 ", or to the west, there appears to be a snowy outcropping. It seems to \
1942 hang precariously over the edge of the mountain, however.";
1943         else ".";
1944    ],
1945    name "wind" "peak" "mountains" "countryside" "buildings" "bluff",
1946    d_to Covered_trail,
1947    w_to [;
1948       if (self has general)
1949          "Looks like the outcropping completely collapsed!";
1950       return Snowy_outcropping;
1951    ],
1952    before [;
1953       Go:
1954         if ((noun==w_obj) && (self hasnt general) && (player notin sleeppallet)) {
1955 !          if (WeightOf(player) > 25) {
1956            if (children(player) > 0) {
1957               print "As you start to tread out to the outcropping, you feel \
1958                  the snow beneath your feet shifting under your sudden \
1959                  weight! You ";
1960               if (random(10) > 6) {
1961                  deadflag = 1;
1962                  "start to turn back, but the entire \
1963                  outcropping suddenly tilts under your weight, sending \
1964                  you hurtling off the edge into oblivion!";
1965               }
1966               else {
1967                  "beat a hasty retreat back to the peak.";
1968               }
1969            }                     
1970            print "You carefully make your way onto the outcropping.^";
1971         }
1972       Jump: 
1973          "Not advisable, it's probably a long way down...";
1974    ],   
1975    has light;
1976                   
1977 Object Snowy_outcropping "Snowy Outcropping"
1978    with description        
1979            "You are standing on a snow-covered outcropping. \
1980            You are almost waist-deep in snow, and the blisteringly cold \
1981            winds aren't helping. The outcropping juts out alarmingly \
1982            over the western edge of the mountain. In fact, you can see the \
1983            Monastery steeple below this ledge. \
1984            The main portion of the mountain peak lies to the east.",
1985    name "winds" "steeple" "peak",
1986    e_to Mountain_peak,
1987    each_turn [;
1988         if (random(5)<=3)
1989            "^There is an ominous creaking noise somewhere underfoot.";
1990         "^Some snow falls off the outermost edge of the outcropping.";
1991    ],
1992    before [;
1993         Go:
1994            if (noun==e_obj)
1995               print "You cautiously make your way back to the mountain top^";
1996            if (noun==d_obj)
1997               "That's not a very sound idea.";
1998         Jump:
1999            "Let's not be suicidal.";
2000         Yell: 
2001            Outcrop_break(1); rtrue;
2002         Sneeze: 
2003            Outcrop_break(2); rtrue;
2004         Drop:
2005            deadflag = 1;
2006            "You must have disturbed something! The entire outcropping \
2007            breaks away in an avalanche, and you plummet to your death!";
2008         Take, Touch, Push, Pull:
2009            if (noun==dirty_scroll) {
2010               if (random(10) > 5) {
2011               deadflag = 1;
2012               give Mountain_peak general;
2013               remove Snowy_Outcropping;
2014               move dirty_scroll to MON_Steeple_roof;  ! it's still obtainable...
2015               "As you reach for the scroll, the entire outcropping lurches \
2016               alarmingly! Without warning, it \
2017               breaks away in an avalanche, and you plummet to your death!";
2018               }
2019               "As you reach for the scroll, you hear a disturbing rumbling \ 
2020               from somewhere underfoot, and you step back hastily.";
2021            }
2022         Answer:
2023            if (inp2==player) {
2024               Outcrop_break(1); rtrue;
2025            }
2026            "To who/whom, exactly?";
2027    ],
2028    has light;               
2029  
2030 [ Outcrop_break type;
2031    if (type == 1) 
2032       print "You give the best bellow you can muster, given the current \
2033            weather conditions.";  
2034    if (type == 2)
2035       print "Understandable, given the weather conditions.";
2036    print  " Unfortunately, you seem to have disturbed \
2037            something, as the entire outcropping gives way in a brief but \
2038            powerful avalanche! You tumble through the air, followed by \
2039            a large quantity of snow! But suddenly, you see the \
2040            Monastery steeple rushing up to meet you!^^THUMP!^^\
2041            You lie dazed for a moment. Miraculously, the dirty scroll \
2042            lands next to you!^";
2043       give Mountain_peak general;
2044       move dirty_scroll to MON_Steeple_roof;
2045       remove Snowy_Outcropping;
2046       PlayerTo(MON_Steeple_roof);  
2047       rfalse;    
2048 ];
2049
2050 Object dirty_scroll "dirty scroll" Snowy_outcropping
2051  class scroll_class,
2052   with name "dirty",             
2053        initial [;
2054            if (location==Snowy_outcropping)
2055               "There is a dirty scroll here, practically buried in the snow!";
2056            "There is a dirty scroll here.";
2057        ],
2058 ;
2059
2060 Object swanko_spell "banish spirit" dirty_scroll
2061  class spell_class,
2062   with name "swanko",
2063        magic
2064        [;  
2065        if (second==0)
2066 "The chant, looking for a locus of spiritual energy, fails.";
2067           "The general vicinity seems pretty free of spirits now.";
2068        ],
2069 ;
2070
2071 Object rocky_trail "Rocky Mountain Trail"
2072    with description "You are on a rocky mountain trail \
2073            that winds up and down a mountain. Patches of \
2074            snow can be found here and there. The trail \
2075            continues down the mountain to the south, or \
2076            up to the north.",
2077         name "trail",
2078         d_to snowy_intersection,
2079         s_to snowy_intersection,
2080         u_to cliff_face,
2081         n_to cliff_face,
2082    has light;
2083
2084 Object snowy_intersection "Snowy Intersection"
2085    with description "You are at a snow-filled crossroads \
2086            in a mountain trail. Paths lead north towards \
2087            the top of the mountain, east, west, and south \
2088            towards the base of the mountain.",
2089         name "trail" "mountain",
2090         n_to rocky_trail,
2091         s_to North_of_river,
2092         e_to "The path east is blocked after a short distance by a huge snow drift.",
2093         w_to Top_of_drop,
2094    has light;
2095
2096 Object stone_marker "stone marker"
2097    with initial "There is a large stone marker here, in \
2098            the center of the intersection.",
2099         name "stone" "marker" "obelisk",
2100         description [;
2101            print "This odd stone structure, partially \
2102            covered in snow, looks quite old and mysterious. \
2103            It's about seven feet tall, and is shaped like \
2104            an obelisk";
2105            if (self hasnt general)
2106            ", with the top partially broken off.";
2107            else ".";
2108         ],
2109         found_in snowy_intersection snowy_intersection2,
2110    has static;
2111
2112 ! (second snowy intersection -- in the "past")   
2113 Object snowy_intersection2 "Snowy Intersection"
2114    with description "You are at a snow-filled crossroads \
2115            in a mountain trail. Paths lead north towards \
2116            the top of the mountain, east, west, and south \
2117            towards the base of the mountain.^^Something \
2118            seems familiar, yet different, about this place.",
2119         name "trail" "mountain",
2120 n_to "The path north ends after a short distance.",
2121 s_to "The path north ends after a short distance.",
2122 w_to "The path north ends after a short distance.",
2123 e_to "The path east is blocked after a short distance by a huge snow drift.",
2124    has light;
2125         
2126
2127 Object stone_marker_top "broken stone top"
2128    with name "top" "stone" "pinnacle" "broken",
2129         capacity 1,
2130         size 10,
2131         description "The top pinnacle from the stone marker. \
2132 You notice that it's partially hollow inside.",
2133         before [;
2134            Receive:
2135               if ((noun==silver_rod_piece) && 
2136                   (snowy_intersection has general)) {
2137                  move silver_rod_piece to self;
2138                  give snowy_intersection ~general;
2139                  remove self;
2140                  give snow general;
2141                  print "As you place the rod piece in the \
2142 broken stone piece, you sense a force from above pull you \
2143 skywards! In moments, you are high above the snow covered \
2144 mountains, nearing the sky, which you notice is strangely \
2145 purple!^";
2146                  PlayerTo(Mystical_Cave);
2147               !   spell_block = 0;
2148                  Mystical_Cave.number = Mystical_Cave.number + 1;
2149                  rtrue;
2150               }
2151         ],
2152    has container static open;                
2153
2154 Object Top_of_drop "Top of Snowy Slope"
2155    with description "You're at the top of a short downwards slope into \
2156            a snowy area below. A path leads east. You could also \
2157            slide down the slope. A lone tree stands here, overlooking \
2158            the slope.",
2159         name "slope",
2160         e_to snowy_intersection,
2161         d_to Bottom_of_drop,
2162         w_to Bottom_of_drop,
2163         u_to [;
2164           if (tree1 has general) <<Climb tree1>>;
2165         ],
2166    has light;
2167    
2168 Object tree1 "tree" Top_of_drop
2169    with name "tree",
2170         description "A leafless, bare tree, with what might be a bird's \
2171 nest in it.",
2172         before [;
2173            Climb:                         
2174               if (self hasnt general) give self general;
2175               print "You clamber up the tree.^";
2176               PlayerTo(Top_of_tree); rtrue;
2177         ],
2178    has scenery;
2179    
2180 Object nest1 "nest" Top_of_drop
2181    with name "nest",
2182         description "Even from down here, it's a pretty big nest. \
2183            Thankfully, no big birds seem to be present.",
2184         before [;
2185            Search: "You can't see into it from down here.";
2186            ThrownAt: 
2187                  move noun to Top_of_drop;
2188                  "You take aim, but miss.";
2189            Receive, LetGo, Rub, Turn, Take, Push, Pull, Touch, Attack, Shake: "You can't reach it.";
2190            Search, LookUnder: "From down here, it's hard to see anything \
2191 but the bottom of the nest.";
2192         ],
2193    has scenery;
2194    
2195 Object Bottom_of_drop "Bottom of Snowy Slope"
2196    with description "You've made your way down to a small snow-covered \
2197            clearing, ringed by pine trees. The only exit is back up the \
2198            slope.",
2199         name "clearing" "pine" "trees" "slope",
2200         u_to Top_of_drop,
2201         e_to Top_of_drop,
2202    has light;
2203    
2204 Object boulder "large boulder" Bottom_of_drop
2205    with name "boulder" "rock",
2206         initial "There's a large boulder here, sitting squat in the \
2207            middle of the clearing.",
2208         description "A big, snow-covered rock.",
2209         before [;
2210            Push, Pull, Turn: "It must weight a ton.";
2211            Receive: 
2212               if (noun==sleeppallet) {
2213                  move sleeppallet to boulder;
2214                  "You drape the pallet over the boulder.";
2215               }
2216         ],
2217    has static supporter;
2218    
2219 Object egg_shards "egg shards"
2220    with name "shards",
2221         initial "There's some broken eggshell shards here, scattered all \
2222                 over. Some gooey egg stuff too.",
2223         description "Some large pieces of shell is all.",
2224         !weight 5,
2225         size 5,
2226 ;    
2227               
2228 Object Top_of_tree "Top of tree"
2229    with description "You're on top of the tree, on some lower branches \
2230            that seem pretty stable.",
2231         d_to Top_of_drop,
2232    has light;
2233    
2234 Object tree2 "tree" Top_of_tree
2235    with name "tree",
2236         description "Overall, there's nothing terribly special about this tree.",
2237    has scenery;   
2238    
2239 Object nest2 "nest" Top_of_tree
2240    with name "nest",
2241         initial [;
2242            print "There's a large bird's nest a bit farther out on a \
2243            nearby branch";
2244            if (corbie_egg in self)
2245               print ". There appears to be an egg in it";
2246            ".";
2247         ],          
2248         description "Given the size and Brother Joseph's lessons \
2249            in ornithology, you'd guess that it's a corbie's nest. \
2250            It looks abandoned.",
2251         before [;
2252            ThrownAt:
2253               move noun to Top_of_drop;
2254               print "Your throw goes a little wide, and ";
2255               DefArt(noun); print " lands ";
2256               ! if (WeightOf(noun) > 10)
2257               !    "with a thump below.";
2258               ! else "below.";
2259               "below.";
2260            Take:  "It's way out on a thinner branch that probably \
2261                  won't support your weight.";
2262            Receive: "You can't quite reach it to put anything in it.";
2263            Push, Pull, Rub, Touch, Attack, Shake: "You can't reach it.";
2264            LookUnder: "It seems to be sitting on some branches.";
2265         ],           
2266         size 10,
2267    has static container open transparent;
2268    
2269 Object corbie_egg "corbie egg" nest2
2270    with name "egg",
2271         short_name "corbie egg",
2272         description "A large speckled corbie egg.",
2273         !weight 8,
2274         size 5,
2275         before [;
2276            Take, Rub, Push, Pull, Touch, Squeeze, Turn, Shake:
2277               if (parent(self) == nest2)
2278                  "You can't reach it."; 
2279            LookUnder:
2280               if (parent(self) == nest2)
2281                  "It seems to be in a nest.";
2282            ThrownAt:
2283               if (parent(self) == nest2) {
2284                  move egg_shards to Top_of_drop;         
2285                  move noun to Top_of_drop;
2286                  remove self;
2287                  "Good toss! A bit too strong though. With a dull \
2288                  crack, your throw breaks the egg, and pieces of \
2289                  shell and egg goop fall to the ground below.";
2290               }
2291            Attack:
2292               move egg_shards to parent(player);
2293               remove self;
2294               "The egg breaks easily, covering you with egg goop. \
2295 What a mess.";
2296         ],
2297 has edible scored;           
2298
2299 Object branch "branch" Top_of_tree
2300    with name "branch" "branches",
2301         description "Some leafless thin tree branches.",
2302         before [;
2303            Push, Pull, Turn, Shake:  
2304               if (corbie_egg in nest2) {
2305                  print "You give the branches a good shake. The egg pops \
2306                  free and tumbles to the ground below! You see the egg \
2307                  land in a soft patch of snow, and roll down the slope! \
2308                  Moments later, you hear a dull ";
2309                  if (sleeppallet in boulder) {
2310                     move corbie_egg to Bottom_of_drop;
2311                     "thump from below.";
2312                  }
2313                  else {
2314                     remove corbie_egg;
2315                     move egg_shards to Bottom_of_drop;
2316                     "crack from below.";
2317                  }
2318               }
2319               "You give the branches a good yank. A bit of snow falls.";
2320         ],
2321   has scenery;
2322
2323    
2324 ! Some scenery 'fluff'
2325 Object snow "snow"
2326    with name "snow",
2327         description "Cold, white and not in short supply.",
2328    found_in Mountain_peak Covered_trail Cliff_face Snowy_outcropping MON_garden
2329             snowy_intersection rocky_trail Top_of_drop Bottom_of_drop,
2330    before [;
2331       Take:  "It melts into nothing soon after.";
2332       Touch: "It's crisply cold.";
2333       Search:
2334          if ((self has general) && (location == snowy_intersection)) {
2335             give self ~general;
2336             Achieved(16);
2337             move stone_marker_top to snowy_intersection;
2338             "Remembering where the stone marker top fell, you brush \
2339 aside some snow. Sure enough, there it is!";
2340          }            
2341    ],            
2342    has scenery;
2343
2344
2345
2346 Object North_of_river "North of Frozen River"
2347    with description "You are standing just north of a frozen river \
2348 (probably a tributary of Lake Dinge). You can just see \
2349 the south bank from here, where the trail seems to \
2350 continue. There doesn't seem to be a bridge, however. \
2351 A trail also continues north.",
2352    name "river" "lake" "bank" "trail",
2353    s_to Frozen_river,
2354    n_to snowy_intersection,
2355   has light;
2356   
2357   
2358 Object Frozen_river "On Frozen River"
2359    with description "You are standing on a wide smooth river of ice. \
2360 The river 'runs' east to west, and there are banks to the \
2361 north and south.",
2362    name "bank" "banks",
2363    n_to North_of_river,
2364    s_to South_of_river,
2365    e_to "You slide eastwards, and lose your footing, going nowhere.",
2366    w_to "You slide westwards, and slip, going nowhere.",
2367    before [;
2368       Drop:
2369          if (noun==sand) {
2370             move sand to Frozen_river;
2371             Achieved(0);
2372             "You scatter the sand onto the ice.";
2373          }
2374       Go:
2375          if (noun==s_obj) {
2376             if (player notin sleeppallet) {
2377             if (sand notin Frozen_river)
2378                "You slide and flounder helplessly on the ice!";
2379             else
2380                print "You tread lightly on the sand covered portion of \
2381                    the ice, and scramble to the south bank.^";
2382             }
2383          }
2384       Jump:
2385          deadflag = 1;
2386          "You bravely jump, but without warning, the ice cracks in many \
2387          places, and you fall into the freezing river, becoming a human \
2388          popsicle in a short amount of time.";
2389    ],
2390    has light;
2391
2392 ! (special -- accessible only from Atrii -- put useful item here)
2393 Object Frozen_river2 "On Frozen River"
2394    with description "You are standing on a wide smooth river of ice. \
2395 The river 'runs' east to west. To the north and south \
2396 are huge snow bluffs that obscure most of the surrounding \
2397 countryside.", 
2398    e_to "You step eastwards but lose your footing, going nowhere.",
2399    w_to Frozen_river,
2400    before [;
2401       Go:
2402          if (noun==w_obj) 
2403             print "^As you step west, a slight downwards slope \
2404 in the ice sends you sliding uncontrollably.^";
2405       Jump:
2406          deadflag = 1;
2407          "You bravely jump, but without warning, the ice cracks in many \
2408          places, and you fall into the freezing river, becoming a human \
2409          popsicle in a short amount of time.";
2410    ],
2411    has light;
2412    
2413 ! (scrawled -- clue to using spheres)
2414 Object p7 "scrawled parchment" Frozen_river2
2415    class parchment_class,
2416    with name "scrawled",
2417 description "~Red beats smoke,^\
2418 Silver bests clouds,^\
2419 Green defeats depths,^\
2420 Brown stops earth.~";
2421
2422 Object river_ice "river ice"
2423    with name "ice" "river",
2424         description "The ice is thick and quite smooth.",
2425         found_in Frozen_river Frozen_river2,
2426         before [;
2427 ! just trap all receives as drops
2428            Receive:
2429              <<Drop noun>>;
2430         ],
2431    has scenery supporter;
2432    
2433 Object South_of_river "South of Frozen River"
2434    with description "You are standing just south of a frozen river. \
2435 You can just see the north bank from here, where the trail seems to \
2436 continue. The only way to get there is across the river. \
2437 A trail heads south into a valley.",
2438         name "river" "bank" "trail",
2439    n_to Frozen_river,
2440    s_to Valley_trail,
2441    has light;
2442
2443 Object Valley_trail "Valley Trail"
2444    with description "You are walking along a valley trail, just \
2445            below a portion of the Gray Mountain ranges. You can \
2446            see the beginnings of a city to the south, while the \
2447            trail winds further into the mountain ranges to the \
2448            north.",
2449         name "trail" "ranges" "mountain" "city",
2450    n_to South_of_river,
2451    s_to FROSTHAM_Outskirts,
2452    has light;
2453
2454 ! (An interesting object, with possible uses...)
2455 !Object bathroom_scale "bathroom scale" 
2456 !   with name "scale" "bathroom",
2457 !        description [;
2458 !           if (player in bathroom_scale)
2459 !              "This is an odd small flat white device, with a tiny \
2460 !               glass window at one end that you can see a numbered dial \
2461 !               through.  The dial currently reads -- wait, that \
2462 !               can't be right.  The thing must be broken.";
2463 !           print "This is an odd small flat white device, with a tiny \
2464 !               glass window at one end that you can see a numbered dial \
2465 !               through.  The dial currently reads: <", 
2466 !               (WeightOf(self) - 10), " Ughs>.^"; rtrue;
2467 !        ],
2468 !        weight 10,
2469 !   has supporter enterable;
2470
2471
2472 ! ***********************************************************************
2473 ! ** (at this point, for clarity and my sanity, I'm going to build 
2474 ! **  the remaining locations & objects in separate files, included
2475 ! **  here.  Hopefully, the files will be somewhat organized based on
2476 ! **  general location/town/situation, etc.
2477 ! ***********************************************************************
2478
2479 Include "frostham.inf";
2480 Include "aragain.inf";
2481 Include "anthar.inf";
2482 Include "fublio.inf";
2483 Include "borphee.inf";
2484 Include "miznia.inf";
2485 Include "gurth.inf";
2486 Include "subway.inf";
2487 Include "special.inf";
2488
2489 ! ***********************************************************************
2490 ! **
2491 ! ** HADES, in a newer format
2492 ! **
2493 ! ***********************************************************************
2494
2495 Class Hades_Room_Class
2496    with description "You are floating in an empty space. Surrounding you \
2497            on all sides is a great wall of flame. It would almost seem \
2498            like you are trapped inside a ball of fire.",
2499         name "fire" "ball" "space" "flame",
2500         before [;
2501            if ((action~=##Go) && (action~=##Look) && (action~=##Wait))
2502               "You currently lack the means to do that.";  ! can't do much in Hades...
2503            Go:
2504               give self ~visited; ! cheat, easier than routines for each dir...
2505               print "^You find yourself floating through the flaming wall! \
2506                     As you pass through you feel a gut-wrenching sensation. \
2507                     Well, perhaps you would if you currently had a gut, or \
2508                     sensations for that matter. Let's just say you feel \
2509                     something akin to a gut-wrenching sensation, and leave \
2510                     it at that.^";
2511         ],
2512      has light;
2513   
2514 Object Hades_1 "Hades"
2515    class Hades_Room_Class
2516    with u_to  Hades_1,
2517         d_to  Hades_1,
2518         n_to  Hades_1,
2519         s_to  Hades_1,
2520         e_to  Hades_1,
2521         w_to  Hades_1,
2522         in_to  Hades_1,
2523         out_to  Hades_1,
2524         ne_to  Hades_2,
2525         nw_to  Hades_1,
2526         se_to  Hades_1,
2527         sw_to  Hades_1,
2528         each_turn [;
2529            if (random(10) == 1)
2530               "^A wisp of smoke appears to the northeast, then fades.";
2531         ],
2532 ;
2533                    
2534 Object Hades_2 "Hades"
2535    class Hades_Room_Class
2536    with u_to  Hades_1,
2537         d_to  Hades_1,
2538         n_to  Hades_2,
2539         s_to  Hades_3,
2540         e_to  Hades_1,
2541         w_to  Hades_2,
2542         in_to  Hades_1,
2543         out_to  Hades_1,
2544         ne_to  Hades_2,
2545         nw_to  Hades_1,
2546         se_to  Hades_2,
2547         sw_to  Hades_2,
2548         each_turn [;
2549            if (random(10) == 1)
2550               "^A wisp of smoke appears to the south, then fades.";
2551         ],
2552 ;
2553      
2554 Object Hades_3 "Hades"
2555    class Hades_Room_Class
2556    with u_to  Hades_4,
2557         d_to  Hades_3,
2558         n_to  Hades_2,
2559         s_to  Hades_1,
2560         e_to  Hades_1,
2561         w_to  Hades_2,
2562         in_to  Hades_3,
2563         out_to  Hades_1,
2564         ne_to  Hades_2,
2565         nw_to  Hades_1,
2566         se_to  Hades_3,
2567         sw_to  Hades_3,
2568         each_turn [;
2569            if (random(10) == 1)
2570               "^A wisp of smoke appears above, then fades.";
2571         ],
2572 ;
2573      
2574 Object Hades_4 "Hades"
2575    class Hades_Room_Class
2576    with u_to  Hades_3,
2577         d_to  Hades_3,
2578         n_to  Hades_5,
2579         s_to  Hades_2,
2580         e_to  Hades_1,
2581         w_to  Hades_4,
2582         in_to  Hades_4,
2583         out_to  Hades_1,
2584         ne_to  Hades_1,
2585         nw_to  Hades_3,
2586         se_to  Hades_3,
2587         sw_to  Hades_1,
2588         each_turn [;
2589            if (random(10) == 1)
2590               "^A wisp of smoke appears to the north, then fades.";
2591         ],
2592 ;
2593      
2594 Object Hades_5 "Hades"
2595    with description "You are floating in an empty space. Surrounding you \
2596            on all sides is a great wall of flame. It would almost seem \
2597            like you are trapped inside a ball of fire.",
2598         name "fire" "space",
2599         u_to  Hades_1,
2600         d_to  Hades_3,
2601         n_to  Hades_2,
2602         s_to  Hades_4,
2603         e_to  Hades_4,
2604         w_to  Hades_5,
2605 !        in_to  Hades_1,
2606         out_to  Hades_1,
2607         ne_to  Hades_1,
2608         nw_to  Hades_3,
2609         se_to  Hades_3,
2610         sw_to  Hades_2,
2611         before [;
2612            if ((action~=##Go) && (action~=##Look) && 
2613                (action~=##Wait) && (action~=##Enter) &&
2614                (action~=##Take) && (action~=##Examine))
2615               "You currently lack the means to do that.";
2616            Go:
2617               if (noun==in_obj) {
2618                  Revive_Player1();
2619                  rtrue;
2620               }
2621               give self ~visited;
2622               print "^You find yourself floating through the flaming wall! \
2623                     As you pass through you feel a gut-wrenching sensation. \
2624                     Well, perhaps you would if you currently had a gut, or \
2625                     sensations for that matter. Let's just say you feel \
2626                     something akin to a gut-wrenching sensation, and leave \
2627                     it at that.^";
2628         ],
2629      has light;           
2630      
2631 Object Hades_flameball "Ball of flame" Hades_5
2632    with name "ball" "sphere" "flame",
2633         initial [;
2634            print "In the center of the room is a ";
2635            if (Player_Lives_Left >= 3)
2636               "large flaming sphere.";
2637            if (Player_Lives_Left == 2)
2638               "medium-sized flaming sphere.";
2639            "small flaming sphere.";
2640         ],
2641         description "It's rather hypnotic -- a perfect sphere made entirely of orange-red fire.",
2642         before [;
2643            Enter: 
2644               Revive_Player1();
2645               rtrue;
2646         ],                
2647    has enterable static open;
2648    
2649 [ Revive_Player1 ;
2650      print "You find yourself drawn into flaming sphere. The \
2651             ball of flame engulfs you completely, and you feel \
2652             nothing as inky blackness surrounds you.^^\
2653             ~You have revived him!~ you hear a voice say.^^\
2654             You open your eyes. You are lying on a long wooden \
2655             table in the Monastery Steeple room. Several members \
2656             of the Order are gathered around you, and Brother \
2657             Joseph helps you to your feet.^^\
2658             ~We were able to bring you back to the world of the \
2659             living,~ Joseph says, ~but I fear our powers are waning, \
2660             and we may not succeed if we try again. Your quest \
2661             continues!~^^\
2662             The group files out, leaving you alone in the room.^";
2663      in_hades = 0;
2664      Player_Lives_Left--;
2665      Player_HP_CUR = Player_HP_MAX;  ! Healed up
2666      give steeple_window ~open;  ! one of the acolytes was too cold...
2667      PlayerTo(MON_Steeple_room);
2668 ];
2669
2670     
2671 ! ***********************************************************************
2672 ! **
2673 ! ** INITIALIZE AND OTHER STARTUP, place player, place objs, etc
2674 ! **
2675 ! ***********************************************************************
2676
2677 [ Initialise;
2678   
2679   thedark.description =
2680      "It is pitch black. You are likely to be eaten by a grue.";
2681      
2682   prayer_book.magic = all_my_spells;
2683   <Learn prayer_book gnusto_spell>;
2684   <Learn prayer_book frotz_spell>;
2685   move prayer_book to player;
2686   location=MON_Chapel1;
2687
2688 !  (FOR TESTING ONLY)
2689 !move amulet to player;
2690 !<Learn prayer_book huncho_spell>;
2691 !<Learn prayer_book feeyuk_spell>;
2692 !<Learn prayer_book ledak_spell>;
2693 !<Learn prayer_book egdelp_spell>;
2694 !<Learn prayer_book tossio_spell>;
2695 !move TEMPLE_Artifact to player;
2696 !move umbrella to player;
2697 !move sack to player;
2698 !move c1 to player;
2699 !move magic_door to player;
2700 !location = ANTHAR_GUSStation;
2701 !location=Skyscraper;
2702 !spell_block = 1;
2703 !<Learn prayer_book bekdab_spell>;
2704 !<Learn prayer_book egdelp_spell>;
2705 !<Learn prayer_book tossio_spell>;
2706 !move decaf_coffee_can to player;
2707 !location=ATRII_1;
2708 ];
2709
2710
2711 ! ***********************************************************************
2712 ! **
2713 ! ** Some special routines, which should be after Initialise
2714 ! **
2715 ! ***********************************************************************
2716
2717 ! The Afterlife -- or, a fine time in Hades
2718 [ AfterLife i;
2719    if (Player_Lives_Left <= 0) {
2720       print "^^A blackness surrounds you, replaced by more blackness...^^";
2721       rfalse;
2722    }
2723    else {
2724       deadflag = 0;  ! not dead yet
2725       ! move inventory to place of death
2726       i=parent(player);
2727       while (child(player)~=0) {
2728          give child(player) ~worn;
2729          move child(player) to i;
2730       }
2731       spell_block = 0;
2732       in_atrii = 0;
2733       in_hades = 1;   
2734       print "^^A blackness surrounds you, only to be replaced by...^^";
2735       i = random(4);
2736       if (i==2) { PlayerTo(Hades_2); rtrue; }
2737       if (i==3) { PlayerTo(Hades_3); rtrue; }
2738       else { PlayerTo(Hades_1); rtrue; }
2739    }
2740 ];   
2741
2742
2743 [ DarkToDark i;
2744      i = random(10);
2745      if (i < 4) {
2746         print "^Hmm, perhaps the Grues really are migrating with the \
2747                Great Change.^";
2748         rtrue;
2749      }
2750      if (i >= 4) {
2751         deadflag = 1;
2752         "^Well, don't say I didn't warn you. Something horrible \
2753 with slavering fangs lurks up and devours you!";
2754         rtrue;
2755      }
2756 ];
2757                     
2758
2759 ! [ WeightOf obj t i;
2760 !       t = obj.weight;
2761 !       objectloop (i in obj)  t=t+WeightOf(i);
2762 !       return t;
2763 ! ];              
2764 ! Now, rules for capacity still hold (slightly unrealistic), but we
2765 ! can now check WeightOf(player) in those situations that need it.
2766
2767 [ PrintRank;
2768    print ", earning you the rank of ";
2769    if (score < 0) "Wanna-be Altar-boy";
2770 !   if (score >= 500) "Truly Enlightened One";
2771 !   if (score >= 495) "Benevolent One";
2772 !   if (score >= 490) "Faithful One";
2773 !   if (score >= 395) "Simple Man";
2774 ! fill fill
2775    if (score >= 250) "Enlightened One";
2776    if (score >= 225) "Patriarch";
2777    if (score >= 200) "Cardinal";
2778    if (score >= 150) "Lama";
2779    if (score >= 125) "Cleric";
2780    if (score >= 100) "High Priest";
2781    if (score >= 90) "Priest";
2782    if (score >= 75) "Monk";
2783    if (score >= 50) "Brother";
2784    if (score >= 30) "Acolyte";
2785    if (score >= 20) "Aspirant";
2786    if (score >= 10) "Devoted";
2787    if (score >= 5) "Believer";
2788    "Non-believer";
2789 ];
2790
2791 [ PrintTaskName ach;
2792     switch (ach) {
2793     0: "using sand to get across the river";
2794     1: "triplicating the cereal box";
2795     2: "setting the alarm clock";
2796     3: "getting the waxy scroll from the skier";
2797     4: "giving the palace guard a good cake";
2798     5: "solving Barsap's Gambit";
2799     6: "fixing the sailboat";
2800     7: "finding the rod in the shipwreck";
2801     8: "triplicating the ale";
2802     9: "finding the rod under the statue";
2803     10: "pruning the Christmas Tree Monster";
2804     11: "getting past the burly sports fan";
2805     12: "winning the three Golem bouts";
2806     13: "ending the kobold war";
2807     14: "unlocking Duncanthrax's Trophy chamber";
2808     15: "unlocking the Lab door";
2809     16: "finding the rod in the top of the marker";
2810     17: "finding the rod in the house foundation";
2811     18: "removing the impenetrable steel wall";
2812     19: "joining the True Rod";
2813     20: "getting past the broken subway gate";
2814     21: "finding the hidden path to the temple";
2815     22: "getting the rod through the temple";
2816 !    23: "finding the scroll in Frobar's painting";
2817     23: "getting the scroll from the boutique";
2818     24: "getting the scroll from Frobar";
2819     25: "getting into the subway tunnel";
2820     26: "banishing the four evil elementals";
2821 ! add, if desired
2822     } 
2823 ];
2824
2825 ! *** NEW ACTION ROUTINES
2826
2827 [ PraySub i;
2828      if ((in_hades == 1) || (in_atrii == 1) || (spell_block==1))
2829         "You make a prayer and feel no spiritual response! \
2830         Have the Deities forsaken you? Or have you found a \
2831         place where even the Gods cannot provide guidance?";
2832      else {
2833         i = random(100);
2834         if (Player_HP_MAX ~= (20 + score)) 
2835            Player_HP_MAX = (20 + score);
2836         ! consider increasing memory/spell capacity here
2837         if (i==97) {
2838            Player_HP_CUR = Player_HP_MAX;  ! Healed
2839            "You make a quick but respectful prayer to the \
2840            Deities above, asking for Divine Guidance in your \
2841            quest. A saffron glow surrounds you and you feel \
2842            spiritually and physically renewed!";
2843         }
2844         "You make a quick but respectful prayer to the \
2845         Deities above, asking for Divine Guidance in your \
2846         quest. You finish and feel spiritually renewed.";
2847      } 
2848 ];
2849
2850 [ DiagnoseSub i;
2851      if (Player_HP_CUR > Player_HP_MAX) ! (This should never happen)
2852         "You feel superhuman!";
2853      if (Player_HP_CUR == Player_HP_MAX)
2854         "You are in good health.";
2855      if (Player_HP_CUR == 1)
2856         "You are near death's door.";    
2857      if (Player_HP_CUR < 5)
2858         "You feel extremely weak.";
2859      if (Player_HP_CUR < 10)
2860         "You feel weak.";
2861      i = (Player_HP_MAX / Player_HP_CUR);
2862      if (i >= 4)
2863         "You feel slightly weak";
2864      if (i >= 2) 
2865         "You've been better, but you'll be okay.";
2866      "You feel okay.";   
2867 ];
2868
2869 [ StrongSub i;
2870      i = random(20);
2871      if (i > 15) {
2872         deadflag = 1;
2873         "Such language from a priest such as yourself! \
2874          The ground rumbles, and a bolt of blue wrath from the \
2875          Deities strikes you dead!";
2876      }
2877      "Such language from a priest such as yourself! \
2878          The ground rumbles suddenly!";
2879 ];
2880
2881 ! [ LiftSub ;
2882 !    if (noun has static)
2883 !       "That's fixed in place.";
2884 !    if (noun has scenery)
2885 !       "You're unable to.";
2886 !    if (noun has animate)
2887 !       "That would be less than courteous.";
2888 !    print "You lift "; DefArt(noun); " and put it back in \
2889 !          it's original position.  Nothing obvious happens.";
2890 ! ];
2891
2892 [ ShakeSub ;
2893    if (noun has animate)
2894       "Get a hold of yourself. No need to go around shaking living \
2895 things like that.";
2896    "Nothing happens.";
2897 ];
2898
2899 ! (new insert routine, which is the same as old, except that
2900 ! we also check relative sizes of objects) 
2901 [ InsertSub;
2902   receive_action = ##Insert;
2903   if (second==d_obj ) <<Drop noun>>;
2904   if (parent(noun)~=player) return L__M(##Insert,1);
2905
2906   if (second>1)
2907   {   action=##Receive;
2908       if (RunRoutines(second,before)~=0) { action=##Insert; rtrue; }
2909       action=##Insert;
2910   }
2911   if (second hasnt container) return L__M(##Insert,2);
2912   if (second hasnt open)      return L__M(##Insert,3);
2913   if (IndirectlyContains(noun,second)==1) return L__M(##Insert,5);
2914   if (noun has worn)
2915   {   L__M(##Insert,6);
2916       <Disrobe noun>; if (noun has worn) rtrue;
2917   }
2918
2919   if (children(second)>=ValueOrRun(second,capacity))
2920       return L__M(##Insert,7,second);
2921
2922   if (noun.size > second.size) {
2923      CDefArt(noun); print " appears to be too large to put in ";
2924      DefArt(second); ".";
2925   }
2926   move noun to second;
2927
2928   if (AfterRoutines()==1) rtrue;
2929
2930   if (second>1)
2931   {   action=##Receive;
2932       if (RunRoutines(second,after)~=0) { action=##Insert; rtrue; }
2933       action=##Insert;
2934   }
2935   if (keep_silent==1) rtrue;
2936   if (multiflag==1) return L__M(##Insert,8);
2937   L__M(##Insert,9,noun);
2938 ];    
2939
2940 [ FoldSub ;
2941    "I fail to see what you're trying to accomplish by doing this.";
2942 ];
2943
2944 [ MixSub;
2945    "I fail to see what you're trying to accomplish by doing this.";
2946 ];
2947
2948 ![ SpecialDialSub;
2949 !   if (noun hasnt numberdial)
2950 !      "You can't seem to do that.";
2951 !   if ((second > 9) || (second < 0))
2952 !      print "It appears that the valid range for ",noun; " is 0 to 9";
2953 !   noun.number = second;
2954 !   if (noun.number > 9) noun.number = 0;  
2955 ! a special restriction in this case
2956 !   print "You set ",noun," to ",second; ".";
2957 !]; 
2958    
2959 [ JoinSub;
2960    "This doesn't seem terribly productive.";
2961 ];
2962
2963 [ MeditateSub;
2964    "You close your eyes and focus your mind inwards. \
2965 Mere moments of time seem to pass like eons. You \
2966 open your eyes.";
2967 ];
2968
2969 [ YellSub;
2970           "ARRGH!";
2971 ];        
2972 [ SneezeSub;
2973      "You make a rather sickly noise.";
2974 ];
2975 [ YawnSub;
2976      if (Frobar in location)
2977         "~Stop that!~ Frobar says, ~It's contagious.~";
2978      else "Tired?";
2979 ];
2980 [ XyzzySub;
2981      "A hollow voice says, ~Cool!~";
2982 ];
2983 [ BegSub;
2984      "Please, no begging.";
2985 ];
2986 [ LaughSub;
2987      "Was it that funny?";
2988 ]; 
2989
2990 [ HelpSub;
2991    "Hello Player!^^\
2992 SPIRITWRAK, An Interactive Fantasy Adventure^\
2993 If you're new to interactive fiction games, I lack the \
2994 space here to give an adequate description, but in short, \
2995 you're a character in a story, able to interact with \
2996 objects, places and other things (using regular english \
2997 sentences) in order to reach your goal, which is to \
2998 figure out how to ~solve~ the story. For a real \
2999 description, you might want to check out documents \
3000 located at ftp.gmd.de.^^\
3001 For those more experienced players, if you're looking \
3002 for on-line clues, etc., sadly, you won't find them \
3003 (the Z5 code is getting rather obscenely large as I \
3004 write this). A short verb list is contained in the \
3005 README file that you should have received with this \
3006 game (or should be able to find at the same place you \
3007 found this game). Beyond that, if you're truly \
3008 desperate, you can post a note on the rec.arts.int-fiction \
3009 usenet newsgroup, or send me email.^^\
3010 Thanks for playing! ^^\
3011 -- D. S. Yu [dsyu@@64holonet.net]";
3012 ];
3013
3014 Include "grammar"; ! (Include grammar _after_ action defs, if we replace any)
3015
3016 ! **** Extensions
3017 !Extend "turn" first  
3018 !  * noun "to" number   -> SpecialDial;
3019 Extend "examine" first
3020                 * scope=ReadableSpell            -> Examine;
3021
3022
3023
3024 ! **** Action defs
3025
3026 Verb "diagnose" "health" "status"
3027    *     ->    Diagnose;
3028     
3029 Verb "spells" "memory" "chants"
3030                 *                                -> Spells;
3031 Verb "learn" "memorise" "memorize" "prepare"
3032                 * scope=ReadableSpell            -> Learn;
3033 Verb "c,cast"
3034                 *                                -> CastOne
3035                 * noun                           -> CastOne;
3036 Verb "cast" "chant"
3037                 * is_spell                       -> Cast
3038                 * is_spell "at" noun             -> Cast
3039                 * is_spell "on" noun             -> Cast;
3040 Verb "yell" "scream" "bellow"
3041    *            -> Yell;
3042 Verb "sneeze" "cough"
3043         *       -> Sneeze;
3044 Verb "yawn"
3045         *       -> Yawn;
3046 Verb "laugh" "chuckle"
3047    *            -> Laugh;
3048 Verb "play"
3049    * held       -> Blow;
3050 Verb "clip" "trim"
3051    * noun       -> Cut;
3052 ! Verb "lift" "raise"
3053 !    * noun       -> Lift;   
3054 Verb "shake" "yank"
3055    * noun       -> Shake;
3056 Verb "fold"
3057    * noun       -> Fold;
3058 Verb "mix" "stir"
3059    * noun       -> Mix;
3060 Verb "join" "connect"
3061    * noun "to" noun -> Join
3062    * noun "with" noun -> Join;
3063 Verb meta "help" "hint"
3064    *            -> Help;      
3065
3066 ! ** (nonsense verbs below, can be removed without affecting game)   
3067 Verb "xyzzy" "plugh" "treasure" "plover" "yoho"
3068         *       -> Xyzzy;
3069 Verb "beg"
3070         *       -> Beg;
3071 Verb "meditate"
3072         *       -> Meditate;
3073       
3074 end;
3075 ! fin.
3076