6908e195f4d9ccb0d878e49e7815419537c30751
[beyond-the-titanic.git] / src / BEYOND.PAS
1 {$mode objfpc}
2
3 {//-------------------------------------------------------------------------}
4 {/*                                                                         }
5 {Copyright (C) 2014 Jason Self <j@jxself.org>                               }
6 {                                                                           }
7 {This file is free software: you may copy, redistribute and/or modify it    }
8 {under the terms of the GNU Affero General Public License as published by   }
9 {the Free Software Foundation, either version 3 of the License, or (at your }
10 {option) any later version.                                                 }
11 {                                                                           }
12 {This file is distributed in the hope that it will be useful, but WITHOUT   }
13 {ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      }
14 {FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License}
15 {for more details.                                                          }
16 {                                                                           }
17 {You should have received a copy of the GNU Affero General Public License   }
18 {along with this program; if not, see https://gnu.org/licenses or write to: }
19 {  Free Software Foundation, Inc.                                           }
20 {  51 Franklin Street, Fifth Floor                                          }
21 {  Boston, MA 02110-1301                                                    }
22 {  USA                                                                      }
23 {                                                                           }
24 {This file incorporates work covered by the following copyright and         }
25 {permission notice:                                                         }
26 {                                                                           }
27 {Copyright (C) 1990, 2009 - Apogee Software, Ltd.                           }
28 {                                                                           }
29 {This file is part of Beyond The Titanic. Beyond The Titanic is free        }
30 {software; you can redistribute it and/or modify it under the terms of the  }
31 {GNU General Public License as published by the Free Software Foundation;   }
32 {either version 3 of the License, or (at your option) any later version.    }
33 {                                                                           }
34 {This program is distributed in the hope that it will be useful, but WITHOUT}
35 {ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      }
36 {FITNESS FOR A PARTICULAR PURPOSE.                                          }
37 {                                                                           }
38 {See the GNU General Public License for more details.                       }
39 {                                                                           }
40 {You should have received a copy of the GNU General Public License          }
41 {along with this program; if not, write to:                                 }
42 {  Free Software Foundation, Inc.                                           }
43 {  51 Franklin Street, Fifth Floor                                          }
44 {  Boston, MA 02110-1301                                                    }
45 {  USA                                                                      }
46 {                                                                           }
47 {Original Source: 1990 Scott Miller                                         }
48 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }
49 {*/                                                                         }
50 {//-------------------------------------------------------------------------}
51 {****************************************************************************}
52 {*                          BEYOND THE TITANIC                              *}
53 {*    Written by Scott Miller with Turbo Pascal V.2.  Began May 12, '84.    *}
54 {*                           Shareware Version                              *}
55 {*                             Copyright 1987                               *}
56 {$C-,K-,V-,R-****************************************************************}
57
58 { Last modified: July 23, 1987 }
59
60 uses crt,sysutils;
61 const
62      Q        = '#';
63      VMax     = 65;
64      NMax     = 89;
65      RMax     = 76;
66      Null     = -1;
67
68 type
69      ComSet         = set of 0..VMax;
70      CharSet        = set of Char;
71      PlayersObjects = set of 0..NMax;
72      Str14          = string[14];
73      Str80          = string[80];
74      Str240         = string[240];
75      SaveGame       = record
76        aInven,
77        aKitSet,
78        aCabiSet  :PlayersObjects;
79        aPanelCon,
80        aSlotCon,
81        aCompCon,
82        aRopeCon,
83        aTic,
84        aYearDial,
85        aPrm,
86        aMnRm,
87        aSc,
88        aShots,
89        aShRm,
90        aRx       :integer;
91        aEv       :CharSet;
92        aCode,
93        aLoc      :Str14;
94        aKeyHole  :boolean;
95       end;
96
97 var
98      WordList       : file of Str14;
99      Things         : file of integer;
100      Objects        : file of PlayersObjects;
101      GameSave       : file of SaveGame;
102      DiskSave       : SaveGame;
103      Input,
104      Again,
105      Line           : Str80;
106      V{erb}         : array [0..VMax,1..5] of Str14;
107      N{oun}         : array [0..NMax,1..5] of Str14;
108      R{oom}         : array [0..NMax] of integer;
109      P{lace}        : array [0..RMax] of PlayersObjects;
110      RmSh           : set of 0..14;
111      OneWordCommands: Comset;
112      Mov{able},
113      Inven{tory},
114      KitSet,
115      CabiSet        : PlayersObjects;
116      Word,
117      LastNoun,
118      Drive,
119      Code,
120      Loc{ation},
121      SepWord        : Str14;
122      Rooms1, Rooms2,
123      Special1, Special2 : file of Str240;
124      Text1, Text2   : Str240;
125      Line1          : file of Str80;
126      Verb,
127      Noun, Noun2,
128      PanelCon,
129      RopeCon,
130      CompCon,
131      SlotCon,
132      RopeOld,
133      Tic,
134      YearDial,
135      DayDial,
136      Prm,  {Player Room}
137      MnRm, {Monster Room}
138      Sc{ore},
139      Shots,
140      DialNum,
141      Stuff,
142      ShRm, {Shuttle Room}
143      m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,
144      Rx, {deserted road}
145      Ox, {ocean bottom}
146      x, y, o        : integer;
147      Flag,
148      FlagSA         : char;
149      Ev{ent}        : CharSet;
150      Attack,
151      Skip,
152      Back,
153      KeyHole,
154      Verbose        : boolean;
155
156
157
158 {$I AdParser.PAS}{  <--- Loads in sentence logic.    <*********************}
159
160
161 {$I Commands.PAS}{  <--- Loads in misc. procedures.  <*********************}
162
163
164 {$I WordList.PAS }{  <----- CALLS UP THE VERBS & NOUNS <*******************}
165
166
167 {$I Objects.PAS }{   <----- CALLS UP THE VERBS & NOUNS <*******************}
168
169
170 {===================}
171 procedure DefaultAnswers1;
172 var o : integer;
173 begin
174
175 CASE VERB OF
176
177 22        :begin if(Prm in[59..68])then
178                   begin RmSh:=RmSh-[ShRm];RS(84)end;
179             if flasoff and (Prm in [6..24])then RL(54) else
180              if Verbose then DescribeRm
181               else begin Verbose:=true;DescribeRm;Verbose:=false;end;
182             if(23 in p[Prm])and(MnRm=Prm)then RL(357);
183             if Back then begin Attack:=False; Back:=False;end
184            end;
185
186 18        :if inven=[] then RL(116)
187              else
188                begin
189                  writeln('You have in your possession...');
190                    for o:= 0 to NMax do
191                     begin
192                      if(o in inven)then
193                       if(o=74)then
194                        writeln('an ',n[o,1])else writeln('a ',n[o,1]);
195                      if(ropecon in inven)and(o=ropecon)then
196                       writeln('  The rope is tied to the ',n[o,1],'.');
197                      if(o=74)and(en('p'))then RL(174);
198                      if(o=89)and(en('i'))then RL(321);
199                     end;
200                end;
201
202 11     :case noun of
203        60:Diagnose;
204        2:if(en('b'))then RL(198) else RL(199);
205        29:begin RL(89);if(en('a'))then RL(200) else RL(201);end;
206        57:if(ropecon<>Null)then
207             writeln('The rope is tied to the ',n[ropecon,1],'.')
208           else RL(133);
209        65:if(Prm in[59..68])then RS(84)else Line:='l';
210        8:RL(202);
211        7:RL(163);
212        70:RL(164);
213        52:RL(165);
214        74:RL(166);
215        23:RS(70);
216        32:RL(253);
217        13:RL(167);
218        22:RL(226);
219        1:if(Prm=42)and(13 in p[42])then RL(167);
220        21:RL(227);
221        9:if(Prm=49)then RL(228)else if(Prm>62)then RS(68)else RL(229);
222        69:RL(355);
223        77:RL(403);
224        37:RL(295);
225        27:RL(394);
226        89:RL(338);
227        18:if(Prm in[63..70])then RS(68)else RL(348);
228        46,66:If(Prm in[58,59,63,69])then begin
229        TextColor(12);RS(83);TextColor(m2)end;
230        87:RL(230);
231        84:RL(231);
232        34:begin RL(189);
233            if(Shots>0)then writeln('is about ',Shots*10,' percent full.')
234            else Writeln('is empty.')end;
235        15:if(84 in p[Prm])then RL(180)else If(71 in p[Prm])then RL(182)
236           else RL(181);
237     56,44:if(en('r'))then RL(51) else RL(52)
238        else if not(noun in[1,12,14,15,17,18,19,22,31,36,50,
239              54,67,69,73,79,80,84,87,88])and(random(3)=1)then
240             case random(3) of
241              0  :RL(407);
242              1  :writeln('Yea, it''s definitely a ',n[noun,1],'!');
243              2  :writeln('It looks like any other ',n[noun,1],'.');
244             end
245             else writeln('You see nothing special about the ',n[noun,1],'.')
246        end;
247
248 41         :begin writeln('Time passes');y:=wherey;for o:=1 to 6 do
249               begin gotoxy(11+o,y-1);writeln('.');sound(o*99);delay(30)end;
250               if(Prm in[59..68])then sound(20)else nosound end;
251
252 43..52     :if(Prm in[6..24])and(FlasOff)then RL(14)else
253              if(Prm=69)then RL(358)else RL(144);
254
255 57,58      :begin Attack:=False;
256              if(Prm in[6..24])and(FlasOff)then RL(14)else RL(190);end;
257
258   end {of case}
259 end;  {of DefaultAnswers1}
260 {-------------------}
261 procedure DefaultAnswers2;
262 var o : integer;
263 begin
264
265 CASE VERB OF
266
267 29    :if(noun in Mov)then
268         if(noun in inven)then
269          begin FlagSA:='r';
270           case Noun2 of
271         39:if(en('o'))then begin RL(186);Vanish(noun);
272             kitset:=kitset+[noun];r[noun]:=Prm;end
273            else RL(185);
274         68:if(Prm=34)then
275             if(SlotCon=Null)then begin RL(186);Vanish(noun);
276              SlotCon:=Noun;r[noun]:=Prm;end
277             else Say(68,'being used')
278            else
279             if(noun=63)and(Prm=58)then
280              begin RL(337);KeyHole:=True;r[63]:=Prm;inven:=inven-[63];end
281             else RL(327);
282         88:begin RL(293);vanish(noun);r[noun]:=random(4)+51;end;
283         47,53,73:if(Prm in[0..6,9,10,13,41..43])then
284            begin RL(307);vanish(noun);end;
285         11:if(en('k'))then begin RL(186);Vanish(noun);
286             CabiSet:=CabiSet+[noun];r[noun]:=Prm;end
287            else RL(187);
288         26:if(Prm=76)and(noun=57)then begin RL(409);Vanish(57)end;
289         49:if(PanelCon=Null)and(noun in[2,7,8,13,27,32,51,52,63,77])then
290             begin RL(186);Vanish(noun);PanelCon:=Noun;r[noun]:=Prm;end
291            else RL(188);
292         30:if(noun=70)then
293             if not(en('d'))then
294              begin Ev:=Ev+['d'];RL(69);Vanish(70);r[70]:=Prm;end
295             else Say(70,'in the dirt')
296            else Crazy
297           end;{of case}
298
299           if(FlagSA<>'s')then
300            begin
301             if(SepWord='to')then
302              if(noun2 in[4,6,9,11,14,16,22,30,50,59,61,64,65,69,75])then
303               begin RL(186);Vanish(noun);r[noun]:=Prm;end
304              else RL(197);
305             if(SepWord='at')or(SepWord='near')or(SepWord='behind')then
306              if(noun2 in[0,4,6,9,11,12,14,16,17,20..23,26,28,30,35,39,43,
307                          50,53,54,59,61,62,64..69,72,73,75,78..80])then
308               begin RL(186);Vanish(noun);r[noun]:=Prm;end
309              else RL(197);
310             if(SepWord='under')then
311              if(noun2 in[4,15,16,20,23,59,60,61,75])then
312               begin RL(186);Vanish(noun);r[noun]:=Prm;end
313              else RL(197);
314             if(SepWord='in')then
315              if(noun2 in[6,16,43,47,30,50,59,64,65,72,78,80,84])then
316               begin RL(186);Vanish(noun);r[noun]:=Prm;end
317              else RL(197);
318             if(FlagSA<>'s')then Crazy;
319            end
320           end
321          else writeln('First you must have the ',n[noun,1],'.')
322         else Crazy;
323
324   end {of case}
325 end;  {of DefaultAnswers2}
326 {-------------------}
327   procedure DefaultAnswers3;
328 var o : integer;
329 begin
330
331 CASE VERB OF
332
333 31,63      :if(Verb=63)and(Prm<>MnRm)then RL(395)
334             else
335              if(Prm=MnRm)then
336               begin Attack:=False;
337                if(input='hi')or(input='hello')or(input='bye')then RL(396)else
338                if(copy(input,1,6)='follow')then RL(397)else
339                 case random(5) of
340                  0:RL(365);1:RL(398);2:RL(399);3:RL(400);4:RL(401)
341                 end
342               end
343              else RL(123);
344
345 33         :RL(124);
346
347 38         :case noun of
348              83:RL(262);
349              23:begin RL(366);DropAll;Ev:=Ev+['r'];Attack:=False end
350              else RL(125);
351             end;
352
353 16         :if(MnRm=Prm)then begin Attack:=False;RL(372)end else
354             if(en('r'))then RL(373)else
355             if(Prm<15)and(70 in p[12])then RL(374)else  RL(371);
356
357 19         :if(noun=Null)then RL(136)else Crazy;
358 24         :if(noun=7)then RL(422)else
359             if(noun in[26,6,7,22,36,17,50,65,73,74,80,79,30,84])then RL(126)
360             else Crazy;
361 21         :RL(127);
362 40         :Crazy;
363
364 8          :if(noun in[73,80])or(noun=Null)then
365              if(noun<>Null)then RL(36)
366              else if(here(73))or(here(80))then RL(36)else RL(37)
367             else RL(53);
368
369 12         :RL(38);
370 2          :if(noun in[4,35,39,8,11,12,14,20,21,30,57,43,59,67,70,75])then
371               RL(43)else RL(44);
372
373 15         :if(noun in mov)then
374              if(sepword='to')then
375               if(noun2=23)then
376                begin RL(62);Vanish(noun);Attack:=False end
377               else Crazy
378              else RL(60)
379             else RL(61);
380
381 1          :if(verbose)then
382               begin verbose:=false;RL(134);end
383              else begin verbose:=true;RL(135);end;
384
385 13         :RL(77);
386 23         :RL(78);
387
388 60         :case noun of
389             43,12:RL(252);
390             35:RL(288)
391             else RL(78);
392             end;
393
394 25         :if(Prm>62)and(Noun in[9,18,19,41])then RL(350)else RL(78);
395 34         :RL(79);
396
397   end {of case}
398 end;  {of DefaultAnswers3}
399 {-------------------}
400   procedure DefaultAnswers4;
401 var o : integer;
402 begin
403
404 CASE VERB OF
405
406 20         :RL(81);
407 35         :RL(82);
408
409 6          :if(noun=23)and(here(40))then begin vanish(40);RL(84);end
410              else
411               if here(40)then
412                if(noun2=Null)or(noun2=40)then
413                 case noun of
414                  57:RL(259);
415                  60:RL(260)
416                  else writeln('At the last moment you decide to spare',
417                        ' the ',n[noun,1],'''s life!')
418                 end
419                else Crazy
420               else RL(83);
421
422 30         :if(noun in [39,43,12,26,6,22,47,49,68,78,17,11,
423                50,65,73,74,80,79,30])then RL(93) else RL(94);
424
425 54         :begin write('Would you like to SAVE your game first (Y or N)?  ');
426              flag:=ReadKey;if(upcase(flag)<>'N')then SAVE else writeln('No.');
427              write('Are you still sure you want to quit? ');
428              flag:=ReadKey;if(upcase(flag)='Y')then
429               begin RL(367);delay(999);window(1,1,80,25);clrscr;close(rooms1);
430                close(rooms2);close(special1);close(special2);close(line1);
431               HALT end else RL(264)end;
432 53         :if(Prm in[27,30])then RL(123) else RL(145);
433 59         :If(noun=23)then RL(368)else Diagnose;
434
435 55         :if(noun=74)then
436               if(en('p'))then
437                 begin Ev:=Ev-['p'];RL(169);end
438               else RL(168)
439             else
440             if(noun=89)then
441               if(en('i'))then
442                 begin
443                  Ev:=Ev-['i'];RL(322);
444                  if(Prm in[59,63..68])then begin RS(66);DEAD;end;
445                 end
446               else RL(323)
447             else Crazy;
448
449 56     :if(noun=Null)or(noun in[60,23])or(noun in Mov)then
450          case noun of
451           23:RL(369);
452           60,Null:RL(193);
453           7:RL(194)
454           else RL(195);
455          end
456         else RL(196);
457
458 3       :case noun of
459          7:RL(235);
460          2:if(en('b'))then RL(236)else RL(237);
461          62:RL(238);
462          65:RL(239);
463          74:RL(240);
464          78:RL(241);
465          84,40,50,68,85:RL(242)
466          else Crazy;
467         end;
468
469 7      :begin if(noun=Null)then noun:=30;
470          if(noun in[30,36,47,50,71,72,79])then
471           case noun of
472            30,47,50,71:if(Prm in[5..22,44..49])then RL(247) else RL(248);
473            36:RL(249);
474            72:RL(250);
475            79:RL(251);
476           end
477          else Crazy;
478         end;
479
480
481   end   {of CASE.}
482 end;    {of DefaultAnswers4}
483 {-------------------}
484   procedure DefaultAnswers5;
485 var o: integer;
486 begin
487
488 CASE VERB OF
489
490 9         :if noun<>1 then
491              if(noun in Inven)then
492                if(noun=74)and(en('p'))then RL(170)
493           else if(noun=89)and(en('i'))then RL(335)
494           else begin
495                  inven:=inven-[noun];writeln(n[noun,1],': Dropped.');
496                  R[noun]:=Prm;
497                end
498              else
499                writeln('You don''t have the ',n[noun,1],'.')
500            else
501              begin
502               if(74 in inven)and(en('p'))then RL(170)else
503               if(89 in inven)and(en('i'))then RL(335)else
504               DropAll;
505             end;
506
507 26        :case noun of
508          2:if not(en('b'))then
509               begin
510                 Ev:=Ev+['b'];
511                 RL(3);end
512             else Say(noun,'peeled');
513          7:RL(162);
514         57:if(ropecon<>Null)then
515               begin
516                 ropecon:=Null;
517                 RL(117);end
518             else Say(noun,'untied');
519         62:RL(238)
520          else Crazy;
521          end; {end of OPEN }
522
523   end {of case}
524 end;  {of DefaultAnswers5}
525 {-------------------}
526   procedure DefaultAnswers6;
527 var o : integer;
528 begin
529
530 CASE VERB OF
531
532 28,27     :case noun of
533            23:RL(369);
534            29:if not(en('a'))then
535                 begin Ev:=Ev+['a'];
536                 RL(120);end
537               else begin Ev:=Ev-['a'];
538                 RL(121);end;
539            57:if(ropecon<>Null)and not(ropecon in inven)
540                     and(r[ropecon]<>Prm)then
541                   if(ropecon in mov)then begin
542                     RL(57);writeln('...it''s a ',n[ropecon,1],'!');
543                     r[ropecon]:=Prm;Ev:=Ev-['u'];
544                     if(ropecon=29)and not(flasoff)then DescribeRm;end
545                   else RL(56)
546                else RL(122);
547            8:begin RL(243);RL(244);play(9999,3500,0);play(3499,2000,1);
548               play(1999,1000,2);play(999,200,5);play(199,8,16);Ev:=Ev+['e'];
549               n[36,5]:=Q;n[78,5]:='glass';n[68,1]:='slot';n[66,4]:=Q;
550               Ev:=Ev-['j'];
551               moveto(30);
552               if(MnRm=Prm)then RS(73);
553              end;
554            81:if not(en('j'))then
555                if KeyHole then
556                 begin Ev:=Ev+['j'];RL(326);play(2000,2001,200);end
557                else RL(123)
558               else
559                begin Ev:=Ev-['j'];
560                 if Keyhole then begin RL(326);play(2001,2000,200)end
561                 else RL(123);
562                 if(Prm in[59..68])then begin nosound;RS(62);DEAD;end;
563                end;
564            36:begin
565                if(Prm > 57)then if(Prm = 58)then RL(123)else
566                 begin RS(63);DEAD;end;
567               end
568              else RL(122);
569            end; {of case}
570
571 62         :begin write('You have ',Sc,' of 1000 points',
572                         ', giving you the rank of ');Tic:=Tic-1;
573               case Sc of
574               0..99:writeln('beginner.');
575               100..249:writeln('novice adventurer.');
576               250..399:writeln('adventurer third class.');
577               400..549:writeln('adventurer second class.');
578               550..699:writeln('adventurer first class.');
579               700..849:writeln('expert adventurer.');
580               850..999:writeln('master adventurer.')
581               else writeln('dead adventurer!')
582               end;
583             Attack:=False;
584             if(MnRm=Prm)then RL(370)
585             end;
586
587   end {of case}
588 end;  {of DefaultAnswers6}
589 {-------------------}
590   procedure DefaultAnswers7;
591 var o : integer;
592 begin
593
594 CASE VERB OF
595
596 14      :if(noun<>1)then
597           if(noun in Mov)then
598            if not(noun in inven)then
599             begin
600             Stuff:=0;
601             for o:=0 to NMax do if(o in inven)then Stuff:=Stuff+1;
602             if(Stuff < 6)then
603              if(en('r'))and(inven<>[])then RL(87)
604              else begin
605                    Vanish(Noun);inven:=inven+[noun];
606                    writeln(n[noun,1],': Taken.');
607                    if(noun=70)then Ev:=Ev-['d'];
608                   end
609             else RL(234)
610             end
611            else writeln('You already have the ',n[noun,1],'.')
612           else Crazy
613          else if(en('r'))then RL(88) else
614             begin flag:='0';Stuff:=0;
615              for o:=0 to NMax do if(o in inven)then Stuff:=Stuff+1;
616              if(Stuff < 7)then
617               for o:=0 to NMax do
618                begin
619                 if r[o]=Prm then
620                  if(Stuff+1 < 7)then
621                   begin
622                    vanish(o);inven:=inven+[o];Stuff:=Stuff+1;
623                    writeln(n[o,1],':  Taken.');flag:='1';
624                    if(o=70)then Ev:=Ev-['d'];
625                   end
626                  else
627                   begin flag:='1';
628                   writeln(n[o,1],': You have too many objects already!');end
629                end
630              else RL(234);
631              if(flag='0')then RL(49)
632             end; {of 14}
633
634 4,5       :RL(420);
635
636 64        :SAVE;
637
638   end {of case}
639 end;  {of DefaultAnswers7}
640 {-------------------}
641   procedure DefaultAnswers8;
642 var o : integer;
643 begin
644
645 CASE VERB OF
646
647 10         :if(noun in [2,52])then
648               if(noun=2)then
649                 if(en('b'))then begin
650                   RL(45); Ev:=Ev+['c'];inven:=inven+[51];
651                   Vanish(2);Sc:=Sc+10;end
652                 else RL(46)
653               else begin RL(47);Ev:=Ev+['n'];Sc:=Sc+15;Vanish(52);end
654             else writeln('I don''t think the ',n[noun,1],
655                          ' would do much for your digestive system!');
656
657 42         :case noun of
658             74:if not(en('p'))then
659                 if not(en('i'))then
660                  begin RL(20);inven:=inven+[74];r[74]:=Null;Ev:=Ev+['p'];end
661                 else RL(320)
662                else Say(74,'on');
663             89:if not(en('i'))then
664                 if not(en('p'))then
665                  begin RL(319);vanish(89);inven:=inven+[89];Ev:=Ev+['i'];end
666                 else RL(318)
667                else Say(89,'on your head')
668             else RL(128);
669             end;
670
671 17,0       :if(noun2=Noun)then Crazy else
672             if(noun2 in Mov)or(Noun2=Null)then
673             case Noun of
674              2:begin RL(21);Vanish(2);Sc:=Sc+25;r[51]:=Prm;end;
675              60:begin RL(22);DEAD;end;
676              52:begin RL(34);Vanish(52);end;
677              23:if(noun2=null)then RL(369)
678                 else begin Vanish(noun2);Attack:=False;
679                  writeln('The monster grabs the ',n[noun2,1],' and eats it!');
680                      end;
681              7:begin RL(35);Vanish(7);r[52]:=Prm;Ev:=Ev+['I'];end
682              else if(verb=0)then writeln('At the last moment you decide to',
683                  ' spare the ',n[noun,1],'''s life!')
684                   else RL(216);
685              end{of case}
686              else Crazy;
687
688 39         :if((SepWord='to')or(SepWord='off'))and(Noun2=Null)then
689              case Noun of
690               29:if(SepWord='to')then begin Ev:=Ev+['a'];RL(120);end
691                  else begin Ev:=Ev-['a'];RL(121);end;
692               13:RL(148);
693               20:RL(149);
694               65:RL(150)
695              else Crazy end
696             else RL(80);
697
698   end {of case}
699 end;  {of DefaultAnswers8}
700 {-------------------}
701   procedure DefaultAnswers9;
702 var o : integer;
703 begin
704
705 CASE VERB OF
706
707 32    :if(34 in inven)then
708         if(shots>0)then
709          begin
710          Shots:=Shots-1;
711          for x:=1 to (26-(4*(6-Shots))) do
712             begin play(300,350,11-Shots*2);play(320,370,11-Shots*2);end;
713           if(noun=34)and(noun2<>34)and(noun2<>Null)and(SepWord='at')then
714              begin noun:=noun2; noun2:=34; SepWord:='with';end;
715           if((noun2=34)and(noun<>34)and(SepWord='with'))or
716             ((noun<>34)and(SepWord='s'))then
717       case noun of
718        1:begin;Crazy;Shots:=Shots+1;end;
719        2,7,8,13,27,29,32,40,51,52,63,74,77,89:begin vanish(noun);
720           writeln('The ',n[noun,1],' vanishes in an explosion of light!');
721             if(noun=74)and(en('p'))then begin RL(232);DEAD;end;
722          end;
723        48:begin RL(222);RL(223);Ev:=Ev+['g'];p[40]:=p[40]-[48];
724            if not(en('P'))then begin Ev:=Ev+['P'];Sc:=Sc+25;end;end;
725        12,26:RL(224);
726        23:begin case random(4)of 0:RL(375);1:RL(376);2:RL(377);3:RL(378)end;
727            Attack:=False;
728           end;
729        45:RL(315);
730        60,56,44:begin RL(233);DEAD;end
731        else writeln('A blinding ray strikes the ',n[noun,1],', but it is',
732                       ' only slightly blackened.');
733       end {of shoot case}
734           else if(noun=34)and(noun2=Null)then RL(213)
735           else begin;Crazy;Shots:=Shots+1;end;
736          end
737         else begin writeln('...click!');play(25,32,9);end
738        else RL(208);
739
740   end {of case}
741 end;  {of DefaultAnswers9}
742 {-------------------}
743   procedure DefaultAnswers10;
744 var o : integer;
745 begin
746
747 CASE VERB OF
748
749 36         :if(noun in mov)then
750              if(noun in inven)then
751               if((noun in[2,7,52,29])or
752                  (noun2 in[2,7,23,29,47,52,53,73,88]))and(noun<>noun2)then
753                begin
754                 if(noun=2)or(noun2=2)then begin RL(95);vanish(2);
755                   r[51]:=Prm;end;
756                 if(noun=7)or(noun2=7)then begin RL(35);vanish(7);
757                   Ev:=Ev+['I'];r[52]:=Prm;end;
758                 if(noun=29)or(noun2=29)then begin RL(96);vanish(29);end;
759                 if(noun=52)or(noun2=52)then begin RL(34);vanish(52);end;
760                 if(noun2=88)then begin RL(293);vanish(noun);
761                   if(noun=2)then noun:=51;if(noun=7)then noun:=52;
762                   r[noun]:=random(4)+51;end;
763                 if(Prm in[0..6,9,10,13,41..43])and(noun2 in[73,53,47])then
764                   begin RL(306);vanish(noun);end;
765                 if(noun2=23)then begin Attack:=False;Vanish(noun);RL(379);
766                   writeln(n[noun,1],' out of mid-flight and eats it',
767                         ' in one giant gulp!')end;
768                end
769               else begin writeln('The ',n[noun,1],' collides with the ',
770                 n[noun2,1],' but nothing interesting happens.');
771                 Vanish(noun);r[noun]:=Prm;end
772              else writeln('First you must have the ',n[noun,1],'.')
773             else Crazy;
774
775 37         :if(noun=57)then
776              if(sepword='to')then
777               if not(noun2 in[1,15,17,22,30,46,47,50,52,72,73,79,80,83])then
778                if(ropecon=Null)then begin
779                 ropecon:=noun2;
780                 writeln('The rope is firmly tied to the ',n[noun2,1],'.');
781                 if(noun2=57)then RL(48);end
782                else writeln('It is already tied to the ',n[ropecon,1],'.')
783               else RL(50)
784              else Crazy
785             else Crazy;
786
787 61         :begin RL(245);flag:=ReadKey;
788              if(upcase(flag)<>'N')then
789               begin RL(380);delay(999);window(1,1,80,25);clrscr;close(rooms1);
790                close(rooms2);close(special1);close(special2);close(line1);
791                assign(rooms1,'BEYOND.com');
792                {execute(rooms1)}
793                end
794              else RL(264)
795             end;
796
797 65        :RESTORE;
798
799   end {of case}
800 end;  {of DefaultAnswers10}
801 {===================}
802   procedure SpecialAnswers1;
803
804 begin
805 FlagSA:='r';
806 if Present then
807 CASE Prm OF
808
809 3       :case verb of
810   44,58 :moveto(1);
811   20,52 :if(noun=6)then RL(40);
812     14  :if(noun=57)and not(en('o'))then RL(419);
813    6    :if(noun=57)and(here(40))and((noun2=Null)or(noun2=40))then
814              begin
815                RS(4); tic:=15; moveto(4); Ev:=Ev+['A']; Sc:=Sc+25;
816                if(en('o'))then
817                  for o:= 0 to 57 do begin
818                    if(o in kitset)then r[o]:=Prm;
819                    if(r[o]=3)then r[o]:=Prm;end
820              end;
821    26   :if(noun=39)then
822              if not(en('o'))then
823                begin Ev:=Ev+['o'];RL(328); for o:=2 to 57 do
824                  if(o in kitset)then r[o]:=Prm;end
825              else Say(noun,'opened');
826    3  :if(noun=39)then
827              if(en('o'))then
828                begin Ev:=Ev-['o'];RL(186); for o:=2 to 57 do
829                  if(o in kitset)then r[o]:=Null;end
830              else Say(noun,'shut');
831   17,28,27 :if(noun in [6,57,39,59])then RL(29);
832   24,11   :case noun of
833        39  :if(en('o'))then
834                if kitset=[] then begin RL(329);end
835                else begin RL(330);for o:= 0 to 57 do
836                    if(o in kitset)then writeln(' a ',n[o,1]);end
837              else RL(331);
838        57 :RL(10);
839        73 :RL(19);
840        6 :DescribeRm;
841            end;
842          end; {of 3}
843
844 4      :case verb of
845    43..52,20:RL(7);
846     55  :if(noun=35)then begin RL(332);Ev:=Ev-['B'];end;
847   42,3:if noun=35 then begin RL(8); Ev:=Ev+['B'];end
848            else if(noun=39)then
849              if(en('o'))then
850                begin Ev:=Ev-['o'];RL(186); for o:=0 to 57 do
851                  if(o in kitset)then r[o]:=Null;end
852              else Say(noun,'shut');
853   29,37 :if(noun=35)and(noun2=60)then begin
854              RL(8);Ev:=Ev+['B'];end;
855    26   :if(noun=35)and(en('B'))then begin RL(332);Ev:=Ev-['B'];end
856            else if(noun=39)then
857              if not(en('o'))then
858                begin Ev:=Ev+['o'];RL(328); for o:=0 to 57 do
859                  if(o in kitset)then r[o]:=Prm;end
860              else Say(noun,'opened');
861    19,2:if(noun in[6,64])or(noun=Null)then
862              if(en('B'))then RL(9)
863              else begin RL(0);DEAD;end;
864     24,11:case noun of
865        39  :if(en('o'))then
866                if kitset=[] then begin RL(329);end
867                else begin RL(330);for o:= 0 to 57 do
868                    if(o in kitset)then writeln(' a ',n[o,1]);end
869              else RL(331);
870        35 :RL(12);
871        73 :RL(19);
872        6 :DescribeRm;
873            end;  {of case}
874          end; {of 4}
875
876 end {of case}
877 else SA
878 end; {of SP1}
879 {-------------------}
880   procedure SpecialAnswers2;
881
882 begin
883 FlagSA:='r';
884 if Present then
885 Case Prm of
886
887 5       :case verb of
888    45   :moveto(6);
889    2    :if(noun=79)then RL(263);
890            end;
891
892 6       :case verb of
893    46   :moveto(5);
894   43,44,45,47..52:if FlasOff then RL(14)
895          else case verb of
896            43:begin Ox:=0;RL(286);moveto(7);end;
897            45:moveto(9); 49:moveto(8);
898               end;
899              end; {of 6}
900
901 7       :case verb of
902   23..25,11:if(noun in[6,36,73,0,15,64,67])then RS(9);
903   43..50 :if FlasOff then RL(14)
904           else
905            begin
906             If(Verb in[43,47,48])then Ox:=Ox+1;
907             If(Verb in[44,49,50])then Ox:=Ox-1;
908             if(Ox<1)then begin RL(286);moveto(6)end
909             else
910              begin
911               RL(333);
912               if(random(20)=2)then begin writeln;RS(9);
913                if not(en('K'))then begin Ev:=Ev+['K'];Sc:=Sc+15;end;end;
914              end;
915            end;
916   28,17,6:if(noun=36)or(noun=15)then begin RS(10);DEAD;end;
917   31   :if(input='help')then begin RL(334);moveto(6)end;
918          end;  {of 7}
919
920 8       :case verb of
921    48,58:if FlasOff then RL(14) else moveto(6);
922   43..47,49..52:if FlasOff then RL(14);
923   11:if(noun in [46,79])then RS(12)
924          else if(noun in [15,30])then RL(28);
925    38 :if(noun=46)then begin SA;writeln('It feels jagged.');end;
926          end; {of 8}
927
928 9         :case verb of
929    43..52 :if FlasOff then RL(14)
930          else case verb of
931            46:moveto(6);47:moveto(10);49:moveto(11);
932               end;
933            end; {of 9}
934
935 10        :case verb of
936    50,58 :if FlasOff then RL(14)
937          else moveto(9);
938    43..49,51..52:if FlasOff then RL(14);
939   19,2:if(noun in[17,80])then begin RL(0);DEAD;end;
940            end; {of 10}
941
942 end {of case}
943 else SA
944 end; {of SP2}
945 {-------------------}
946   procedure SpecialAnswers3;
947
948 begin
949 FlagSA:='r';
950 if Present then
951 Case Prm of
952
953 14       :case verb of
954    46,48 :if FlasOff then RL(14)
955           else if(verb=46)then moveto(11) else moveto(15);
956   43..45,47,49..52 :if FlasOff then RL(14);
957           end; {of 14}
958
959 15     :case Verb of
960    52,2 :if(en('d'))and(en('t'))then
961            begin RL(63);moveto(16);end else RL(64);
962   19   :RL(64);
963   7    :RL(65);
964   14    :if(noun in[57,70])then begin inven:=inven+[noun];r[noun]:=Null;
965            if(noun=70)then Ev:=Ev-['d']
966            else Ev:=Ev-['t'];SA;writeln(n[noun,1],':  Taken.');end;
967   45,49  :if(flasoff)then RL(14) else moveto(14);
968    44    :RL(73);
969   24,11:if(noun=17)and not(en('u'))then RL(74)
970            else if(noun=17)and(en('a'))then RL(75);
971   17,36,29,9:case noun of
972    70:if((noun2 in[30,42])or(noun2=Null))and(verb<>9)then
973          if not(en('d'))then
974           begin RL(69);Ev:=Ev+['d'];r[70]:=Prm;inven:=inven-[70];end
975          else RL(67)
976         else if(verb=9)then begin end else RL(66);
977    57:if(noun2=17)and(verb<>17)then begin
978           if(here(ropecon))and(ropecon<>57)then begin
979             RL(71);inven:=inven-[57];r[57]:=Prm;
980             if(ropecon=70)then Ev:=Ev+['t'];end
981           else begin RL(70);vanish(57); end;
982          end else begin end
983    else if(verb in[9,29,36])and(noun2=17)and(noun in mov)then
984          if(here(ropecon))and(noun=ropecon)then begin RL(76);
985           inven:=inven-[noun];r[noun]:=Null;
986           if(ropecon=29)then Ev:=Ev+['u'];end
987          else begin RL(72);inven:=inven-[noun];r[noun]:=17;end
988       end;{of noun case}
989          end;{of 15}
990
991 16       :case verb of
992    51,2   :moveto(15);
993    52    :RL(85);
994   0,3..18,20..21,26..40,42,53,55,56,60:RL(86);
995    19,61:begin RS(18);Ev:=Ev-['a'];Ev:=Ev+['r'];Sc:=Sc+60;
996           moveto(17);dropall;if(here(2))then begin r[2]:=Null;
997           r[51]:=Prm;end;r[57]:=Null;end;
998          end;{of 57}
999
1000 end  {of Case}
1001 else SA
1002 end; {of SP3}
1003 {-------------------}
1004   procedure SpecialAnswers4;
1005
1006 begin
1007 FlagSA:='r';
1008 if Present then
1009 Case Prm of
1010
1011 19      :case verb of
1012    48,51,58:if(flasoff)then RL(14)else begin RL(311);moveto(18);end;
1013    47,52,57:if(flasoff)then RL(14)else begin RL(309);moveto(20);end;
1014          end;{of stairs}
1015
1016 20      :case verb of
1017    50,51,58:if(flasoff)then RL(14)else begin RL(310);moveto(19);end;
1018    11,24,25,23:if(noun=67)then RL(90)
1019      else if(noun in[12,43])and not(en('E'))then begin RL(92);
1020             r[32]:=20;Sc:=Sc+15;Ev:=Ev+['E'];end;
1021   14,38:if(noun in[67,12])then RL(91);
1022   43..49,57:if(noun=Null)or(noun in[12,43])then RL(215);
1023         end;{of 20}
1024
1025 21       :case verb of
1026     50   :if(flasoff)then RL(14)else moveto(18);
1027     47   :if(flasoff)then RL(14)else moveto(22);
1028    2,51:if(flasoff)then RL(14)else
1029             if(noun=64)or(noun=Null)then moveto(23);
1030     45   :RL(97);
1031     49,44,43:RL(258);
1032   11     :if(noun in[30,64])then begin RL(255);RL(256);RL(257)end;
1033         end;
1034
1035 22       :case verb of
1036     50   :if(flasoff)then RL(14)else moveto(21);
1037     2,51 :if(flasoff)then RL(14)else
1038             if(noun=64)or(noun=Null)then moveto(23);
1039     44   :RL(97);
1040     47,45,49:RL(258);
1041     11     :if(noun in[30,64])then begin RL(255);RL(256);RL(257)end;
1042         end; {of 22}
1043
1044 23      :case verb of
1045    46,50 :if(flasoff)then RL(14)else moveto(21);
1046    43,48 :if(flasoff)then RL(14)else moveto(22);
1047    44,45,47,49:RL(258);
1048    26,27 :if(noun=26)then
1049            if(en('l'))then Say(26,'open')
1050            else begin RL(98);Ev:=Ev+['l'];p[23]:=p[23]+[69];end;
1051     3    :if(noun=26)then
1052            if(en('l'))then begin RL(171);Ev:=Ev-['l'];p[23]:=p[23]-[69];end
1053            else Say(26,'closed');
1054   2,52,57:if(en('l'))and((noun=69)or(noun=Null))then moveto(24)else RL(99);
1055   24,25  :if(noun=26)then RL(151);
1056    11    :if(noun=26)then if(en('l'))then RL(217)else RL(218)
1057           else if(noun in[30,64])then begin RL(255);RL(256);RL(257)end;
1058         end; {of 23}
1059
1060 24      :case verb of
1061    51,58:if(en('l'))then moveto(23) else RL(99);
1062    52,57:moveto(25);
1063   24,25 :if(noun=26)then RL(151);
1064    3    :if(noun=26)then begin RL(171);Ev:=Ev-['l'];end else
1065          if(noun=55)then RL(411);
1066    2    :if(noun=69)then Moveto(25);
1067    26   :if(noun=26)then begin RL(98);Ev:=Ev+['l'];end else
1068          if(noun=55)then RL(412);
1069    11   :if(noun=26)then if(en('l'))then RL(217)else RL(218)else
1070          if(noun=55)then RL(410);
1071    27,28:If(noun=55)then RL(411);
1072        end;
1073
1074 end   {of case}
1075 else SA
1076 end;  {of SP4}
1077 {-------------------}
1078   procedure SpecialAnswers5;
1079
1080 begin
1081 FlagSA:='r';
1082 if Present then
1083 Case Prm of
1084
1085 25     :case verb of
1086      43:begin writeln('The door slides open...');play(55,70,40);moveto(27);
1087          writeln('The door slides shut behind you.');play(70,55,40);
1088          if not(en('Y'))then begin Ev:=Ev+['Y'];Sc:=Sc+30 end end;
1089      44:moveto(32); 45:moveto(30);
1090      46:moveto(34); 47:moveto(28); 49:moveto(31);
1091      48:if(en('v')and not(en('p')))then begin Verbose:=False;moveto(35);
1092           RS(25);DEAD; end else moveto(35);
1093      50:moveto(33); 51,58:moveto(24);
1094      52,2:if(noun=69)or(noun=Null)then moveto(26);
1095      17,27,28,38:if(noun=26)then
1096           begin RL(413);play(55,70,45);play(69,54,45)end;
1097    26,40:if(noun=26)then RL(414);
1098         end;
1099
1100 27      :case verb of
1101    44,58:begin writeln('The door slides open...');play(55,70,40);moveto(25);
1102           writeln('The door slides shut behind you.');delay(999);play(70,55,40)
1103          end;
1104      17,27,28,38:if(noun=26)then
1105           begin RL(413);play(30,40,25);play(40,30,25)end;
1106    26,40:if(noun=26)then RL(414);
1107    11  :if(noun in[20,21])then RL(103)
1108       else if(noun=58)then case compcon of
1109         Null:RL(155); 1:RS(21); 2:RS(22); 3:RS(23);
1110         4:begin RS(24);compcon:=Null;gotoxy(1,wherey-1);
1111            writeln('. tim. chamb.r c.de: ',Code,'.. ..tel.port...  .  .',
1112                    '... . .. ime .  p.n.l ....... ...');
1113            RL(105);play(29,29,40);end;end;{of case}
1114    53  :begin
1115          if(input='1')or(input='one')then begin RL(104);compcon:=1;end;
1116          if(input='2')or(input='two')then begin RL(104);compcon:=2;end;
1117          if(input='3')or(input='three')then begin RL(104);compcon:=3;end;
1118          if(input='4')or(input='four')then begin RL(104);compcon:=4;end;
1119          for y:=1 to random(40)+9 do
1120           begin x:=random(6000)+99;play(x,x,50);delay(9)end
1121        end;
1122    31   :if(compcon=null)then begin
1123           play(9,999,0);sound(999);RS(20);play(999,9,0);if not(en('J'))then
1124           begin Ev:=Ev+['J'];Sc:=Sc+40;end;end;
1125        end;
1126
1127 28     :case verb of
1128    50,58:moveto(25);
1129    45,57:moveto(29);
1130    28   :if(noun in[33,10])then begin RL(137);play(31,31,450);end;
1131        end;
1132
1133 29    :case verb of
1134    46,58:moveto(28);
1135    36   :if(noun2 in[33,10])and(noun in Mov)then
1136            if(en('M'))then
1137              begin RS(27);Ev:=Ev-['M','r'];Vanish(noun);r[noun]:=28;
1138                if not(en('N'))then begin Ev:=Ev+['N'];Sc:=Sc+55;end;
1139              play(28,34,600)end
1140            else begin Vanish(noun);r[noun]:=28;RL(179);
1141              if(noun in[7,8,29,34,40,51])then Ev:=Ev+['M'];end;
1142        end;
1143
1144 33     :case verb of
1145    47,58:moveto(25);
1146     34  :RL(272);
1147    28,38:if(noun=10)then begin RL(421);x:=random(9999);case random(3) of
1148           0:play(x,random(9999),random(3));
1149           1:for y:=1 to random(300)+60 do
1150              begin x:=random(9999);play(x,x,2);delay(7)end;
1151           2:begin y:=9999;o:=0;
1152              repeat x:=random(9999);play(x,y,0);
1153                     y:=random(9999);play(y,x,0);o:=o+1;
1154              until o>7 end end end
1155        end;
1156
1157 end {of case}
1158 else SA
1159 end; {of SP5}
1160 {-------------------}
1161   procedure SpecialAnswers6;
1162
1163 begin
1164 FlagSA:='r';
1165 if Present then
1166 Case Prm of
1167
1168 30   :case verb of
1169    46,58:if(en('e'))then RL(212) else moveto(25);
1170    26,27,28,40:if(noun=49)then if(en('h'))then Say(49,'open') else RL(159)
1171                else
1172                 if(noun in[10,76])and(verb=28)then
1173                  begin
1174                  if(MnRm=30)then begin RS(76);DEAD;end;
1175                   if(en('e'))then
1176                    begin RS(29);writeln;
1177                     play(1,700,7);play(701,8000,1);Ev:=Ev-['e'];
1178        case YearDial of
1179               1933:begin Loc:='Civilization!';Sc:=Sc+80;RS(78);HOME;END;
1180         2111..2679:begin
1181                      Verbose:=False;moveto(41);RS(30);Verbose:=True;
1182                      if not(en('O'))then begin Sc:=Sc+55;Ev:=Ev+['O'];end;
1183                n[78,5]:=Q;n[37,5]:='glass';n[72,1]:='fence';
1184                n[70,1]:='hooded figure';n[70,2]:='hooded';n[70,3]:='figure';
1185                n[70,4]:='mutant';n[70,5]:=Q;n[3,1]:='footprints';
1186                n[3,2]:='footpri';n[57,1]:='parachute';n[57,2]:='parachu';
1187                n[35,1]:='boulder';n[35,2]:='rock';n[35,3]:='rocks';
1188                n[66,4]:='red';
1189                    end;
1190         0..1111   :begin writeln;RS(31);DEAD;end;
1191         1112..1932,1934..2110:begin writeln;RS(32);DEAD;end;
1192         2680..3789:begin writeln;RS(33);DEAD;end
1193              else  begin writeln;RS(34);DEAD;end;
1194        end; {of YearDial case}
1195                    end
1196                   else begin RL(209);play(1,9999,0)end;
1197                  end;
1198    33   :if(noun in[16,59])or(noun=Null)then begin Ev:=Ev+['e'];RL(210);end;
1199    35   :if(en('e'))then begin Ev:=Ev-['e'];RL(211);Attack:=False end;
1200    17,0,6:if(noun=49)then RL(160);
1201    53  :if(input=Code)then
1202          If(en('h'))then Say(49,'open')
1203          else
1204           begin Ev:=Ev+['h'];RL(173);play(23,24,250);Sc:=Sc+30;
1205             if(PanelCon<>Null)then begin r[PanelCon]:=30;Code:='R';
1206              writeln('Sitting inside the panel compartment is a ',
1207                       n[PanelCon,1],'.');end
1208             else RL(183);
1209           end
1210         else RL(172);
1211    3   :If(noun=49)then RL(159);
1212    39  :if(noun=25)then RL(115) else
1213         case noun of
1214         24:if(DialNum>0)and(DialNum<377)then begin RL(176);DayDial:=DialNum;end
1215            else RL(178);
1216         82:if(DialNum>-1)and(DialNum<5000)then begin RL(177);
1217              YearDial:=DialNum;end else RL(178);
1218         end;
1219  11,24:case noun of
1220    49:begin SA;if(en('h'))then if(PanelCon=Null)then RL(183)
1221                  else writeln('Inside the compartment is a ',n[PanelCon,1],'.')
1222                else RL(184);end;
1223    82:begin SA;writeln('The year dial is set to ',YearDial,'.');end;
1224    24:begin SA;writeln('The day dial is set to ',DayDial,'.');end;
1225    16:begin RL(203);RL(204)end;
1226    25:RL(115);
1227    38:RL(161);
1228       end;
1229        end; {of 30}
1230
1231 end  {of case}
1232 else SA
1233 end; {of SP6}
1234 {-------------------}
1235   procedure SpecialAnswers7;
1236
1237 begin
1238 FlagSA:='r';
1239 if Present then
1240 Case Prm of
1241
1242 26     :case verb of
1243   51,58,2:if(noun=69)or(noun=Null)then moveto(25);
1244   43,48 :moveto(36); 44,49 :moveto(38); 45,47 :moveto(39); 46,50 :moveto(37);
1245         end;
1246
1247 35      :case verb of
1248    49,58:moveto(25);
1249   11:case noun of
1250     54:RL(100);
1251     62:if(en('v'))then RL(205)else RL(206);
1252     end;
1253   28  :if(noun in[55,10])then
1254         if(en('v'))then begin RL(101);Ev:=Ev-['v'];play(40,65,80)end
1255         else
1256          begin RL(102); Ev:=Ev+['v'];play(65,40,80);
1257           if not(en('p'))then begin RS(28);DEAD;end
1258           else if(MnRm=35)then
1259            begin n[23,1]:='melted monster';n[23,4]:='melted';MnRm:=Null;
1260             RS(74);p[35]:=p[35]+[77];
1261             if not(en('W'))then begin Sc:=Sc+65;Ev:=Ev+['W'] end
1262            end
1263          end;
1264   14  :if(noun in[1,77])and(77 in p[35])then begin Sc:=Sc+10;noun:=77;end;
1265   55  :if(noun=74)then
1266         if(en('v'))then begin RS(26);DEAD end;
1267   38 :RL(30);
1268        end;
1269
1270 36     :case verb of
1271   44,49,58:moveto(26);
1272     45  :moveto(39);
1273     46  :moveto(37);
1274     57  :if(noun=12)then RL(215);
1275         end;
1276
1277 37     :case verb of
1278   45,47,58:moveto(26);
1279     43  :moveto(36);
1280     44  :moveto(38);
1281     57  :if(noun=12)then RL(215);
1282         end;
1283
1284 38     :case verb of
1285   43,48,58:moveto(26);
1286     45  :moveto(39);
1287     46  :moveto(37);
1288     57  :if(noun=12)then RL(215);
1289    0..42,44,47,49,50-56,59..99:if(noun=28)or(noun2=28)then
1290           begin RS(35);RL(220);p[40]:=p[40]+[48];moveto(40);Ev:=Ev-['g'];
1291            if(MnRm=Prm)then begin RS(79);DEAD end
1292           end;
1293         end;{of 38}
1294
1295 39     :case verb of
1296   46,50,58:moveto(26);
1297     45  :if(en('g'))then moveto(40);
1298     3   :if(noun=26)then if(en('g'))then RL(225) else Say(26,'shut');
1299     43  :moveto(36);
1300     44  :moveto(38);
1301     57  :if(noun=12)then RL(215);
1302         end;
1303
1304 40     :case verb of
1305   46,58 :if(en('g'))then moveto(39) else RL(221);
1306    26   :if(noun=26)then if(en('g'))then Say(26,'open') else RL(221);
1307    3    :if(noun=26)then if(en('g'))then RL(225) else Say(26,'shut');
1308   11,14 :if(noun in[12,43,83])then RL(261);
1309        end;
1310
1311 end  {of case}
1312 else SA
1313 end; {of SP7}
1314 {-------------------}
1315   procedure SpecialAnswers8;
1316
1317 begin
1318 FlagSA:='r';
1319 if Present then
1320 Case Prm of
1321
1322 41     :case verb of
1323     43  :moveto(42);
1324     44  :moveto(43);
1325   2,19  :if(noun in[53,73,87])then
1326            begin RS(39);RL(287);moveto(46);Rx:=4;end;
1327        end;
1328
1329 42     :case verb of
1330     44  :moveto(41);
1331     43  :RL(296);
1332     14  :if(noun in[13,1])and(13 in p[42])then
1333           begin Sc:=Sc+10;noun:=13;end;
1334   2,19  :if(noun in[53,73,87])then
1335            begin RS(39);RL(287);moveto(46);Rx:=4;end;
1336        end;
1337
1338 43     :case verb of
1339     43  :moveto(41);
1340     44  :moveto(44);
1341   2,19  :if(noun in[53,73,87])then
1342            begin RS(39);RL(287);moveto(46);Rx:=4;end;
1343         end;
1344
1345 44     :case verb of
1346     43  :moveto(43);
1347     46  :moveto(47);
1348     45  :begin RL(274);Rx:=0;moveto(46);end;
1349   44,47..51,2,19:if(noun=Null)or(noun in[41,79])then RL(275);
1350        end;
1351
1352 45     :case verb of
1353     44  :moveto(49);
1354     46  :begin RL(274);Rx:=8;moveto(46);end;
1355     45  :begin Rx:=9;RL(274);moveto(46);end;
1356   43,47..51,2,19:if(noun=Null)or(noun in[41,79])then RL(275);
1357         end;
1358
1359 46     :case verb of
1360     45  :begin Rx:=Rx+1;RL(274);
1361           if(Rx=9)then begin
1362           if not(en('T'))then begin Ev:=Ev+['T'];Sc:=Sc+30;end;
1363           moveto(45)end;
1364           if(Rx>86)then begin RL(340);moveto(47)end
1365          end;
1366     46  :begin Rx:=Rx-1;RL(274);
1367           if(Rx=8)then moveto(45);
1368           if(Rx<1)then moveto(44);
1369          end;
1370   43,44,47..51,2,19:if(noun=Null)or(noun in[41,79])then RL(275);
1371         end;
1372
1373 47     :case verb of
1374   46,52,2,19:begin if(random(2)=1)then begin RS(37);DropAll;moveto(48)end
1375                    else begin RL(277);moveto(48)end;end;
1376     45  :moveto(44);
1377   43,44,47..50:RL(278);
1378         end;
1379
1380 48     :case verb of
1381   45,51,2:if(random(3)=2)and(noun<>35)then begin RS(38);moveto(47)end
1382           else if(noun<>35)then RL(279);
1383    43,44,46..50:RL(279);
1384      14  :if(noun in[27,1])and(27 in p[48])then
1385            begin Sc:=Sc+20;noun:=27;end;
1386      11 :if(noun=35)then RL(289)
1387         end;
1388
1389 end  {of case}
1390 else SA
1391 end; {of SP8}
1392 {-------------------}
1393   procedure SpecialAnswers9;
1394
1395 begin
1396 FlagSA:='r';
1397 if Present then
1398 Case Prm of
1399
1400 50     :case verb of
1401   43,58 :begin RL(290);moveto(49);end;
1402   44,57 :if(noun=Null)or(noun in[88,26,50])then
1403           begin RS(41);if not(en('L'))then
1404            begin Ev:=Ev+['L'];Sc:=Sc+25;end;moveto(51);end;
1405     11  :case noun of
1406           35,50:RL(292);
1407           88,68:RS(42);
1408           46,66:RS(43);
1409          end;
1410   30,28,38,17,14:if(noun=88)then RL(294);
1411         end;
1412
1413 51     :case verb of
1414     44  :moveto(52);
1415     46  :moveto(52);
1416     48  :moveto(53);
1417         end;
1418
1419 52     :case verb of
1420     43  :moveto(51);
1421     47  :moveto(53);
1422     46  :moveto(51);
1423         end;
1424
1425 53     :case verb of
1426    52,2,57:if(noun=Null)or(noun=69)then begin if not(en('Q'))then
1427             begin Ev:=Ev+['Q'];Sc:=Sc+30;end;moveto(55);end;
1428     47  :moveto(52);
1429     45  :moveto(53);
1430     49  :moveto(54);
1431         end;
1432
1433 54     :case verb of
1434     43  :moveto(52);
1435     49  :moveto(53);
1436     44  :moveto(51);
1437     50  :begin if not(en('R'))then
1438           begin Ev:=Ev+['R'];Sc:=Sc+20;end;moveto(56);end;
1439         end; {verb case}
1440
1441 55     :case verb of
1442   51,2,58,44:if(noun=Null)or(noun=69)then moveto(53);
1443    11   :if(noun in[11,45])then
1444           begin RL(297);if(en('k'))then RL(298) else RL(299)end;
1445    26,40:if(noun in[45,26,11,68])and(noun2=27)and(SepWord='with')then
1446            if not(en('k'))then
1447             begin Ev:=Ev+['k'];RS(45);for o:=2 to NMax do
1448              if(o in cabiset)then r[o]:=55;
1449              if not(en('R'))then begin Ev:=Ev+['R'];Sc:=Sc+55;end;
1450             end
1451            else Say(11,'open')
1452           else if(SepWord='s')then RL(317);
1453    29   :if(noun=27)and(noun2 in[45,26,11,68])and(SepWord='in')then
1454           if not(en('k'))then
1455            begin Ev:=Ev+['k'];RS(45);for o:=2 to NMax do
1456             if(o in cabiset)then r[o]:=55;
1457             if not(en('R'))then begin Ev:=Ev+['R'];Sc:=Sc+55;end;
1458            end
1459           else RL(216);
1460    3    :if(noun in[45,26,11])then
1461           if(en('k'))then
1462            begin RL(314);play(30,32,30);Ev:=Ev-['k'];
1463             for o:= 2 to NMax do if(o in cabiset)then r[o]:=Null;
1464            end
1465           else Say(11,'shut & locked');
1466   24,30 :if(noun in[26,11])then
1467           if(en('k'))then
1468            begin RL(324);
1469             if(cabiset=[])then RL(339)else
1470              for o:=0 to NMax do if(o in Cabiset)then writeln('a ',n[o,1])
1471            end
1472           else RL(299);
1473        end; {of 55}
1474
1475
1476 end  {of case}
1477 else SA
1478 end; {of SP9}
1479 {-------------------}
1480   procedure SpecialAnswers10;
1481
1482 begin
1483 FlagSA:='r';
1484 if Present then
1485 Case Prm of
1486
1487 56     :case verb of
1488     47  :moveto(54);
1489   2,51,58:if(noun=Null)or(noun=69)then moveto(57);
1490         end;
1491
1492 57     :case verb of
1493    46,57,2,33:if(noun=Null)or(noun=65)then
1494           begin n[68,1]:='keyhole';n[68,4]:='slot';moveto(58)end;
1495    52   :moveto(56);
1496         end;
1497
1498 58     :case verb of
1499    45,58:moveto(57);
1500    43,44,46..51,20:if(en('i'))and(en('j'))and KeyHole then
1501          begin sound(38);RS(61);ShRm:=2;moveto(59);sound(20);
1502          for o:=0 to NMax do if(r[o]=58)then r[o]:=59;
1503          if not(en('S'))then begin Ev:=Ev+['S'];Sc:=Sc+60 end end else RL(325);
1504    28   :if(noun=10)then noun:=81;
1505    11   :if(noun=68)then if KeyHole then RL(336)else RL(404);
1506         end;
1507
1508 65     :case verb of
1509    43,47:moveto(66);
1510    44,49:moveto(68);
1511    45,57:begin if not(en('w'))then begin Ev:=Ev+['w'];RL(346);end
1512                else begin RL(347);DEAD end end;
1513    46,48,50:moveto(63);
1514     58  :if(noun=Null)or(noun=65)then begin RL(342);DEAD;end;
1515     51  :begin sound(38);RL(344);delay(999);sound(20)end;
1516     52  :begin sound(30);RL(345);ShRm:=13;moveto(59);sound(20)end;
1517     14  :if(noun=63)then begin RS(65);DEAD;end;
1518     28  :if(noun=10)then noun:=81;
1519         end;
1520
1521 66     :case verb of
1522     43  :RL(343);
1523   46,50 :moveto(65);
1524   45,49 :moveto(67);
1525     47  :moveto(64);
1526     48  :moveto(63);
1527   57,44 :begin sound(25);if not(en('V'))then begin Ev:=Ev+['V'];Sc:=Sc+30;end;
1528           RS(67);writeln;moveto(69);nosound;
1529          end;
1530     58  :if(noun=Null)or(noun=65)then begin RL(342);DEAD;end;
1531     51  :begin sound(38);RL(344);delay(999);sound(20)end;
1532     52  :begin sound(30);RL(345);ShRm:=13;moveto(59);sound(20)end;
1533     14  :if(noun=63)then begin RS(65);DEAD;end;
1534     28  :if(noun=10)then noun:=81;
1535         end; {of 66}
1536
1537 67     :case verb of
1538     46  :begin RL(347);DEAD;end;
1539   43,48 :moveto(66);
1540   44,50 :moveto(68);
1541   47,49:moveto(64);
1542     58  :if(noun=Null)or(noun=65)then begin RL(342);DEAD;end;
1543     51  :begin sound(38);RL(344);delay(999);sound(20)end;
1544     52  :begin sound(30);RL(345);ShRm:=13;moveto(59);sound(20)end;
1545     14  :if(noun=63)then begin RS(65);DEAD;end;
1546     28  :if(noun=10)then noun:=81;
1547         end; {of 67}
1548
1549 end  {of case}
1550 else SA
1551 end; {of SP10}
1552 {-------------------}
1553   procedure SpecialAnswers11;
1554
1555 begin
1556 FlagSA:='r';
1557 if Present then
1558 Case Prm of
1559
1560 63     :case verb of
1561    45   :moveto(65);
1562    47   :moveto(66);
1563    49   :moveto(68);
1564   43,44,46,48,50:RL(343);
1565     58  :if(noun=Null)or(noun=65)then begin RL(342);DEAD;end;
1566     51  :begin sound(38);RL(344);delay(999);sound(20)end;
1567     52  :begin sound(30);RL(345);ShRm:=13;moveto(59);sound(20)end;
1568     14  :if(noun=63)then begin RS(65);DEAD;end;
1569     28  :if(noun=10)then noun:=81;
1570         end;
1571
1572 64     :case verb of
1573    46   :moveto(67);
1574    48   :moveto(66);
1575    50   :moveto(68);
1576   43,44,45,47,49:RL(343);
1577     58  :if(noun=Null)or(noun=65)then begin RL(342);DEAD;end;
1578     51  :begin sound(38);RL(344);delay(999);sound(20)end;
1579     52  :begin sound(30);RL(345);ShRm:=13;moveto(59);sound(20)end;
1580     14  :if(noun=63)then begin RS(65);DEAD;end;
1581     28  :if(noun=10)then noun:=81;
1582         end;
1583
1584 68     :case verb of
1585     43  :begin RL(347);DEAD;end;
1586     44  :RL(343);
1587     50  :moveto(63);
1588     49  :moveto(64);
1589   46,48 :moveto(65);
1590   45,47 :moveto(67);
1591     58  :if(noun=Null)or(noun=65)then begin RL(342);DEAD;end;
1592     51  :begin sound(38);RL(344);delay(999);sound(20)end;
1593     52  :begin sound(30);RL(345);ShRm:=13;moveto(59);sound(20)end;
1594     14  :if(noun=63)then begin RS(65);DEAD;end;
1595     28  :if(noun=10)then noun:=81;
1596         end;
1597
1598 69     :case verb of
1599   28,27 :if(noun in[10,21,81,36])then RL(351);
1600    11   :if(noun in[10,21,81,36,20,25])then RL(352)else
1601          if(noun=65)then RL(353);
1602   43,58 :moveto(70);
1603         end;
1604
1605 70     :case verb of
1606   44,57,2,33:if(noun=Null)or(noun=65)then moveto(69)else
1607          if(noun in[69,50])then moveto(71);
1608   43,47,48:RL(354);
1609   49,52 :moveto(71);
1610     11  :if(noun=65)then RL(353)
1611          else if(noun=68)then if KeyHole then RL(336)else RL(404);
1612        end;
1613
1614 71     :case verb of
1615   48,51,58:moveto(70);
1616     45  :moveto(72);
1617     11  :if(noun=58)then RL(386)else
1618          if(noun=25)then RL(418);
1619    28,27:if(noun in[10,36])then begin RL(387);
1620           for o:=1 to random(12)+4 do play(random(250),random(250),random(30))
1621          end;
1622     39  :if(noun=25)then begin RL(387);
1623           for o:=1 to random(99)+75 do
1624            begin x:=random(9999);play(x,x,random(19)+10);delay(5)end
1625          end
1626         end;{ of 71}
1627
1628 end  {of case}
1629 else SA
1630 end; {of SP11}
1631 {-------------------}
1632   procedure SpecialAnswers12;
1633
1634 begin
1635 FlagSA:='r';
1636 if Present then
1637 Case Prm of
1638
1639 11      :case verb of
1640    5,45,47,48,50:if FlasOff then RL(14)
1641           else case verb of
1642           48:moveto(9);47:moveto(13);
1643           5:if(29 in inven)or(40 in inven)or(2 in inven)then
1644                     RL(58)
1645                   else begin RL(18); moveto(12);end;
1646           50:RL(17);
1647           45:if(en('C'))then moveto(14) else RL(144);
1648             end;
1649    31   :if(input='nepo egassap')and not(en('C'))then
1650              begin Ev:=Ev+['C']; RS(11);Sc:=Sc+35;end;
1651   11 :if(noun in [79,72])then if(en('C'))then RL(270)else RS(13);
1652   27,28:if(noun in [79,72])then RL(26);
1653   17,0,6:if(noun in [79,72])then RL(27);
1654   38  :if(noun in [79,72])then RL(30);
1655           end; {of 11}
1656
1657 12     :case verb of
1658   4,47 :if FlasOff then RL(14)
1659            else case verb of
1660              4:begin RL(18); moveto(11);end;
1661                47   :RL(17);
1662                 end;
1663   43..46,48..52  :if FlasOff then RL(14);
1664    14  :if(noun in[70,1])and not(en('G'))then
1665          begin noun:=70;Ev:=Ev+['G'];Sc:=Sc+40;end;
1666    7   :if not(en('G'))then begin Ev:=Ev+['G'];RL(157);
1667           FlagSA:='r';verb:=14;noun:=70;Sc:=Sc+40;end;
1668           end; {of 12}
1669
1670 13      :case verb of
1671    50    :if flasoff then RL(14)
1672             else begin moveto(11); Ev:=Ev-['q'];end;
1673    43    :if(en('q'))then begin RL(24); DEAD;end
1674             else begin RL(23); Ev:=Ev+['q'];end;
1675    52,19,33:RL(42);
1676   14    :if(noun=47)then RL(25);
1677   9   :begin RL(68);vanish(noun);end;
1678           end;{of 13}
1679
1680 17       :case verb of
1681    51,19,2:RL(15);
1682    45    :if(flasoff)then RL(14)else moveto(18);
1683           end;
1684
1685 18      :case verb of
1686    46    :if(flasoff)then RL(14)else moveto(17);
1687   49,52  :if(flasoff)then RL(14)else begin RL(308);moveto(19);end;
1688    47    :if(flasoff)then RL(14)else
1689            if not(en('F'))then begin RS(19);writeln;moveto(21);
1690             Ev:=Ev+['F'];Sc:=Sc+10;end
1691            else moveto(21);
1692   11     :if(noun in[79,50])then RL(254);
1693          end;{of 18}
1694
1695 end  {of case}
1696 else SA
1697 end; {of SP12}
1698 {-------------------}
1699   procedure SpecialAnswers13;
1700
1701 begin
1702 FlagSA:='r';
1703 if Present then
1704 Case Prm of
1705
1706 2         :case verb of
1707    46     :moveto(1);
1708    45, 44 :RL(1);
1709    19,2   :if(noun in[53,6,64,73])then begin RL(0);DEAD;end;
1710   14,27 :if noun=14 then RL(2)else
1711          if(noun in[1,40])and(40 in p[2])then
1712             begin noun:=40;Sc:=Sc+10;Verb:=14;RL(417);FlagSA:='r' end;
1713    11   :if(noun in[66,46])then RL(11);
1714    26   :if noun=14then RL(13);
1715          end;
1716
1717 31     :case verb of
1718    48,58:moveto(25);
1719    14   :if not(en('I'))and(noun in[7,1])then
1720            begin Ev:=Ev+['I'];noun:=7;Sc:=Sc+5 end;
1721  23,24,11:if(noun=84)then RL(152)else
1722           if(noun=22)then RL(415);
1723        end;
1724
1725 32     :case verb of
1726    43,58:moveto(25);
1727  11,23  :case Noun of
1728           61:if(en('H'))then RL(153) else begin Ev:=Ev+['H'];r[34]:=32;
1729                RL(154);Sc:=Sc+15;end;
1730          end;{of Noun case}
1731        end;
1732
1733 34    :case verb of
1734    45,58:moveto(25);
1735    14   :if(noun=74)and(74 in P[34])then begin P[34]:=P[34]-[74];
1736            inven:=inven+[74];RL(138);Sc:=Sc+25;end;
1737    42   :if(noun=74)and(74 in P[34])then RL(175);
1738    28,27:if(noun in[10,36])then begin RL(387);
1739           for o:=1 to random(12)+4 do play(random(250),random(250),random(30))
1740          end;
1741    39   :if(noun=25)then begin RL(387);
1742           for o:=1 to random(99)+75 do
1743            begin x:=random(9999);play(x,x,random(19)+10);delay(5)end
1744          end;
1745    11   :case noun of
1746           0:RL(139);
1747           25:RL(418);
1748           21:begin;RL(140);RL(141);end;
1749           68:if(SlotCon=Null)then RL(143) else
1750               begin SA;writeln('The slot contains a ',n[SlotCon,1],'.')end;
1751           58:if(SlotCon=77)and not(en('x'))then
1752               begin Ev:=Ev+['x'];Sc:=Sc+5;RS(75)end
1753              else if(SlotCon=77)then RS(77)else RL(385)
1754          end
1755        end;
1756
1757 0         :case verb of
1758    45     :MoveTo(1);
1759    44     :begin TextColor(m8);writeln('Casino Hall');TextColor(m2);RS(0)end;
1760   19,2    :if(noun in[53,6,64,73])then begin RL(0);DEAD;end;
1761   11    :if(noun=73)then RL(19);
1762          end;
1763
1764 1        :case verb of
1765    46     :moveto(0);
1766    45     :moveto(2);
1767    43,57  :moveto(3);
1768    6,17   :if(noun=57)and(here(40))and((noun2=40)or(noun2=Null))then
1769            begin RS(16);Sc:=-500;
1770             Loc:='Locked Cabin';Verbose:=True;inven:=[];KitSet:=KitSet-[57];
1771             n[57,1]:='plastic card';n[57,2]:='card';n[57,3]:='plastic';
1772             n[57,4]:='elevato card';n[57,5]:='elevato';r[57]:=76;moveto(76)
1773            end;
1774  33,19,2  :if(noun in[6,53,64])then moveto(3)
1775           end;
1776
1777 end  {of case}
1778 else SA
1779 end; {of SP13}
1780 {-------------------}
1781   procedure SpecialAnswers14;
1782
1783 begin
1784 FlagSA:='r';
1785 if Present then
1786 Case Prm of
1787
1788 49     :case verb of
1789     43  :moveto(45);
1790   44,57 :begin RL(290);moveto(50);n[36,1]:='lever';n[36,2]:='handle';end;
1791   45..50:RL(291);
1792     11  :if(noun in[26,50])then RL(292);
1793     2   :if(noun=72)then RL(312);
1794     12  :if(noun=72)then RL(313);
1795         end;
1796
1797 59     :case verb of
1798    43..50:begin o:=random(8)+3;writeln('You travel about ',o,' miles...');
1799            if(random(4)=2)then ShRm:=13 else ShRm:=Random(15);moveto(59)end;
1800    52,57:RL(341);
1801     58  :if(noun=Null)or(noun=65)then begin RL(342);DEAD;end;
1802     51  :begin sound(30);
1803           if not(en('U'))then begin RS(64);writeln;Ev:=Ev+['U'];Sc:=Sc+45;end
1804           else RL(349);moveto(63);sound(20)end;
1805     14  :if(noun=63)then begin RS(65);DEAD;end;
1806     28  :if(noun=10)then noun:=81;
1807         end; {of case 59}
1808
1809 72     :case verb of
1810     46  :moveto(71);
1811   43,44,58:moveto(73);
1812     45  :moveto(74);
1813         end;
1814
1815 73     :case verb of
1816   43,45,58:moveto(72);
1817     46  :moveto(73);
1818     44  :begin moveto(74);if(MnRm=Null)then RL(356);end;
1819         end;
1820
1821 74     :case verb of
1822   43,45 :moveto(73);
1823   46,58 :moveto(74);
1824     44  :if(MnRm=Null)then begin Verbose:=False;Moveto(75);Verbose:=True;
1825           RS(69);MnRm:=75;Attack:=False end else moveto(75);
1826         end;
1827
1828 75     :case verb of
1829   43,58 :moveto(74);
1830    11   :if(noun in[14,61])then RL(364);
1831         end;
1832
1833 76     :case verb of
1834    43   :RL(114);
1835    11   :if(noun=26)then RL(271)else
1836          if(noun=57)then RL(408);
1837         end;
1838
1839 end  {of case}
1840 else SA
1841 end; {of SP14}
1842 {===================}
1843 procedure ScreenDraw_PlayerInput;
1844   begin
1845    gotoxy(1,23);
1846    writeln;
1847    TextColor(m5);
1848    write(chr(175),' ');
1849
1850    {Window(1,1,80,25);}
1851
1852    gotoxy(1,1);
1853    textcolor(m4);
1854    TextBackGround(m6);
1855
1856    gotoxy(10,1);
1857    writeln(Tic,'  ');
1858
1859    gotoxy(20,1);
1860    writeln(Sc,' ');
1861
1862    gotoxy(35-(length(Loc)div 2),1);
1863    writeln('     ',Loc,'     ');
1864
1865
1866    gotoxy(2,24);
1867    TextBackGround(0);
1868    Window(1,2,80,25);
1869    textcolor(m1);
1870
1871    {BufLen:=77;}
1872    if(Loc<>'Civilization!')then
1873         READLN(LINE)
1874         else repeat;
1875         until false;
1876    if(Line='r') or (Line='repeat') then Line:=Again
1877    else Again:=Line;
1878
1879
1880
1881    TextColor(m3);
1882    writeln(chr(175));
1883    TextColor(m2);
1884
1885
1886   end;
1887 {-------------------}
1888
1889
1890 BEGIN
1891 clrscr;
1892 assign0;
1893 assign1;
1894 assign2;
1895 assign3;
1896 assign4;
1897 assign5;
1898 assign6;
1899 assign7;
1900 assign8;
1901 Initialize;
1902
1903                             {*****} repeat {*****}
1904
1905 if Skip then Time;
1906 {writeln;}
1907
1908 if(length(Line)=0)then begin
1909  ScreenDraw_PlayerInput;
1910  while pos(' then ',Line)>0 do
1911   begin
1912    x:=pos('then ',Line);
1913    delete(Line,x,4);
1914    insert('.',Line,x)
1915   end;
1916  LowerCase(Line);
1917  Format(Line);
1918  Chop(Line);
1919 end;
1920 if(pos('.',Line)>0)then begin
1921   Input:=copy(Line,1,pos('.',Line));
1922   delete(Line,1,pos('.',Line));
1923   delete(Input,pos('.',Input),1);
1924 end else
1925  begin
1926   Input:=Line;
1927   Line:=''
1928  end;
1929 Input:=Input+' ';
1930 while pos(' it ',Input)>0 do
1931  begin
1932  x:=pos(' it ',Input)+1;
1933  delete(Input,x,2);
1934  insert(LastNoun,Input,x);
1935  Format(Input);Chop(Input);
1936  end;
1937 if(Input[length(Input)]=' ')then delete(Input,length(Input),1);
1938
1939
1940
1941 Check(SepWord);
1942
1943 if Flag = 'g' then
1944   begin
1945     case Prm of
1946       3..4                :SpecialAnswers1;
1947       5..10               :SpecialAnswers2;
1948       14..16              :SpecialAnswers3;
1949       19..24              :SpecialAnswers4;
1950       25,27..29,33        :SpecialAnswers5;
1951       30                  :SpecialAnswers6;
1952       26,35..40           :SpecialAnswers7;
1953       41..48              :SpecialAnswers8;
1954       50..55              :SpecialAnswers9;
1955       56..58,60..62,65..67:SpecialAnswers10;
1956       63,64,68..71        :SpecialAnswers11;
1957       11..13,17,18        :SpecialAnswers12;
1958       0..2,31,32,34       :SpecialAnswers13;
1959       49,59,72..76        :SpecialAnswers14
1960     end;
1961
1962     if FlagSA <> 's' then
1963       case Verb of
1964        11,18,22,41,43..52,57,58    :DefaultAnswers1;
1965        29                          :DefaultAnswers2;
1966        1,2,8,12,13,15,16,19,21,
1967         23..25,31,33,34,38,40,60,63:DefaultAnswers3;
1968        3,6,7,20,30,35,53..56,59    :DefaultAnswers4;
1969        9,26                        :DefaultAnswers5;
1970        27,28,62                    :DefaultAnswers6;
1971        14,64,4,5                   :DefaultAnswers7;
1972        0,10,17,42,39               :DefaultAnswers8;
1973        32                          :DefaultAnswers9;
1974        36,37,61,65                 :DefaultAnswers10;
1975       end;
1976   end;
1977
1978                          {*****} until False {*****}
1979
1980 END. {of program}