OSDN Git Service

翻訳
[beyond-jp/beyond-jp.git] / COMMANDS.PAS
1 {//-------------------------------------------------------------------------}
2 {/*                                                                         }
3 {Copyright (C) 1990, 2009 - Apogee Software, Ltd.                           }
4 {                                                                           }
5 {This file is part of Supernova.  Supernova is free software; you can       }
6 {redistribute it and/or modify it under the terms of the GNU General Public }
7 {License as published by the Free Software Foundation; either version 2     }
8 {of the License, or (at your option) any later version.                     }
9 {                                                                           }
10 {This program is distributed in the hope that it will be useful,            }
11 {but WITHOUT ANY WARRANTY; without even the implied warranty of             }
12 {MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                       }
13 {                                                                           }
14 {See the GNU General Public License for more details.                       }
15 {                                                                           }
16 {You should have received a copy of the GNU General Public License          }
17 {along with this program; if not, write to the Free Software                }
18 {Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.}
19 {                                                                           }
20 {Original Source: 1990 Scott Miller                                         }
21 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }
22 {*/                                                                         }
23 {//-------------------------------------------------------------------------}
24 {****************************************************************************}
25 {*                                COMMANDS                                  *}
26 {*                            by Scott Miller                               *}
27 {*  These are misc procedures and functions used with the main file: AdGame *}
28 {*                        Copyright 1984 Pending                            *}
29 {****************************************************************************}
30
31 procedure SA;
32    begin FlagSA:='s' end;
33
34 function En(c : char) : boolean;
35    begin
36      if(c in Ev)then En:=True else En:=False
37    end;
38
39 function Here(noun : integer): Boolean;
40    begin
41      if(noun in Inven)or(r[noun]=Prm)or(noun in p[Prm])then Here:=True
42      else Here:=False
43    end;
44
45 procedure Crazy;
46    begin SA;
47     if(random(2)=1)then RL(107+random(7))else RL(300+random(6));
48    end;
49
50 procedure DEAD;
51     var b,c:integer;
52    begin SA; NoSound;
53      gotoxy(1,25);for x:=1 to 7 do writeln;
54      Textcolor(1);Textbackground(m9);
55      gotoxy(1,18);
56      write('*********************************************************',
57            '***********************');writeln;
58      gotoxy(1,19); for x:=1 to 3 do
59      write('*                                                        ',
60              '                      *');writeln;
61      gotoxy(1,22);
62      write('*********************************************************',
63            '***********************');writeln;
64      TextColor(m0);gotoxy(27,20);writeln('\82 \82È\82½\82Í\8e\80\82ñ\82Å\82µ\82Ü\82Á\82½!!!');
65      Textcolor(m2);Textbackground(0);
66      for c:=700 downto 20 do for b:=70 downto 1 do sound(b*c);nosound;
67      close(Rooms1);close(rooms2);close(special1);close(special2);close(line1);
68      gotoxy(1,23);DelLine;DelLine;writeln;write('\82â\82è\92¼\82µ\82Ü\82·\82©? ');
69      flag := readkey;
70      if(upcase(flag)<>'N')then
71       begin
72        writeln('Restarting...');window(1,1,80,25);
73        halt(executeProcess(ParamStr(0), '', []));
74       end
75      else
76       begin
77        textcolor(7);
78        textbackground(0);
79        window(1,1,80,25);
80        clrscr;
81        writeln('    Beyond the Titanic');
82        writeln('A Scott Miller Production');
83        writeln('    Have a nice day...');
84        delay(2000);
85        halt(0);
86       end
87    end;
88
89 procedure Home;
90   var b,c:integer;
91    begin SA;
92      gotoxy(1,25);for x:=1 to 7 do writeln;
93      Textcolor(25);Textbackground(m7);
94      gotoxy(1,18);
95      write('#########################################################',
96            '#######################');writeln;
97      gotoxy(1,19); for x:=1 to 3 do
98      write('#                                                        ',
99              '                      #');writeln;
100      gotoxy(1,22);
101      write('#########################################################',
102            '#######################');writeln;
103      TextColor(31);gotoxy(25,20);writeln('Y O U   H A V E   W O N ! ! !');
104      Textcolor(m2);Textbackground(0);
105      gotoxy(1,23);DelLine;DelLine;writeln;
106      for x:=150 downto 1 do begin sound(x*55);delay(8);nosound;delay(20)end;
107      if(Sc>1000)then Sc:=1000;
108      write('You finished with a score of ',Sc,', which makes you a ');
109      if(Sc=1000)then
110       begin writeln('Perfect Adventurer!!!');
111         for y:=1 to 7 do
112          for o:=0 to 20 do
113            for x:= 99+(o*430)to 998+(o*430)do begin sound(25);sound(x)end
114       end
115      else writeln('Master Adventurer!');
116      for c:=1 to 999 do for b:=1 to 61 do sound(b*c);nosound;
117      writeln;nosound;
118      writeln('Reboot your computer to regain control...')
119   end;
120
121 procedure Say(o : integer; p : Str16);
122    begin
123      writeln('The ',n[o,1],' is already ',p,'.'); SA
124    end;
125
126 procedure Diagnose;
127    begin
128      RL(191);
129      if((tic>42)and not(en('c')))or((tic>146)and not(en('n')))or(en('r'))then
130       begin
131        if(tic>42)and (not(en('c')))then RL(192)
132         else if(tic>146)and not(en('n'))then RL(192);
133        if(en('r'))then RL(51)
134       end
135      else RL(207)
136    end;
137
138 procedure Monster(var NewRm : integer);
139    begin
140     if(NewRm=MnRm)and(MnRm=25)then begin Attack:=False;RL(384)end else
141     if(NewRm<>35)or not(en('v'))then
142      begin
143       p[Prm]:=p[Prm]-[23];p[NewRm]:=p[NewRm]+[23];MnRm:=NewRm;Attack:=False;
144        if not((NewRm=30)and(Verb in[27,28]))then
145         case random(7) of
146          0:RS(71);1:RS(72);2:RL(359);3:RL(360);4:RL(361);5:RL(362);6:RL(363)
147         end
148      end
149     else begin RL(383);Attack:=False end
150    end;
151
152 procedure DescribeRm;
153    var o : integer;
154   procedure s(r : Str16);
155      begin TextColor(m8);writeln(r);TextColor(m2);loc:=r;end;
156    begin SA;
157 if((en('a'))and(here(29)))or not(Prm in [6..24])then begin
158      case Prm of
159 0:s('\91D\82Ì\91O\95û');1:s('\91D\82Ì\92\86\89\9b');2:s('\91D\82Ì\8cã\95û');
160 3:s('\8b~\96½\83{\81[\83g');4:s('\8aC\82Ì\8fã');5:s('\8dL\82¢\93´\8cA');
161 6:s('\9e\99\82Ì\93´\8cA');7:s('\8aC\82Ì\92ê');8:s('\8db\8d\82\82¢\89¹\82Ì\93´\8cA');
162 9:s('Stream Bend');10:s('Waterfall');13:s('Sloppy Cave');
163 11:s('Hex Cave');12:s('Shallow Cleft');20:s('Zoo');
164 14:s('Winding Tunnel');15:s('Chasm');17:s('Chasm Bottom');
165 18:s('Tiny Opening');19:s('Etched Stairs');
166 21:s('Edge of Saucer');22:s('Side of Saucer');
167 23:s('Top of Saucer');24:s('Airlock');16:s('End of Rope');
168 76:s('Locked Cabin');25:s('Central Entry');
169 26:s('Lower Entry');27:s('Ship''s Systems');
170 30:s('Time Chamber');28:s('Ship''s Lab');34:s('Bridge');
171 29:s('Inside Tube');31:s('Life Support');58,69:s('Inside Shuttle');
172 32:s('Supply Chamber');33:s('Sleep Chamber');
173 35:s('Engine Room');36:s('Cargo Deck #1');37:s('Cargo Deck #2');
174 38:s('Cargo Deck #3');39:s('Cargo Deck #4');40:s('Large Cage');
175 41:s('Wooden Bridge');42:s('Broken End');43:s('South End');
176 44..46:s('Deserted Road');47:s('Crater Edge');48:s('Crater Floor');
177 49:s('Building Front');50:s('Lobby');51..54:s('Office Room');
178 55:s('Basement');56:s('Ladder Room');57:s('Building Roof');
179 59:case ShRm of 0:s('Above Mud Lake');
180 1:s('Above Rubble');2:s('Above Desert');3:s('Above Pits');
181 4:s('Above River');5:s('Above Stream');6:s('Above Town');
182 7:s('Above Mountain');8:s('Above Crator');9:s('Above Hills');
183 10:s('Above Canyon');11:s('Above Flatland');12:s('Above Dry Lake');
184 13:s('Above Desert');14:s('Above Bridge')end;{of Above Rooms}
185 63,64:s('Above Clouds');65..68:s('Outside City');70:s('Landing Bay');
186 71:s('Power Plant');72..74:s('Dark Corridor');75:s('Food Supply')
187      end; {of case}
188
189     if Verbose then begin FlagSA:='r';
190       case Prm of
191        2 :if(40 in p[2])then begin RR(2);RL(416)end;
192        4 :if(en('B'))then RR(4)else begin RR(4);
193            writeln('  \88À\91S\83x\83\8b\83g\82ª\8c©\82¦\82é\81B')end;
194        11:if(en('C'))then RS(15);
195        40:if(en('g'))then RS(17);
196        12:if not(en('G'))then begin RR(12);RL(146)end;
197        31:if not(en('I'))then begin RR(31);RL(156)end;
198        34:if(74 in p[34])then begin RR(34);RL(273)end;
199        35:if(77 in p[35])then begin RR(35);RL(381);RL(382)end else
200            if(en('W'))then begin RR(35);RL(381)end;
201        42:if(13 in p[42])then begin RR(42);RL(214)end;
202        48:if(27 in p[48])then begin RR(48);RL(276)end;
203        59..69:begin SA;
204                if(Prm=59)and not(ShRm in RmSh)then
205                 begin RmSh:=RmSh+[ShRm];RS(ShRm+46)end
206                else if(Prm<>59)then RR(Prm);
207                if KeyHole and here(63)then
208                 writeln('The shiny key is in the keyhole.')
209               end
210        else RR(Prm)
211       end; {of case}
212       if(FlagSA='r')and(Prm<>59)then RR(Prm)end;
213
214      for o:= 0 to NMax do begin
215        if(o in Mov)then
216          if(r[o]=Prm)then
217           if not((Prm in[59..69])and(KeyHole)and(o=63))then
218            begin writeln('There is a ',n[o,1],' here.');
219             if(here(ropecon))and(o=ropecon)and not(ropecon in inven)then
220              writeln('  The rope is attatched to the ',n[o,1],'.');
221             if(en('d'))and(o=70)and(here(70))then RL(147);
222             if(o=SlotCon)and(here(o))then RL(388);
223             if(o in CabiSet)and(here(o))then RL(389);
224             if(o=PanelCon)and(here(o))then RL(390);
225             if(o in KitSet)and(here(o))then RL(391);
226            end
227      end end
228     else RL(54)
229    end;  {of DescribeRm}
230
231 procedure SAVE;
232    begin SA; for x:=1 to 24 do writeln; nosound;
233    window(1,3,80,25);
234    gotoxy(1,4);
235    if(Drive='A:')then
236     writeln('\83h\83\89\83C\83uA:\82©\82ç\83Q\81[\83\80\83f\83B\83X\83N\82ð\94²\82«\81A\95Û\91\83f\83B\83X\83N\82ð\91}\93ü\82µ\82Ä\82­\82¾\82³\82¢\81B')else
237     writeln('\83h\83\89\83C\83uB:\82É\95Û\91\83f\83B\83X\83N\82ª\91}\93ü\82³\82ê\82Ä\82¢\82é\82©\8am\94F\82µ\82Ä\82­\82¾\82³\82¢\81B');
238    writeln('  (\89½\82©\83L\81[\82ð\89\9f\82·\82Æ\91±\82¯\82Ü\82·\81c)');flag:=readkey;
239    writeln;writeln;
240    write('Save under what name? ');readln(input);
241    while pos(' ',input)>0 do delete(input,pos(' ',input),1);
242    while pos('.',input)>0 do delete(input,pos('.',input),1);
243    if(input='')then input:='LastRoom';
244    writeln;writeln;input:=Drive+input;
245    while pos(':',input)>0 do input[pos(':',input)] := '_';
246    writeln('If your SAVE/RESTORE disk is in drive ',Drive,
247             ' then press any key to start.');
248    flag := readkey;
249    with DiskSave do
250     begin
251      aInven:=Inven;aKitSet:=KitSet;aCabiSet:=CabiSet;aPanelCon:=PanelCon;
252      aSlotCon:=SlotCon;aCompCon:=CompCon;aRopeCon:=RopeCon;aTic:=Tic;
253      aYearDial:=YearDial;aPrm:=Prm;aMnRm:=MnRm;aSc:=Sc;aShots:=Shots;
254      aShRm:=ShRm;aRx:=Rx;aEv:=Ev;aCode:=Code;aLoc:=Loc;aKeyHole:=KeyHole;
255     end;
256    assign(GameSave,input+'.a');
257    rewrite(GameSave);
258    write(GameSave,DiskSave);
259    close(GameSave);
260    assign(Objects,input+'.b');
261    rewrite(Objects);
262    for x:=0 to RMax do write(Objects,p[x]);
263    close(Objects);
264    assign(WordList,input+'.c');
265    rewrite(Wordlist);
266    for x:= 0 to NMax do
267     for y:= 1 to 5 do
268      write(WordList,n[x,y]);
269    for x:= 0 to VMax do
270     for y:= 1 to 10 do
271      write(WordList,v[x,y]);
272    close(WordList);
273    assign(Things,input+'.d');
274    rewrite(Things);
275    for x:= 0 to NMax do write(Things,r[x]);
276    close(Things);
277    writeln; delete(input,1,2);
278    writeln('Your present game location is now',
279            ' SAVED to disk under the name ''',input,'.''');
280    if(Drive='A:')then begin writeln;
281     writeln('Remove the SAVE/RESTORE disk and insert your GAME disk.')end;
282    writeln('  (Press any key to continue...)');flag := readkey;
283    writeln;writeln;
284    if(Verb<>54)then writeln('You may now resume your game...');
285    if(Line='')then Line:='look';Tic:=Tic-2;Back:=True;
286    if(Prm in[59..68])then sound(20);
287    window(1,2,80,25)
288    end; {of Save}
289
290 procedure RESTORE;
291  function Exist:Boolean;
292  begin
293  assign(GameSave,input+'.a');
294  {$I-}
295  Reset(GameSave);
296  {$I+}
297  Exist:=(IOresult=0)
298  end;
299    begin SA; for x:=1 to 24 do writeln; nosound;
300    window(1,3,80,25);gotoxy(1,4);
301    if(Drive='A:')then
302     writeln('\83h\83\89\83C\83u',Drive,'\82©\82ç\83Q\81[\83\80\83f\83B\83X\83N\82ð\94²\82«\81A\95Û\91\83f\83B\83X\83N\82ð\91}\93ü\82µ\82Ä\82­\82¾\82³\82¢\81B')else
303     writeln('\83h\83\89\83C\83uB:\82É\95Û\91\83f\83B\83X\83N\82ª\91}\93ü\82³\82ê\82Ä\82¢\82é\82©\8am\94F\82µ\82Ä\82­\82¾\82³\82¢\81B');
304    writeln('  (\89½\82©\83L\81[\82ð\89\9f\82·\82Æ\91±\82¯\82Ü\82·\81c)');flag := readkey;
305    writeln;writeln;
306    write('\95\9c\8bA\82·\82é\83t\83@\83C\83\8b\82Ì\83t\83@\83C\83\8b\96¼\82Í? ');readln(input);
307    while pos(' ',input)>0 do delete(input,pos(' ',input),1);
308    while pos('.',input)>0 do delete(input,pos('.',input),1);
309    if(input='')then input:='LastRoom';
310    writeln;writeln;input:=Drive+input;
311    while pos(':',input)>0 do input[pos(':',input)] := '_';
312    writeln('\83h\83\89\83C\83u',Drive,'\82É\95Û\91\83f\83B\83X\83N\82ª\91}\93ü\82³\82ê\82Ä\82¢\82ê\82Î',
313            '\89½\82©\83L\81[\82ð\89\9f\82µ\82Ä\82­\82¾\82³\82¢\81B');
314    flag := readkey;
315    if Exist then
316     begin
317      close(GameSave);
318      assign(GameSave,input+'.a');
319      reset(GameSave);
320      read(GameSave,DiskSave);
321      close(GameSave);
322      with DiskSave do
323       begin
324        Inven:=aInven;KitSet:=aKitSet;CabiSet:=aCabiSet;PanelCon:=aPanelCon;
325        SlotCon:=aSlotCon;CompCon:=aCompCon;RopeCon:=aRopeCon;Tic:=aTic;
326        YearDial:=aYearDial;Prm:=aPrm;MnRm:=aMnRm;Sc:=aSc;Shots:=aShots;
327        ShRm:=aShRm;Rx:=aRx;Ev:=aEv;Code:=aCode;Loc:=aLoc;KeyHole:=aKeyHole;
328       end;
329      assign(Objects,input+'.b');
330      reset(Objects);
331      for x:=0 to RMax do read(Objects,p[x]);
332      close(Objects);
333      assign(WordList,input+'.c');
334      reset(Wordlist);
335      for x:= 0 to NMax do
336       for y:= 1 to 5 do
337        read(WordList,n[x,y]);
338      for x:= 0 to VMax do
339       for y:= 1 to 10 do
340        read(WordList,v[x,y]);
341      close(WordList);
342      assign(Things,input+'.d');
343      reset(Things);
344      for x:= 0 to NMax do read(Things,r[x]);
345      close(Things);
346      writeln; delete(input,1,2);
347      writeln('\83t\83@\83C\83\8b',input,'\82ð\95Û\91\82µ\82½\88Ê\92u\82É\95\9c\8bA\82µ\82Ü\82µ\82½\81B');
348      if(Drive='A:')then begin writeln;
349       writeln('\95Û\91\83f\83B\83X\83N\82ð\94²\82¢\82Ä\83Q\81[\83\80\83f\83B\83X\83N\82ð\91}\93ü\82µ\82Ä\82­\82¾\82³\82¢\81B')end;
350      writeln('  (\89½\82©\83L\81[\82ð\89\9f\82·\82Æ\91±\82¯\82Ü\82·\81c)');flag := readkey;
351     end
352    else
353     begin writeln;TextColor(28);
354      writeln('             \82»\82Ì\96¼\91O\82Ì\83t\83@\83C\83\8b\82Í\95Û\91\83f\83B\83X\83N\82É\91\8dÝ\82µ\82Ü\82¹\82ñ\81B',^g);
355      TextColor(m2);writeln;
356      if(Drive='A:')then
357       writeln('\83Q\81[\83\80\83f\83B\83X\83N\82É\96ß\82µ\82Ä\89½\82©\83L\81[\82ð\89\9f\82µ\82Ä\82­\82¾\82³\82¢\81B')
358      else writeln('  (\89½\82©\83L\81[\82ð\89\9f\82·\82Æ\91±\82¯\82Ü\82·\81c)');
359      flag := readkey;
360     end;
361    writeln;writeln;writeln('\83Q\81[\83\80\82É\96ß\82è\82Ü\82·\81c');
362    if(Line='')then Line:='look';Tic:=Tic-2;Back:=True;
363    if(Prm in[59..68])then sound(20);
364    window(1,2,80,25)
365    end; {of Restore}
366
367 procedure Vanish(o : integer);
368    begin SA;
369      inven:=inven-[o];
370      r[o]:=Null;
371      p[Prm]:=p[Prm]-[o];
372      if(o=7)and not(en('I'))then Ev:=Ev+['I'];
373      if(o=13)and(13 in p[42])then p[42]:=p[42]-[13];
374      if(o=PanelCon)then PanelCon:=Null;
375      if(o=SlotCon)then SlotCon:=Null;
376      if(o in CabiSet)then CabiSet:=CabiSet-[o];
377      if(o in kitset)then kitset:=kitset-[o];
378      if(o=63)and KeyHole then KeyHole:=False;
379      if(o=74)then Ev:=Ev-['p'];
380      if(o=89)then Ev:=Ev-['i'];
381      if(o=RopeCon)and(verb=36)then begin RopeCon:=Null;RL(402)end;
382      if(o=RopeCon)and not(Verb in[9,14])then RopeCon:=Null
383    end;
384
385 procedure Play( Start, Stop, Wait: integer);
386    var x : integer;
387    begin
388     if(Start<=Stop)then
389      for x:= Start to Stop do
390       begin sound(x); delay(Wait); end
391     else
392      for x:= Start downto Stop do
393       begin sound(x); delay(Wait); end;
394     if(Prm in[59..68])then sound(20)else nosound
395    end; {of Play}
396
397 procedure DropAll;
398    var o : integer;
399    begin
400      for o:= 0 to NMax do
401        if(o in inven)then
402          begin
403            r[o]:=Prm;
404            inven:=inven-[o];writeln(n[o,1],': Dropped.');
405          end;
406      RL(106);
407    end;  {of DropAll}
408
409 function FlasOff : Boolean;
410    begin
411      if not(En('a'))then FlasOff:=True
412      else
413        if(r[29]=Prm)or(29 in inven)then FlasOff:=False
414        else FlasOff:=True;
415    end;
416
417 procedure MoveTo(NewRm : integer);
418  var o : integer;
419  begin
420    if(57 in inven)and(ropecon<>Null)and not(ropecon in inven)
421      and(ropecon in mov)and not(ropecon=70)then
422       begin r[ropecon]:=Prm;RL(158);end
423    else if(57 in inven)and(ropecon<>Null)and(not(ropecon in mov)or
424         ((ropecon=70)and(en('d'))))then
425           begin RL(55);inven:=inven-[57];r[57]:=Prm;end
426    else if not(57 in inven)and((ropecon in inven)or
427           (ropecon in[60,56,44]))then r[57]:=NewRm
428    else if not(57 in inven)and(r[57]=Prm)and(r[ropecon]=NewRm)then
429           begin r[57]:=NewRm;RopeOld:=Prm;end
430    else if not(57 in inven)and(r[57]=Prm)and(NewRm=RopeOld)and
431               (r[ropecon]=Prm)then
432           begin r[57]:=RopeOld;RopeOld:=Null;end;
433    if(ropecon=Null)or((NewRm<>RopeOld)and(Prm<>RopeOld))then RopeOld:=Null;
434    if(MnRm<>Null)then Monster(NewRm);
435    if(Prm in[63..68])and not(NewRm in[59,69])then RL(343);
436    if(Prm in[59,63..68])then for o:=0 to NMax do if(r[o]=Prm)then r[o]:=NewRm;
437    Prm:=NewRm;
438    DescribeRm
439  end;  {of MoveTo}
440
441 procedure Time;
442    begin
443      Tic:=Tic+1;
444   case Tic of
445     3:RL(280);
446     4:RS(1);
447     17:if not(en('A'))then begin RS(3);DEAD end else RS(5);
448     19:RL(4);
449     20:RL(5);
450     21:RL(6);
451     23:RS(6);
452     24:if(en('B'))then begin RS(8);writeln;RL(16);moveto(5);Sc:=Sc+25;
453          n[64,5]:='ship';v[26,2]:='pick' end
454        else begin RS(7);DEAD;end;
455     43:if(not(en('c'))and not(en('n')))then RL(31);
456     73:if(not(en('c'))and not(en('n')))then RL(32);
457     93:if(not(en('c'))and not(en('n')))then begin RL(33); DEAD end;
458     99:if(Prm in[6..24])and(here(29))and not(flasoff)and(not(en('s')))then
459          begin RL(41);Ev:=Ev+['s'] end;
460     147:if not(en('n'))then RL(31);
461     149:if(here(29))and not(flasoff)then RL(59);
462     153:if(Prm in[6..23])and(here(29))and not(flasoff)then
463           begin RS(14);vanish(29) end;
464     170:if not(en('n'))then RL(32);
465     181:if not(en('n'))then begin RL(33); DEAD end;
466     549:RL(281);
467     586:RL(282);
468     598:RL(283);
469     607:begin RL(284);DEAD;end;
470   end; {of case}
471
472 case Prm of
473     1..3:if(tic>4)and(random(4)=1)then RL(405);
474   36..39:if(random(5)=2)then RL(219);
475      7  :if(random(8)=2)then RL(266);
476      8  :if(random(3)=2)then begin RL(265);play(6666,7000,0);end;
477   13..24:if(random(16)=2)then RL(246);
478   25..35:if(random(30)=2)then RL(267);
479    47,48:if(random(5)=2)and(inven <>[])then
480            begin
481             if(Prm=48)then begin writeln;RS(40)end
482             else begin writeln;RS(44);moveto(48)end;
483             o:=1;flag:='?';
484             repeat o:=o+1;
485              if(o in inven)then
486              begin vanish(o);r[o]:=random(9)+41;flag:='g';end;
487             until Flag = 'g';
488            end;
489 end;
490 case Prm of
491   5,6,9,10:if(random(9)=2)then RL(268);
492   7,8,11..40:if(here(84))and(random(20)=2)then RL(269)
493         else if(random(75)=2)then RS(36)
494         else if(Prm in[5..22])and(random(33)=2)then
495          begin RL(265);play(6500,6950,0)end;
496   41..49:if(random(27)=2)then RL(285);
497     59  :if(random(15)=1)then RL(406);
498 end;
499 if Attack and(MnRm=Prm)and(not Back)then
500  begin case random(3) of 0:RS(80); 1:RS(81); 2:RS(82)end;DEAD end
501 else if(MnRm=Prm)then Attack:=True
502    end;  {of Time}
503
504 function Present : Boolean;
505    begin
506     if(noun<>Null)and(noun<>1)then
507      if(here(noun))then
508       if(noun2<>Null)then
509        if(here(noun2))then Present:=true
510        else begin
511          writeln(n[noun2,1],'\82Í\8c©\93\96\82½\82ç\82È\82¢\81B');Present:=false end
512       else Present:=true
513      else begin
514        writeln(n[noun,1],'\82Í\8c©\93\96\82½\82ç\82È\82¢\81B');Present:=false end
515     else Present:=true
516    end;
517
518 procedure Initialize;
519  procedure Cn(S : Str80);
520  begin
521   gotoxy(40-(length(S)div 2),wherey);writeln(S);
522  end;
523   begin
524    textcolor(15);
525    writeln('\96`\8c¯\82Ì\90¢\8aE\82Ö\94ò\82Ñ\8d\9e\82Þ\8f\80\94õ\82ð\82µ\82Ä\82­\82¾\82³\82¢\81B');
526    writeln('\82Å\82à\81A\82»\82Ì\91O\82É\8aÈ\92P\82È\8e¿\96â\82ª2\82Â\82 \82è\82Ü\82·:');
527    gotoxy(1,4);write('\83f\83B\83X\83v\83\8c\83C\82Í\83J\83\89\81[\82Å\82·\82© (Y/N)? ');
528    nosound; play(72,80,45);
529    flag := readkey; play(2500,2490,6);
530    m0:=20;m1:=14;m2:=11;m3:=4;m4:=15;m5:=28;m6:=1;m7:=4;m8:=10;m9:=10;
531    if upcase(flag)='N' then
532     begin
533      writeln('\82¢\82¢\82¦\81B\83J\83\89\81[\82Å\82Í\82 \82è\82Ü\82¹\82ñ\81B');
534      m0:=31;m1:=15;m2:=15;m3:=7;m4:=0;m5:=31;m6:=7;m7:=8;m8:=7;m9:=0;
535     end else writeln('\82Í\82¢\81B\83J\83\89\81[\82Å\82·\81B');writeln;
536    write('\83f\83B\83X\83N\83h\83\89\83C\83u\82Í\82¢\82­\82Â\82 \82è\82Ü\82·\82© (1/2)? ');
537    play(80,88,30);
538    flag := readkey; play(2500,2490,6);
539    Drive:='B:';
540    if(upcase(flag)='O')or(flag='1')then
541     begin Drive:='A:';writeln('1\82Â\82Å\82·\81B')end else
542     writeln('2\82Â\82Å\82·\81B');
543    delay(999);clrscr;textcolor(15);gotoxy(1,4);writeln;textcolor(7);
544    cn('Beyond the Titanic');cn('\83^\83C\83^\83j\83b\83N\82ð\89z\82¦\82Ä');textcolor(6);cn('------------------');writeln;
545    textcolor(7);
546    cn('A Text & Sound Adventure Fantasy');writeln;writeln;
547    cn('An Apogee Software Production');writeln;writeln;writeln;
548    cn('Written and Programmed by Scott Miller');
549    textcolor(11);
550    gotoxy(32,24);textcolor(7);
551    write('\83L\81[\82ð\89\9f\82µ\82Ä\82­\82¾\82³\82¢');flag := readkey;clrscr;
552
553    {                      *** SHAREWARE SCREEN ***                            }
554
555    textcolor(15);
556    writeln('Please note that Beyond the Titanic is a SHAREWARE game.');
557    writeln;
558    textcolor(7);
559    writeln('This game has been placed in the public domain for your enjoyment.');
560    writeln;
561    writeln('If you like the game the author (Scott Miller) asks that you please');
562    writeln('contribute $5 or $10 (your discretion) to him.  This minimal payment');
563    writeln('will help compensent the author for the year of work that went into');
564    writeln('Beyond the Titanic.  It will also encourage the author to make new and');
565    writeln('better games, like Supernova and Kingdom of Kroz, both of which are');
566    writeln('also shareware games recently released.');
567    writeln;
568    writeln('This fee also registers the payer for telephone support and clues.');
569    writeln;writeln;
570    writeln('Please make checks payable to Scott Miller.');
571    writeln;
572    textcolor(15);
573    writeln('        Scott Miller           (214) 240-0614');
574    writeln('        4206 Mayflower Dr.');
575    writeln('        Garland, TX  75043');
576    writeln;
577    textcolor(7);
578    writeln('Thanks, enjoy the game...');
579    gotoxy(23,25);
580    delay(3000);
581    while keypressed do readkey;
582    write('\83L\81[\82ð\89\9f\82·\82Æ\83Q\81[\83\80\82ª\8en\82Ü\82è\82Ü\82·');
583    readkey;
584    while keypressed do readkey;
585    clrscr;
586    {                      ************************                            }
587    Window(1,2,80,25);
588    gotoxy(1,24);
589    TextColor(m1);
590 cn('1912\94N4\8c\8e14\93ú     \8cß\8cã11\8e\9e43\95ª');
591 cn('');
592 cn('\88Å\96é\82Ì\83J\83\93\83o\83X\82ª\82±\82ê\82Ù\82Ç\8bP\82¢\82Ä\82¢\82½\82Æ\82Í\81B');
593 cn('\83z\83\8f\83C\83g\83X\83^\81[\82Ì\8dÅ\90V\82Ì\8d\8b\89Ø\8bq\91D\81A\90[\82¢\8aC\81A');
594 cn('\83T\83\93\83t\83\89\83\93\83V\83X\83R\82Ì\82Ü\82Î\82ä\82¢\8cõ\82à\93Í\82©\82È\82¢\82±\82Ì\8fê\8f\8a\82Å');
595 cn('\82 \82È\82½\82Í\8aô\90ç\82à\82Ì\92m\82ç\82ê\82´\82é\90¯\81X\82ð\8c©\82Ä\82¢\82½\81B');
596 cn('');
597 cn('\8aC\82É\96Ú\82ð\82â\82é\82Æ\8f¬\82³\82È\95X\82Ì\94j\95Ð\82ª\95Y\82Á\82Ä\82¢\82½\81B');
598 cn('\82±\82Ì\82 \82½\82è\82É\82Í\8f¬\82³\82È\8eR\82Ù\82Ç\82Ì\95X\8eR\82ª\8c»\82ê\82é\82Æ\82¤\82í\82³\82¾\81B');
599 cn('');
600 cn('\82¾\82ª\90S\94z\82·\82é\82±\82Æ\82Í\82È\82¢\81B\83^\83C\83^\83j\83b\83N\8d\86\82Í\81u\95s\92¾\81v\81A');
601 cn('\88ê\97¬\82Ì\8aC\89^\89ï\8eÐ\83z\83\8f\83C\83g\83X\83^\81[\82Æ\82»\82Ì\91D\82Ì\82±\82Æ\82Í\8fæ\8bq\82Ì\92N\82à\82ª\90M\97\8a\82µ\82Ä\82¢\82½\81c');
602 for x:= 1 to 3 do writeln;
603 Line        :='';
604 LastNoun    :='';
605 KitSet      :=[2,29,57];
606 CabiSet     :=[89,63];
607 CompCon     :=Null;
608 PanelCon    :=8;
609 RopeCon     :=Null;
610 SlotCon     :=Null;
611 RopeOld     :=Null;
612 RmSh        :=[];
613 Mov         :=[2,7,8,13,27,29,32,34,40,52,51,57,63,70,74,77,89];
614 OneWordCommands:=[1,4,5,7,8,16,18,19,22,31,33..35,41,43..54,56..59,61..65];
615 Ev          :=[];
616 Inven       :=[];
617 Prm         :=0;
618 MnRm        :=Null;
619 Tic         :=Prm;
620 Sc          :=0;
621 Shots       :=6;
622 KeyHole     :=false;
623 Verbose     :=true;
624 Attack      :=False;
625 YearDial    :=135;
626 DayDial     :=60;
627 assign(rooms1,'ROOMS1');assign(rooms2,'ROOMS2');
628 assign(special1,'SPECIAL1');assign(special2,'SPECIAL2');assign(line1,'LINE');
629 reset(rooms1);reset(rooms2);reset(special1);reset(special2);reset(line1);
630 Str(Random(9998)+1,Code);
631    DescribeRm; writeln; randomize;
632    Window(1,1,80,25);
633    gotoxy(1,1);TextBackGround(m6);
634    for x:=1 to 80 do write(' ');writeln;TextColor(m4);
635    gotoxy(4,1);writeln('Move');gotoxy(68,1);writeln('Score');TextColor(m2);
636    TextBackGround(0); Window(1,2,80,25);
637   end; {of Initialize}
638 {***************************** END OF COMMANDS *****************************}
639 \1a