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