1 {//-------------------------------------------------------------------------}
\r
3 {Copyright (C) 2014 Jason Self <j@jxself.org> }
\r
5 {This file is free software: you may copy, redistribute and/or modify it }
\r
6 {under the terms of the GNU Affero General Public License as published by }
\r
7 {the Free Software Foundation, either version 3 of the License, or (at your }
\r
8 {option) any later version. }
\r
10 {This file is distributed in the hope that it will be useful, but WITHOUT }
\r
11 {ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or }
\r
12 {FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License}
\r
13 {for more details. }
\r
15 {You should have received a copy of the GNU Affero General Public License }
\r
16 {along with this program; if not, see https://gnu.org/licenses or write to: }
\r
17 { Free Software Foundation, Inc. }
\r
18 { 51 Franklin Street, Fifth Floor }
\r
19 { Boston, MA 02110-1301 }
\r
22 {This file incorporates work covered by the following copyright and }
\r
23 {permission notice: }
\r
25 {Copyright (C) 1990, 2009 - Apogee Software, Ltd. }
\r
27 {This file is part of Supernova. Supernova is free software; you can }
\r
28 {redistribute it and/or modify it under the terms of the GNU General Public }
\r
29 {License as published by the Free Software Foundation; either version 3 }
\r
30 {of the License, or (at your option) any later version. }
\r
32 {This program is distributed in the hope that it will be useful, }
\r
33 {but WITHOUT ANY WARRANTY; without even the implied warranty of }
\r
34 {MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. }
\r
36 {See the GNU General Public License for more details. }
\r
38 {You should have received a copy of the GNU General Public License }
\r
39 {along with this program; if not, see https://gnu.org/licenses or write to: }
\r
40 { Free Software Foundation, Inc. }
\r
41 { 51 Franklin Street, Fifth Floor }
\r
42 { Boston, MA 02110-1301 }
\r
45 {Original Source: 1990 Scott Miller }
\r
46 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }
\r
48 {//-------------------------------------------------------------------------}
\r
49 (****************************************************************************)
\r
50 (* SUPERNOVA VERSION B *)
\r
51 (* >> This file contains the special room routines for Supernova << *)
\r
52 (* Programmer: Scott Miller *)
\r
53 (* << Began February 2, 1985 >> *)
\r
54 (* Copyright 1985 Scott Miller *)
\r
55 (****************************************************************************)
\r
59 uses ncurses,ocrt,sysutils,SDL;
\r
61 uses crt,sysutils,SDL;
\r
65 VMax = 95; { Verbs }
\r
66 NMax = 133; { Nouns }
\r
67 PMax = 11; { Preps }
\r
68 AMax = 4; { Adverbs }
\r
69 TMax = 30; { Timers }
\r
70 RMax = 109; { Rooms }
\r
71 MMax = 29; { Mov's }
\r
74 audio_FREQ = 22050; { SDL Audio parameters }
\r
75 audio_SAMPLES = 512;
\r
78 audio_MAXENTRIES = 50000;
\r
88 Str130 = string[131];
\r
89 Str234 = string[234];
\r
90 Str255 = string[255];
\r
91 {Entr = record AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags:integer;end;}
\r
93 TWindow = record x,y,x1,y1:integer;end;
\r
96 LSet = set of 1..NMax;
\r
98 aInv : set of 1..MMax;
\r
99 aPStat : set of 1..6;
\r
100 aEvents : set of 1..255;
\r
102 aWear : set of 1..MMax
\r
108 sound_play : integer;
\r
109 sound_Freqs : array [0..audio_MAXENTRIES] of Integer;
\r
111 speaker_on : boolean;
\r
113 sound_ticks : UInt32;
\r
115 current_freq : Real;
\r
120 win_arr : array [1..3] of TWindow;
\r
123 Sets : file of SaveSet;
\r
124 Objects : file of LSet;
\r
125 Things : file of byte;
\r
126 Timers : file of integer;
\r
127 V{erb} : array [1..VMax] of Str29;
\r
128 N{oun} : array [1..NMax] of Str29;
\r
129 P{rep} : array [1..PMax] of Str29;
\r
130 A{dvb} : array [1..AMax] of Str53;
\r
131 RN{ame} : array [1..RMax] of Str19;{ Name of each room stored here. }
\r
132 R{oom} : array [1..MMax] of byte; { Knows which room a Mov object is in.}
\r
133 L{ocate}: array [0..RMax] of LSet; { Locates all non-Mov objects. }
\r
134 T{imer} : array [1..TMax] of integer;
\r
135 Dir : array [1..8] of Str9;
\r
136 M{max} : array [1..3] of byte; {******************}
\r
137 PStat : set of 1..6; {* Player Status: *}
\r
138 NoNounOnly : set of 1..VMax; {* [] = Healthy *}
\r
139 OneNounMaybe : set of 1..VMax; {* 2 = Hungry *}
\r
140 ToNounOnly : set of 1..VMax; {* 3 = Sick *}
\r
141 ToNounMaybe : set of 1..VMax; {* 4 = Injured *}
\r
142 Events : set of 1..255; {* 5 = Tired *}
\r
143 Mov{able objects}, {* 6 = Thirsty *}
\r
144 Inv{ventory}, {******************}
\r
146 Wear : set of 1..MMax;
\r
147 Brief : set of 1..RMax;
\r
148 NounSet : set of 1..NMax;
\r
149 MugCon, { All -Con variables are containers. }
\r
166 Prm, { Player Room }
\r
167 EFlag, { Error Flag }
\r
168 FFlag, { Format Flag }
\r
169 TFlag, { Timer Flag }
\r
172 Region, { Knows what room to go in when exiting the player's ship }
\r
176 Serum, { Begins at zero, dispenser jams at 2! }
\r
178 Old, { for Block Reader }
\r
182 Code, { dials, etc }
\r
184 StoreR, { Knows if the previous Room that was read is the same as the }
\r
185 StoreS, { Room that is about to be read. If so, then it simply writes }
\r
186 StoreL, { that variable again! }
\r
188 RC, { Endless Room Counter }
\r
201 R1,R2,S1: file of Str234;
\r
202 L1 : file of Str78;
\r
203 C1 : file of Str77;
\r
219 SFlag : boolean; { If TRUE then a Special action took place. }
\r
222 {$I ADPAR.pas <<<<<------ LOADS IN MANY PARSER COMMANDS ***************}
\r
224 procedure Describe(Room:byte);
\r
226 col(9,9);write(RN[Prm]);col(11,7);writeln;
\r
227 if(en(1))or(not(en(1))and not(Prm in Brief))then
\r
228 begin Brief:=Brief+[Prm];
\r
229 case Prm of { Alternate Room Descriptions }
\r
230 29:if en(35) then begin RS(130);RS(131)end else RR(29);
\r
231 34:if en(30) then begin RS(81);RS(82)end else RR(34);
\r
232 52:if en(39) then RS(126)else RR(52);
\r
233 91:if en(51) then begin RS(157);RS(158)end else RR(91)
\r
237 case Prm of { For initial object's description }
\r
238 1:if 16 in L[1] then RL(150);
\r
239 107:if 19 in L[107] then RL(518);
\r
240 38:if 17 in L[38] then RL(260);
\r
241 41:if(18 in L[41])and not en(34)then RS(96);
\r
242 55:if 11 in L[55] then RL(290);
\r
243 63:if 20 in L[63] then RL(356);
\r
244 73:if 28 in L[73] then RL(352);
\r
245 80:if 17 in L[80] then RL(395);
\r
246 94:begin if 26 in L[94] then RL(397);if 2 in L[94] then RL(398)end;
\r
248 for o:=1 to MMax do { Print the objects that are lying in the room }
\r
251 if o=6 then write('There is some ',FN(o),' here.')
\r
254 if Word[1] in['a','e','i','o','u']then
\r
255 write('There is an ',FN(o),' here.')else
\r
256 write('There is a ',FN(o),' here.')
\r
258 if((o=29)and(MugCon<>Null))or((o=7)and(HolstCon<>Null))or
\r
259 ((o=5)and(SatchCon<>Null))then write(' (with something in it)');
\r
260 if(o=5)and(R[5]=20)then write(' (lying in some trash)');
\r
261 if(o=7)and(7 in L[12])and(R[7]=12)then write(' (on the shelf)');
\r
262 if o=NicheCon then write(' (on the niche)');
\r
263 if(en(6))and(o=16)then write(' (on the seat)');
\r
264 if o=PyraCon then write(' (in the pyramid''s slot)');
\r
265 if o=HingeCon then write(' (inside the statue''s mouth)');
\r
266 if o=PodumCon then write(' (on top of the podium)');
\r
267 if(o=16)and en(37)then write(' (under the crystal)');
\r
268 if o=RobotCon then write(' (in the robot''s panel)');
\r
269 if o in Socket then write(' (in one of the regulator''s sockets)');
\r
274 procedure Move(New:byte);
\r
276 if en(7) then RL(22) else
\r
277 if en(8) then RL(23) else
\r
279 if(MugCon<>Null)and(29 in Inv)then
\r
280 begin if Prm<>8 then L[Prm]:=L[Prm]-[MugCon];L[New]:=L[New]+[MugCon]end;
\r
281 if(SatchCon<>Null)and(5 in Inv)then
\r
282 begin L[Prm]:=L[Prm]-[SatchCon];L[New]:=L[New]+[SatchCon]end;
\r
283 if(HolstCon<>Null)and(7 in Inv)then
\r
284 begin L[Prm]:=L[Prm]-[HolstCon];L[New]:=L[New]+[HolstCon]end;
\r
291 {$I VOCAB.pas <<<<<------- Loads in VOCABULARY LIST **********}
\r
294 {****************************** ROOM ROUTINES *******************************}
\r
295 procedure Room1; { The Player's Ship }
\r
298 1:case Vb of { Bridge }
\r
301 22,24,28:case N1 of
\r
302 37,38,55,44:if Md<>Null then RL(534)else RB(3,11);103:RL(317);
\r
303 35:if en(6)then RL(542)else RL(543);
\r
310 35:if N1 in[16,35] then
\r
311 if(here(16))and(en(6))then
\r
313 begin Add(7);sound(440);RS(19);T[6]:=4;for x:=1 to random(30)+9 do
\r
314 begin y:=random(6000)+60;play(y,y,70);delay(9)end;Score(10,67)
\r
316 else begin Add(7);RL(149); for x:=1 to random(9)+9 do
\r
317 begin y:=random(9999);play(y,y,30);delay(55)end;end
\r
319 56:if en(7)and en(6)then
\r
321 if input=Identity then
\r
322 begin RS(21);T[6]:=Null;Score(15,4);play(400,400,200)end
\r
325 if input='r2/20-8 d2/vega' then
\r
326 if not(Region in[2,4]) then
\r
327 begin RS(28);Add(26);Min(27);play(600,600,99)end
\r
330 begin Min(26);RS(39);Min(27);play(600,600,99)end
\r
332 44:if en(7)and en(6)then
\r
334 43:begin play(750,750,200); { Purple }
\r
336 if T[9]=11 then begin Score(5,68);Region:=2;T[13]:=3;TFlag:=2;
\r
337 n[126]:='hinged mouth\mouth\hinge\';
\r
338 RB(9,11);Explode(30)end
\r
342 40:begin play(900,900,200); { Cyan }
\r
343 if en(26) then begin RS(37);Add(27)end
\r
346 41:begin play(600,600,200); { Tan }
\r
348 if not(en(22))and not(en(23))then
\r
349 begin col(28,23);RL(180);col(11,7);
\r
352 for y:=30 to 200 do begin sound(y);delay(5)end;nosound;
\r
354 else begin RS(40);play(500,999,3);Min(26);Min(27)end
\r
355 else if en(26)then RL(184)else RL(185)
\r
359 39:if(16 in NounSet)and en(6)then
\r
360 if en(7)then RL(575)else begin Min(6);RL(145);SFlag:=false;end;
\r
365 procedure Room2; { The Player's Ship }
\r
368 2:case Vb of { Forward Corridor }
\r
369 9,13,51:if(n1 in[0,62,64,71])then
\r
370 if en(23) then begin RL(237);case Region of 1:move(22);2:move(24);end end
\r
375 24,28:if NStr='hatch' then if en(23) then RL(163)else RL(99);
\r
377 if en(22)then begin RL(160);Min(22)end else
\r
378 begin RL(161);Add(22);
\r
379 if T[8]>0 then begin RS(40);play(500,999,3);T[8]:=0;Min(27)end end;
\r
380 41:if NStr='hatch' then
\r
383 begin RL(96);Add(23);
\r
384 if(not en(44))and(Region=2)then
\r
385 begin Add(44);RL(327);for i:=1 to 400 do sounddelayed(random(3500)+999);
\r
386 for i:=7500 downto 500 do begin sounddelayed(random(i)+i);
\r
387 sounddelayed(random(3500)+2000)end;
\r
388 for i:=1 to 300 do sounddelayed(random(3500)+2500);nosound;
\r
392 else begin RS(45);DEAD end;
\r
394 if en(23) then begin RL(98);Min(23)end else say('hatch','closed');
\r
397 3:case Vb of { Rear Corridor }
\r
401 28,31:if N1 in[55,81] then begin RB2(4,12);Pause;end;
\r
402 24,41,76:if N1=55 then if Md in[1,4]then RL(533)else begin RS(22);DEAD;end;
\r
407 procedure Room3; { The Player's Ship }
\r
411 4:case Vb of { Ship's Lab }
\r
414 90:RS(23); 52:RS(26); 38:RS(27); 55:RS(31);
\r
415 81,119:begin RB(10,14);Pause;end;
\r
416 64:if NicheCon<>Null then
\r
417 writeln('There is a ',FN(NicheCon),' sitting on the niche.')
\r
420 31:if N1 in[81,119] then begin RB(10,14);Pause;end;
\r
421 41..44,88:if N1=55 then RL(174);
\r
423 if N1 in[3,4,8,9,12,17,29] then
\r
424 if Pr in[1,5,10] then
\r
425 if NicheCon=Null then
\r
426 begin Van(N1);R[N1]:=4;NicheCon:=N1;RL(147)end
\r
430 54:if N1 in[38,90]then begin RL(321);Serum:=1;end;
\r
431 56:begin Serum:=Serum+1;
\r
433 if NicheCon=Null then RS(24)
\r
434 else if NicheCon<>29 then
\r
435 writeln('A small amount of serum drips onto the ',FN(NicheCon),' and ',
\r
438 if MugCon=Null then begin MugCon:=92;RS(25);L[4]:=L[4]+[92];
\r
439 if input='6' then Add(42)else Min(42)end
\r
441 if MugCon in[79,92,99] then
\r
442 writeln('The serum mixes with the ',FN(MugCon),' inside the mug.')
\r
444 writeln('The serum drips on the ',FN(MugCon),' inside the mug and',
\r
445 ' quickly evaporates.')
\r
451 5:case Vb of { Sanitary Facilities }
\r
453 22,28:if N1=98 then RL(122);
\r
456 6:case Vb of { Sleep Chamber }
\r
459 28:case N1 of 80:RL(159); 69:RS(29) end;
\r
460 51:if N1=69 then Vb:=35;
\r
463 7:case Vb of { Cargo Area }
\r
465 22,28:if N1=32 then RL(155);
\r
466 24:if N1=32 then RL(156);
\r
467 41,53:if N1=32 then RL(157);
\r
468 39:if 32 in NounSet then RL(158);
\r
474 procedure Room4; { The Tavern }
\r
477 8:case Vb of { Tavern }
\r
478 2,13:if en(7)then RL(22)else begin RL(93);move(13)end;
\r
479 3,9,11,51:if en(7)then RL(22)
\r
480 else if(N1 in[null,71])then begin RL(283);move(9)end
\r
481 else if N1=126 then RL(473);
\r
482 31:if N1 in[81,119]then RB(2,9);
\r
484 83:if T[1] in[4..7,11..17] then RS(8) else begin Add(19);Add(7);RL(30)end;
\r
485 35,84,85:begin Add(7);RL(30);if N1 in[35,84] then Add(2)else Min(2)end;
\r
489 if T[1] in[5..7,11..18] then
\r
490 if(md=1)or(en(18))then begin RL(31);Score(20,3);
\r
491 if not en(18)then begin Add(18);T[1]:=8;end end
\r
495 28:case N1 of 56:RL(371);81,119:RB(2,9);111:RL(44)end;
\r
496 41:if N1=56 then RL(394);
\r
497 39:if(29 in NounSet)and not en(21)then RL(86);
\r
498 54,93:if N1=111 then begin RS(32);DEAD;end;
\r
499 42,44,75:if N1=111 then RL(474);
\r
500 59:if N1=126 then RL(473);
\r
501 20:if N1=126 then RL(178);
\r
504 9:case Vb of { West Hallway }
\r
507 28:if N1=56 then RL(92);
\r
508 4,10,13,51:if(n1 in[null,71])then begin RL(284);move(8)end;
\r
509 54:if(N1=56)and(T[1]<1)then RS(13)else RL(123);
\r
510 41,88:if N1=56 then
\r
511 case N2 of 0:RL(107);3:RL(101)else RL(137)end;
\r
514 10:case Vb of { Central Hallway }
\r
518 28:if N1=56 then if en(11)then RL(370)else RL(92);
\r
519 2,11:if en(11) then begin RL(90);Score(5,69);move(12);Min(11)end
\r
521 41,88:if N1=56 then case N2 of 0:RL(107);3:begin;end else RL(137)end;
\r
522 54:if N1=56 then RL(123);
\r
525 11:case Vb of { East Hallway }
\r
528 28:if N1=56 then RL(92);
\r
529 41,88:if N1=56 then
\r
530 case N2 of 0:RL(107);3:RL(101)else RL(137)end;
\r
531 54:if N1=56 then RL(123);
\r
532 53:if N1=56 then begin RL(92);Min(11)end;
\r
535 12:case Vb of { Suite #4 }
\r
536 1,13:if en(7)then RL(22)else
\r
537 if en(11) then begin RL(91);move(10);Min(11)end else RL(92);
\r
538 41,88:if N1=56 then begin RL(104);Add(11)end;
\r
541 56:if en(11)then RL(370)else RL(92);
\r
542 80:if Md<>Null then RL(535)else RL(536);
\r
543 87:if 7 in L[12] then begin RL(106);R[7]:=12;Score(5,24)end;
\r
546 53:if N1=56 then begin RL(92);Min(11)end;
\r
547 39:if(7 in NounSet)or(30 in NounSet)then Score(5,24);
\r
553 procedure Room5; { Barre-An Planet }
\r
554 procedure Zap; begin for x:=1 to 29 do if R[x]=Prm then Van(x) end;
\r
557 13:case Vb of { Crossroads }
\r
558 1,11:if en(7)then RL(22)else begin RL(93);move(8)end;
\r
562 28,31:if N1 in[81,88] then begin Score(5,70);RB2(5,6);Pause;end;
\r
563 41:if N1=56 then RL(394);
\r
566 14:case Vb of { Dusty Road }
\r
568 4:begin RC:=1;move(15)end;
\r
571 15:case Vb of { Dusty Road (endless) }
\r
572 3:begin Zap;RC:=RC-1;if RC<1 then move(14)else move(15)end;
\r
573 4:begin Zap;RC:=RC+1;move(15);if RC=40 then
\r
574 writeln('You notice something unusual.')end;
\r
575 11,13:if RC=40 then begin RL(135);Explode(3);play(1,9999,0);play(9999,1,0);
\r
576 walls(10);Explode(5);TFlag:=4;Inv:=[1,6,12,17,20,26,28,29];move(78);
\r
577 T[3]:=120;T[4]:=120;T[5]:=120;PStat:=[];MugCon:=79;Bor(0,0)end;
\r
580 16:case Vb of { Gravel Road }
\r
581 2,11:begin RL(108);move(20)end;
\r
582 3:begin RC:=1;move(17)end;
\r
584 28,31:if N1=81 then RL(109);
\r
587 17:case Vb of { Gravel Road (endless) }
\r
588 3:begin Zap;RC:=RC+1;if(RC=80)and(Inv<>[])then
\r
589 begin move(17);RS(17);Inv:=[];end
\r
591 4:begin Zap;RC:=RC-1;if RC<1 then move(16)else move(17)end;
\r
594 18:case Vb of { Paved Road }
\r
596 2:begin RC:=1;move(19);end;
\r
600 19:case Vb of { Paved Road (endless) }
\r
601 1:begin Zap;RC:=RC-1;if RC<1then move(18)else move(19)end;
\r
602 2:if RC=60 then RS(18) else begin Zap;RC:=RC+1;move(19)end;
\r
605 20:case Vb of { General Store }
\r
607 28:if N1=132 then RL(88);
\r
608 20,26,76:if(N1 in[86,87])and(5 in L[20])then
\r
609 begin RS(14);R[5]:=20;Score(15,20)end;
\r
610 39:if(5 in NounSet)or(30 in NounSet)then Score(15,20);
\r
613 21:case Vb of { Gravel Lot }
\r
616 2,9,51:if N1 in[Null,62,71] then begin RL(234);move(22)end;
\r
617 28,31:if n1=81 then begin Score(5,71);RB(1,7);Pause;end;
\r
620 22:case Vb of { Top of Ship (Barre-An) }
\r
621 1:begin RL(235);move(21)end;
\r
622 10,11,51:if(n1 in[null,62,64,71])then
\r
623 if en(23) then begin RL(236);move(2);Score(15,72)end else RL(99);
\r
624 24,28,31:case N1 of
\r
625 56:if en(23) then RL(163)else RL(99);81:begin RB(1,7);Pause;end end;
\r
627 if en(22)then begin RL(94);Min(22)end else begin RL(95);Add(22)end;
\r
629 if en(22) then begin RL(96);Add(23);Score(5,73)end else RL(97);
\r
631 if en(23) then begin RL(98);Min(23)end else say('hatch','closed');
\r
632 59:if(N1 in[49,122])or(VStr='jump off')then move(21);
\r
638 procedure Room6; { Jungle Planet }
\r
641 23:case Vb of { Deep Pit }
\r
643 28,31:case N1 of 73:RL(218); 81,116:RS(80) end;
\r
644 75:if N1=73 then move(34);
\r
647 24:case Vb of { Top of Ship (Jungle planet) }
\r
648 3:begin RL(235);move(25)end;
\r
649 10,11,51:if(n1 in[null,62,64,71])then
\r
650 if en(23) then begin Score(5,74);RL(236);move(2)end else RL(99);
\r
651 24,28:if N1=56 then if en(23) then RL(163)else RL(99);
\r
653 if en(22)then begin RL(94);Min(22)end else begin RL(95);Add(22)end;
\r
655 if en(22) then begin RL(96);Add(23)end else RL(97);
\r
657 if en(23) then begin RL(98);Min(23)end else say('hatch','closed');
\r
658 59:if(N1 in[49,122])or(VStr='jump off')then move(25);
\r
661 25:case Vb of { Sandy Clearing }
\r
662 4,9,51:if N1 in[Null,62,71] then begin RL(234);move(24)end;
\r
663 1:begin move(26);Score(5,75)end;
\r
667 26:case Vb of { Winding Path 1 }
\r
669 5:begin RS(65);DEAD;end;
\r
671 if VStr='jump in' then begin RL(288);DEAD;end
\r
672 else begin RS(66);move(27);Score(25,76)end;
\r
673 1,3,4,6..8:RL(200);
\r
674 9,51:if N1=112 then RL(204);
\r
675 28:if N1=66 then RS(85);
\r
676 35,62:if N1=66 then begin RL(288);DEAD;end;
\r
677 75,76:if N1=66 then RL(285);
\r
678 83:if N1=66 then RL(286);
\r
679 84:if N1=66 then begin RL(287);DEAD;end;
\r
682 27:case Vb of { Winding Path 2 }
\r
684 8,11:begin RS(65);DEAD;end;
\r
686 9,51:if N1=112 then RL(204);
\r
688 if VStr='jump in' then begin RL(288);DEAD;end
\r
689 else begin RS(66);move(26)end;
\r
690 28:if N1=66 then RS(85);
\r
691 35,62:if N1=66 then begin RL(288);DEAD;end;
\r
692 75,76:if N1=66 then RL(285);
\r
693 83:if N1=66 then RL(286);
\r
694 84:if N1=66 then begin RL(287);DEAD;end;
\r
697 28:case Vb of { Winding Path 3 }
\r
700 8:begin RS(67);DEAD;end;
\r
702 9,51:if N1=112 then RL(204);
\r
703 28:if N1=112 then RS(86);
\r
704 24:if N1=112 then RL(553);
\r
707 29:case Vb of { Winding Path 4 }
\r
709 5:if en(29) then move(32) else
\r
710 begin col(10,7);RS(72);col(11,7);T[12]:=146;Add(29);move(32)end;
\r
711 9,51:if N1 in[Null,112] then begin RL(201);move(30)end;
\r
712 6:begin RS(69);Prm:=31;T[11]:=4;end;
\r
713 8:if en(35)or en(130)then begin RC:=1;move(59);Score(20,77)end;
\r
715 28:case N1 of 112:RL(238);120:RL(544);
\r
716 113:if Md=1 then begin RL(314);Add(130)end end;
\r
717 59:if N1=120 then begin RL(541);Prm:=31;T[11]:=4;end;
\r
723 procedure Room7; { Jungle Planet }
\r
726 30:case Vb of { Top of Tree }
\r
728 10,51:if N1 in[Null,112] then begin RL(203);move(29)end;
\r
730 20..28:if N1=68 then RS(79);
\r
734 31:case Vb of { Quicksand Pit }
\r
736 9,51:if N1=112 then RL(204);
\r
737 39,42,76:if N1=47 then
\r
738 if en(78)then RL(549)else begin T[11]:=0;RS(71);Prm:=29;Score(25,78)end;
\r
739 28:case N1 of 47:RL(239); 120:RL(240);end
\r
742 32:case Vb of { Winding Path 5 }
\r
744 8:begin move(29);if en(35) and not en(40) then begin RL(314);Add(40)end end;
\r
746 9,51:if N1=112 then RL(204);
\r
749 33:case Vb of { Winding Path 6 }
\r
751 6:if not en(28)then begin RS(68);Add(28);move(34)end else move(34);
\r
752 1,3,4,5,7,8:RL(200);
\r
753 9,51:if N1=112 then RL(204);
\r
756 34:case Vb of { Front of Pyramid }
\r
758 41..44,54,75,88:if N1=56 then RL(220) else
\r
760 if HingeCon<>Null then
\r
761 begin writeln('The hinged mouth opens, revealing a ',FN(HingeCon),
\r
762 ' inside.');Add(31);R[HingeCon]:=34;Score(25,79)end
\r
763 else begin RL(226);Add(31)end;
\r
764 53:if N1=56 then RL(220) else
\r
766 begin RL(227);if HingeCon<>Null then R[HingeCon]:=Null;Min(31)end;
\r
767 1,11:if en(30) then begin Score(25,80);move(35)end else RL(219);
\r
768 39:if(PyraCon in NounSet)or((30 in Nounset)and(PyraCon=9))then
\r
769 begin RL(225);Min(30);SFlag:=false;end else
\r
770 if HingeCon in NounSet then begin RL(228);SFlag:=false;end;
\r
772 9,51:if N1=112 then RL(204);
\r
773 92:if N1 in[Null,49,122] then begin RL(216);move(23) end;
\r
774 31:if N1 in[81,89,119] then begin RB(8,7);Pause;end;
\r
775 28,24:case N1 of 68:RS(87); 89:RS(88); 81,119:begin RB(8,7);Pause;end;
\r
776 64:if PyraCon=Null then RL(241)else
\r
777 writeln('The small slot contains a ',FN(PyraCon),'.');
\r
778 56:if en(30) then RL(244)else RL(245);
\r
780 if HingeCon=Null then RL(242)else
\r
781 writeln('The open mouth contains a ',FN(HingeCon),'.')
\r
789 procedure Room8; { Inside Pyramid (Top Level) }
\r
792 35:case Vb of { Vestibule }
\r
794 10,11,51:if N1 in[Null,71] then
\r
795 if en(32) then move(36) else begin RS(84);Add(32);move(36)end;
\r
796 28:if N1=56 then if en(30) then RL(244)else RL(245);
\r
799 36:case Vb of { Descending Stairs }
\r
800 10,11,51:if N1 in[Null,71] then move(37);
\r
804 37:case Vb of { Halcyon Hall }
\r
805 1:if T[16]>1 then begin RL(278);DEAD;end else move(39);
\r
807 10,51:if N1 in[Null,71] then move(42);
\r
811 38:case Vb of { Departure Room }
\r
814 73:if 10 in L[38] then begin RL(253);RL(252)end else RL(253);
\r
815 10:if 10 in L[38] then RL(254);
\r
816 30:if 17 in L[38] then begin SF;writeln('It''s a grey disk!')end
\r
818 26:if(N1=10)and(10 in L[38])then RL(255);
\r
819 42,44:if N1 in[10,73] then RL(256);
\r
820 75:if N1=73 then RL(257);
\r
822 39:if(10 in L[38])and(10 in NounSet)then
\r
823 begin L[38]:=L[38]+[17];RL(259);Score(15,81);SFlag:=false;end
\r
824 else if(30 in NounSet)and(17 in L[38])then R[17]:=38;
\r
830 procedure Room9; { Inside Pyramid (Top Level) }
\r
833 39:case Vb of { Holey Hall }
\r
834 2,13:if T[15]>1 then begin RL(269);move(37);Score(5,82)end else move(37);
\r
835 4,11:if T[15]>1 then begin RS(95);DEAD;end else move(40);
\r
838 40:case Vb of { Pyramid Lobby }
\r
839 1,11:if T[14]>1 then
\r
840 begin n[68]:='podium\alter\column\';WRITE('');move(41)end;
\r
841 3,13:if(18 in Inv)or(4 in Inv)then begin Brief:=Brief-[39];move(39);
\r
842 T[15]:=3;T[16]:=9;col(10,7);RS(93);
\r
843 for i:=500 to 5500 do sounddelayed(random(i)+random(i));
\r
844 for j:=1 to 7000 do sounddelayed(random(i)+random(i));
\r
845 for j:=i downto 500 do sounddelayed(random(j)+random(j));nosound;
\r
850 if T[14]>1 then RL(246) else
\r
851 if en(33) then begin T[14]:=7;RL(261);Walls(8);end
\r
852 else begin T[14]:=7;Score(20,33);RS(89);Walls(8);end;
\r
853 28:case N1 of 56:if T[14]>1 then RL(370)else RL(92);68:RL(247)end;
\r
856 41:case Vb of { Treasure's Keeper }
\r
857 2,13:if T[14]>1 then begin n[68]:='pyramid\podium\';WRITE('');move(40)end
\r
860 56:if T[14]>1 then RL(370)else RL(92);
\r
861 68:if PodumCon=Null then RL(264) else
\r
862 writeln('There is a ',FN(PodumCon),' on the podium.');
\r
863 18:if(18 in L[41])and not en(34)then RS(90);
\r
868 if PodumCon=Null then
\r
869 begin Van(N1);R[N1]:=41;PodumCon:=N1;RL(266)end
\r
872 75:if N1=68 then RL(276);
\r
873 50:if N1=68 then begin RL(277);Walls(8);T[14]:=7;end;
\r
874 39:if(30 in NounSet)and(18 in L[41])then R[18]:=41;
\r
880 procedure Room10; { Pyramid Maze }
\r
883 42:case Vb of { Ladder Room }
\r
884 1..13:if Maze then case Vb of 9,13:move(37);6:move(43);3,8:move(42)end
\r
885 else case Vb of 9,13:move(37)end;
\r
886 41..44,50,55:if N1=116 then RL(325);
\r
887 28:if N1=116 then RL(547);
\r
890 43:case Vb of { Shifting Room NW }
\r
891 1..8:if Maze then case Vb of 7:move(42)end
\r
892 else case Vb of 2:move(44);8:move(45)end;
\r
893 41..44,50,55:if N1=116 then RL(325);
\r
894 28:if N1=116 then RL(547);
\r
897 44:case Vb of { Shifting Room W }
\r
898 1..8:if Maze then case Vb of 7:move(47);2:move(45)end
\r
899 else case Vb of 1:move(43);5:move(44)end;
\r
900 41..44,50,55:if N1=116 then RL(325);
\r
901 28:if N1=116 then RL(547);
\r
904 45:case Vb of { Shifting Room SW }
\r
905 1..8:if Maze then case Vb of 1,3:move(45)end
\r
906 else case Vb of 1:move(45);6:move(43)end;
\r
907 41..44,50,55:if N1=116 then RL(325);
\r
908 28:if N1=116 then RL(547);
\r
911 46:case Vb of { Shifting Room N }
\r
913 case Vb of 1:begin RS(98);DEAD;end;
\r
914 7:begin Score(50,84);move(50)end end
\r
916 case Vb of 1:begin RS(98);DEAD;end;
\r
917 7:begin Score(50,84);move(50)end;3:move(48);8:move(45)end;
\r
918 41..44,50,55:if N1=116 then RL(325);
\r
919 28:if N1=116 then RL(547);
\r
922 47:case Vb of { Shifting Room S }
\r
923 1..8:if Maze then case Vb of 6:move(44)end
\r
924 else case Vb of 3:move(49);1:move(47);4:move(45)end;
\r
925 41..44,50,55:if N1=116 then RL(325);
\r
926 28:if N1=116 then RL(547);
\r
929 48:case Vb of { Shifting Room NE }
\r
930 1..8:if Maze then case Vb of 7:move(49);3,4:move(48)end
\r
931 else case Vb of 4:move(46);1,2:move(48)end;
\r
932 41..44,50,55:if N1=116 then RL(325);
\r
933 28:if N1=116 then RL(547);
\r
936 49:case Vb of { Shifting Room SE }
\r
937 1..8:if Maze then case Vb of 5:move(48)end
\r
938 else case Vb of 4:move(47);2:move(45)end;
\r
939 41..44,50,55:if N1=116 then RL(325);
\r
940 28:if N1=116 then RL(547);
\r
943 50:case Vb of { Stairway Room E }
\r
945 4,10,13,51:move(51);
\r
946 41..44,50,55:if N1=116 then RL(325);
\r
952 procedure Room11; { Inside Pyramid (Bottom Level) }
\r
955 51:case Vb of { Lower Stairway }
\r
956 3,9,13,51:move(50);
\r
960 52:case Vb of { Misty Passage }
\r
961 2:if T[19]>1 then begin RS(129);DEAD;end else move(51);
\r
962 4:if en(35)then begin RL(305);DEAD;end else move(53);
\r
963 33:if(N1=11)and(11 in Inv)then
\r
964 if Pr in[1,5,7,10] then
\r
965 if N2 in[34,49,64] then
\r
967 begin Score(40,39);Van(11);L[52]:=L[52]+[11];T[19]:=0;RS(127)end
\r
968 else begin Van(N1);R[N1]:=52;RL(586)end;
\r
969 39:if(11 in NounSet)and en(39)then RL(307);
\r
970 28:case N1 of 11:RL(312); 64:RL(313) end;
\r
971 42,44,55:case N1 of 11:RL(307); 34:RL(308); end;
\r
975 53:case Vb of { Damp Passage }
\r
976 2:begin move(54);if en(35)then begin RS(122);DEAD;end end;
\r
977 3:if T[18]>1 then begin RL(305);DEAD;end else move(52);
\r
979 begin RS(125);Brief:=Brief-[52];move(52);T[18]:=0;T[19]:=3;
\r
980 col(10,7);RL(306);Walls(12);Score(20,85)end;
\r
983 54:case Vb of { Dark Passage }
\r
988 55:case Vb of { Circular Chamber }
\r
989 1:begin Brief:=Brief-[54];move(54);
\r
992 begin col(10,7);RS(119);RS(120);Pause;L[53]:=L[53]+[66];Score(20,86);
\r
993 Brief:=Brief-[53];move(53);col(10,7);RS(121);Walls(12);T[18]:=4;end
\r
994 else begin col(10,7);RS(118);DEAD;end end;
\r
995 2:if Md=1 then RS(230)else
\r
996 if random(2)=1 then begin Prm:=58;RL(563)end else begin RS(100);DEAD;end;
\r
997 3:begin move(56);if 11 in Inv then begin RS(102);DEAD;end end;
\r
998 4:if Md=1 then RS(231)else begin RS(99);DEAD;end;
\r
999 39:if(11 in NounSet)then begin RS(101);SFlag:=false;end
\r
1000 else if(30 in Nounset)and(11 in L[55])then R[11]:=55;
\r
1006 procedure Room12; { Inside Pyramid (Bottom Level) }
\r
1009 56:case Vb of { The Erusaert }
\r
1010 2,11:if en(36) then begin Score(5,88);move(57)end;
\r
1011 4,13:if T[17]>4 then begin RS(108);DEAD;end else move(55);
\r
1013 1:if not en(35) then RL(292);
\r
1014 34:if 1 in L[56]then RL(291)
\r
1015 else if not en(35)then begin RS(103);L[56]:=L[56]+[1]end;
\r
1022 26:if N1 in[49,68] then RL(295);
\r
1023 39:if 1 in NounSet then
\r
1025 if not en(35)then RL(300) else
\r
1027 begin RS(113);T[17]:=3;Van(1);Inv:=Inv+[1];Score(50,87)end
\r
1029 else if(30 in NounSet)then RL(578);
\r
1030 37:if not(1 in NounSet)and(not en(35))then RL(300);
\r
1031 35,51,62:if N1=68 then begin RS(106);DEAD;end;
\r
1032 59:begin RS(107);DEAD;end;
\r
1033 41,88:if N1 in[68,110] then
\r
1036 if here(16)and en(37)then
\r
1037 begin RS(117);T[17]:=6;L[56]:=L[56]+[1,56];Add(35);Min(37)end
\r
1038 else begin RS(111);DEAD;end
\r
1043 if Pr in[1,10] then
\r
1044 if N2 in[49,1] then
\r
1045 begin Van(16);Add(37);R[16]:=56;
\r
1047 if Pr=1 then RL(297)else RL(298)
\r
1051 if(N2=34)and(Pr=10)then
\r
1052 begin writeln('Done.');Van(16);SF;R[16]:=56;end
\r
1053 else if N2=68 then RL(299)
\r
1056 if N2 in[68,110] then
\r
1057 if Pr=1 then RL(299) else
\r
1061 if here(16)and en(37)then
\r
1062 begin RS(117);T[17]:=6;L[56]:=L[56]+[1];Add(35);Min(37)end
\r
1063 else begin RS(111);DEAD;end
\r
1066 54,75,76:case N1 of
\r
1067 1:if 1 in L[56] then RL(300);
\r
1075 procedure Room13; { Inside Pyramid (Bottom Level) }
\r
1078 57:case Vb of { Solar Chamber }
\r
1080 28:case N1 of 56:RL(370);72,82,116:RS(149);109:RS(150)end;
\r
1081 44,75:if N1=103 then begin Prm:=58;RS(233);Walls(5);Static end;
\r
1084 58:case Vb of { Eternal Trap }
\r
1089 59:case Vb of { Overgrown Path }
\r
1090 5:begin RC:=RC-1;if RC<1 then begin RL(309);move(29)end else RL(310)end;
\r
1091 8:begin RC:=RC+1;if RC>7 then begin RL(309);move(60)end else RL(310)end;
\r
1093 9,51:if N1=112 then RL(204);
\r
1096 60:case Vb of { Antenna Building (Outside) }
\r
1097 4,11:begin Door(61,25);
\r
1098 if not en(43)then begin RS(137);Score(10,43)end end;
\r
1100 1..3,6,7,8:RL(200);
\r
1101 28:case N1 of 96:RL(323);115:RL(324)end;
\r
1102 41..44,54,75,88:if N1=56 then RL(315);
\r
1103 9,51:if N1=112 then RL(204)else RL(316);
\r
1106 61:case Vb of { Monitor Outpost }
\r
1109 28,24,31:case N1 of 37,59:RS(133);38,44:RL(322);93:RL(319);
\r
1111 42,44,75:if N1 in[37,38,44] then RL(318);
\r
1114 62:case Vb of { Booth (Jungle Planet) }
\r
1120 for yi:=60 downto 1 do for xi:=800 downto 1 do sounddelayed(xi*yi);
\r
1121 nosound;TFlag:=3;Brief:=Brief-[70];Score(10,89);
\r
1122 for x:=1 to MMax do if R[x]=62 then R[x]:=70;move(70)
\r
1125 28,24,31:case N1 of 37,59:RS(133);38:RL(322);93:RL(319);
\r
1126 94:RS(134);44:RL(320);end;
\r
1129 63:case Vb of { Booth (Ringed Planet) }
\r
1131 42,44,75:case N1 of
\r
1134 for yi:=60 downto 1 do for xi:=800 downto 1 do sounddelayed(xi*yi);
\r
1135 nosound;TFlag:=3;Brief:=Brief-[70];
\r
1136 for x:=1 to MMax do if R[x]=63 then R[x]:=70;move(70)
\r
1139 28,24,31:case N1 of 37,59:RS(133);38:RL(322);93:RL(319);
\r
1140 94:RS(134);44:RL(320);end;
\r
1141 39:if(30 in NounSet)and(20 in L[63])then R[20]:=63;
\r
1147 procedure Room14; { Inner Planet }
\r
1150 64:case Vb of { Lobby }
\r
1151 1,13:begin DOpen(99);RS(139);DEAD;end;
\r
1153 28:case N1 of 35:RL(330);49,122:RL(334);72,116:begin Score(5,90);RS(148)end;
\r
1154 81:RB(5,11);86:RL(333);127:RL(351)end;
\r
1155 31:if N1=81 then RB(5,11);
\r
1156 20,24:if N1=127 then RS(142);
\r
1157 54:if N1=127 then if Md=3 then begin RL(537);DEAD;end else RL(538);
\r
1160 65:case Vb of { North Corridor }
\r
1164 28:if N1=56 then RL(92);
\r
1167 66:case Vb of { Central Corridor }
\r
1170 3:if T[20]>1 then begin Score(15,91);move(73)end else RL(92);
\r
1172 28:case N1 of 56:if T[20]>1 then RL(370)else RL(92);64:RL(335)end;
\r
1176 begin RL(336);T[20]:=3;DOpen(20);Score(5,92)end
\r
1180 67:case Vb of { South Corridor }
\r
1186 71:case Vb of { Monitor Station }
\r
1188 28:case N1 of 59:if CodeSet=4 then RL(353)else RL(355);116:RL(354)end;
\r
1190 if CodeSet=4 then begin RB2(11,14);Pause;end else RL(355);
\r
1193 72:case Vb of { Reactor Control }
\r
1195 28,24:case N1 of 128:RL(560);
\r
1196 37,38:RL(339);46:if Md<>Null then begin Score(5,93);RL(343)end
\r
1199 if RobotCon<>Null then
\r
1200 writeln('The robot''s panel contains a ',FN(RobotCon),'.')
\r
1207 if RobotCon=Null then
\r
1208 if N1 in[3,4,8,12,17]then
\r
1209 begin Van(N1);RL(347);R[N1]:=72;RobotCon:=N1;end
\r
1213 41:if N1 in[55,46] then
\r
1214 if RobotCon=Null then RL(558)else
\r
1215 begin R[RobotCon]:=72;Add(46);Score(25,94);
\r
1216 writeln('The panel slides open, revealing a ',FN(RobotCon),' inside.')
\r
1218 53:if N1=55 then begin Van(RobotCon);Min(46);RL(344)end;
\r
1220 37,38,44:begin RL(340);Walls(9);gotoxy(43,wherey-1);col(28,31);
\r
1221 writeln('BOOM!');Explode(32);DEAD;end;
\r
1222 46:if(VStr='turn on')or(VStr='activat')or
\r
1223 (VStr='turn off')then RL(341)
\r
1224 else if(not en(94))and(not en(93))then begin RL(342);RL(559)end
\r
1232 procedure Room15; { Inner Planet }
\r
1235 68:case Vb of { Decontamination }
\r
1236 3,13:if en(45)then Door(65,20) else RL(331);
\r
1238 28,24:case N1 of 131:RL(329);end;
\r
1239 42,44,75:if N1=44 then begin RL(332);Add(45);play(20,99,7);play(99,99,600);
\r
1240 play(99,20,7);Score(10,95)end;
\r
1243 69:case Vb of { Waiting Room }
\r
1246 28,24:case N1 of 35:RL(330);131:RL(329);end;
\r
1249 70:case Vb of { Transporter Booth }
\r
1251 28,24:case N1 of 44:RS(140);93:RL(319);94:RS(141);end;
\r
1253 if N1 in[40..43]then
\r
1254 begin Brief:=Brief-[62,63,78];RS(138);Min(45);
\r
1255 for yi:=60 downto 1 do for xi:=800 downto 1 do sounddelayed(xi*yi);nosound;
\r
1257 40:begin for x:=1 to MMax do if R[x]=70 then R[x]:=78;
\r
1258 TFlag:=4;move(78);Score(15,97)end;
\r
1259 41:begin for x:=1 to MMax do if R[x]=70 then R[x]:=62;
\r
1260 TFlag:=2;move(62)end;
\r
1261 43:begin for x:=1 to MMax do if R[x]=70 then R[x]:=63;
\r
1262 TFlag:=2;move(63);Score(10,96)end
\r
1267 { 71 and 72 are in Room14 }
\r
1272 procedure Room16; { Inner Planet }
\r
1275 73:case Vb of { Communications }
\r
1279 48:begin RL(366);writeln('The dial is set at number ',CodeSet,'.')end;
\r
1280 115:RL(350);121:RL(367);127:RL(351)
\r
1284 if(code>0)and(code<11)then
\r
1285 begin RL(363);CodeSet:=Code;if Code=4 then Score(10,98)end
\r
1290 74:case Vb of { Computer Station }
\r
1292 28:case N1 of 37:RL(349);38:RL(322);52:RL(37);
\r
1293 59:begin RB2(7,10);col(26,23);RL(364);Score(5,47)end end;
\r
1294 31:if N1=59 then begin RB2(7,10);col(26,23);RL(364);Add(47)end;
\r
1297 75:case Vb of { Elevator 1st Floor }
\r
1299 42,44,75:begin RS(143);play(20,42,20);sound(42);delay(5500);RL(338);
\r
1300 play(42,20,20);Prm:=76;for x:=1 to MMax do if R[x]=75 then R[x]:=76;end;
\r
1303 76:case Vb of { Elevator 2nd Floor }
\r
1304 1:begin Score(5,99);Door(77,5)end;
\r
1305 42,44,75:begin RS(144);play(20,42,20);sound(42);delay(5500);RL(338);
\r
1306 play(42,20,20);Prm:=75;for x:=1 to MMax do if R[x]=76 then R[x]:=75;end;
\r
1309 77:case Vb of { Observatory }
\r
1311 28:case N1 of 34:RL(562);104:if Nstr='eyepiec' then RL(561)else RS(146)end;
\r
1313 if 20 in Wear then begin Score(5,100);RS(147)end
\r
1314 else begin RL(368);RL(369)end;
\r
1320 procedure Room17; { Planetship }
\r
1323 78:case Vb of { Icy Platform }
\r
1326 54:RL(379);93:RL(380);96:RL(381);103:RL(500);115:RL(350);118:RL(382)
\r
1328 59:if N1=54 then begin RL(400);DEAD;end;
\r
1331 79:case Vb of { Confirmation Port }
\r
1333 28:case N1 of 44:RL(383);64:RL(384);116:RL(600)end;
\r
1334 44,75:if N1=44 then begin RS(156);Score(10,50);
\r
1335 play(20,99,7);play(99,99,600);play(99,20,7)end;
\r
1339 begin Explode(1);sound(50);RS(151);
\r
1340 for i:=9000 downto 1 do
\r
1341 for j:=1 to 4 do sound(random(i div 2 + 400)+i);nosound;
\r
1342 Van(17);L[80]:=L[80]+[17];move(80);Add(7);T[22]:=3;T[26]:=91;
\r
1343 delay(900);sound(70);RL(399);delay(999);nosound;Score(25,101);
\r
1344 n[40]:='sockets\socket\';
\r
1345 n[82]:='laser beam\laser\beam\';
\r
1346 n[110]:='speaker\';
\r
1351 80:case Vb of { Inspection Lobby }
\r
1354 28:case N1 of 55:RL(385);86:if 17 in L[80]then RL(395);72,116:RS(148)end;
\r
1355 41..44,88,53:if N1=55 then RL(405);
\r
1361 procedure Room18; { Planetship }
\r
1364 81:case Vb of { Circular Corridor }
\r
1368 28:case N1 of 72:RL(386)end;
\r
1371 82:case Vb of { Circular Corridor }
\r
1376 28:case N1 of 72,103:RL(387)end;
\r
1379 83:case Vb of { Circular Corridor }
\r
1383 28:case N1 of 72,115:RL(388)end;
\r
1386 93:case Vb of { Central Elevator }
\r
1387 3,11,13:case Floor of
\r
1389 2..5,30..40,89..95,170..230,333..444,543..600,793..812:RL(413);
\r
1391 begin door(98,5);delay(999);RS(217);Score(20,102);
\r
1392 for x:=1 to 7 do begin i:=random(7000)+1500;j:=random(600)+400;
\r
1396 else begin door(97,5);Score(5,103)end
\r
1398 28:if N1 in[44,52] then RS(188);
\r
1399 56:begin val(input,i,testc);
\r
1401 if(i>0)and(i<837)then
\r
1403 begin j:=i;i:=abs(floor-i);Floor:=j;RL(411);play(20,36,35);
\r
1404 sound(37);for x:=1 to 200 do delay(i div 4);
\r
1405 RL(412);play(36,20,35);
\r
1413 95:case Vb of { Transmission Room }
\r
1415 28:if N1 in[38,121]then RS(191);
\r
1416 42,44,75:if N1=44 then begin Score(5,104);RL(404);play(1200,1200,99);
\r
1417 if en(48)then Min(48)else Add(48)end;
\r
1420 96:case Vb of { Station Control }
\r
1422 28:case N1 of 38:RS(192);59:begin Score(5,105);RB2(11,5);Pause;end end;
\r
1423 31:if N1=59 then begin Score(5,105);RB2(11,5);Pause;end;
\r
1429 procedure Room19; { Planetship }
\r
1432 84:case Vb of { Circular Corridor }
\r
1436 28:case N1 of 72,46:RL(389)end;
\r
1439 85:case Vb of { Circular Corridor }
\r
1443 28:case N1 of 72:RL(390)end;
\r
1446 86:case Vb of { Circular Corridor }
\r
1448 4,11:if T[21]>1 then begin Score(15,107);move(91);
\r
1449 if en(52)then T[23]:=2;end else RL(92);
\r
1451 28:case N1 of 56:if T[21]>1 then RL(370);64:RL(335);72,69:RL(391)end;
\r
1455 begin RL(336);T[21]:=3;DOpen(15);Score(5,106)end
\r
1459 87:case Vb of { Circular Corridor }
\r
1463 28:case N1 of 72:RL(392)end;
\r
1466 88:case Vb of { Circular Corridor }
\r
1470 28:case N1 of 72:RL(392)end;
\r
1473 89:case Vb of { Reactors West }
\r
1476 28:case N1 of 38:RL(414);59:RL(401);128:RS(189)end;
\r
1479 1:RB2(8,6); { Orange Crystal }
\r
1480 2:RB2(10,10); { Green Crystal }
\r
1481 3:RB2(12,14); { Yellow Crystal }
\r
1482 4:begin RB2(14,9); { Blue Crystal (Cracked) }
\r
1483 x:=wherex;y:=wherey;gotoxy(40,14);col(25,23);write('LACITIRC');
\r
1484 gotoxy(x,y);Score(20,108)
\r
1487 44,75:if N1=44 then
\r
1488 begin RL(402);ScrnSet:=ScrnSet+1;if ScrnSet>4 then ScrnSet:=1;
\r
1490 begin i:=random(7000)+999;play(i,i,50);delay(random(15)+5)end
\r
1492 if N1 in[38,128]then RL(403);
\r
1493 42:if N1 in[38,128]then RL(403);
\r
1499 procedure Room20; { Planetship }
\r
1502 90:case Vb of { Reactors East }
\r
1505 28:case N1 of 38:RL(393);59:RL(402);128:RS(190)end;
\r
1506 31:if N1=59 then begin Score(5,109);RB2(9,random(14)+1)end;
\r
1507 42,44,75:if N1 in[38,128]then RL(403);
\r
1510 91:case Vb of { Emergency Override }
\r
1511 3,13:begin if T[25]>2 then
\r
1512 begin Col(10,7);RL(424);T[25]:=Null;T[24]:=Null;T[26]:=14;Add(52)end;
\r
1514 if(T[24]>0)and not en(64)then begin T[24]:=Null;T[26]:=14;Add(52)end
\r
1517 28:case N1 of 37,38,51:RL(393);44:RL(469);59:RL(468);64:RL(335);
\r
1518 69:if en(51)then RL(426)else if Md=1 then RL(467)else RS(182);
\r
1520 31:if N1=59 then RL(468);
\r
1521 24:if N1=69 then if en(51)then crazy else RL(427);
\r
1522 75:if N1=69 then if en(51)then crazy else RL(428);
\r
1524 69:if en(51)then RL(426)else
\r
1525 if N2 in[0,60]then RL(601)else
\r
1526 if not(N2 in[10,18,29])then RL(602)else
\r
1527 begin RS(160);L[91]:=L[91]+[123];L[91]:=L[91]-[44,129];T[23]:=15;
\r
1530 42,44:if(N1=69)and not en(51)then RL(470)else
\r
1531 if N1=44 then begin RL(471);play(20,440,1);play(440,440,500);
\r
1532 play(440,20,1);end;
\r
1533 41,88:if N1=69 then if en(51)then crazy else RL(467);
\r
1534 39:if N1=95 then RL(442);
\r
1538 if(T[24]>1)and(T[24]<6)then
\r
1539 begin T[24]:=Null;T[25]:=7;RS(181)end
\r
1544 if N1=12 then RL(577);
\r
1547 92:case Vb of { Climate Control }
\r
1549 28,31:case N1 of 59:RS(152);end;
\r
1555 procedure Room21; { Planetship }
\r
1558 94:case Vb of { Maintenance }
\r
1562 87:begin RL(490);Score(15,110);
\r
1564 begin Score(10,49);RL(396);L[94]:=L[94]+[26];end
\r
1565 else if 26 in L[94] then RL(397);
\r
1569 if(30 in NounSet)then
\r
1570 begin if 2 in L[94] then R[2]:=94;if 26 in L[94] then R[26]:=94;end;
\r
1571 if(51 in NounSet)then
\r
1572 begin RL(491);NounSet:=NounSet-[51];
\r
1573 if not(NounSet=[])then SFlag:=false end
\r
1577 97:case Vb of { Cryogenic Chamber }
\r
1578 4,11,13:door(93,5);
\r
1579 28:if N1=69 then RS(193);
\r
1580 18:begin RS(194);Van(N1)end;
\r
1583 98:case Vb of { Identity Booth }
\r
1584 2,11:begin door(99,0);
\r
1585 if T[27]>1 then begin Col(10,7);RS(208);delay(999);Blast;DEAD end
\r
1586 else begin T[27]:=2000;Col(10,7);RL(504);play(22,22,999);RS(210);
\r
1587 delay(999);Blast;RL(505)end
\r
1590 28,31:case N1 of 81,119:if NStr='message' then RL(517)else RB2(13,13);
\r
1594 99:case Vb of { Security Tunnel #1 }
\r
1596 2,11:begin Score(15,111);door(100,0)end;
\r
1598 41,88:if N1=55 then RL(509);
\r
1599 28:case N1 of 46:RS(216);55:RL(510);88:RL(511)end;
\r
1600 42,44,75:if N1=46 then begin RL(513);T[27]:=2000;Add(7)end;
\r
1601 39:if 88 in NounSet then begin RL(513);T[27]:=2000;Add(7)end;
\r
1604 100:case Vb of { Security Tunnel #2 }
\r
1605 1,13:begin door(99,0);Col(10,7);RS(208);delay(999);Blast;DEAD end;
\r
1606 2,11:begin door(101,0);
\r
1607 if T[28]>1 then begin Col(10,7);RS(209);delay(999);Blast;DEAD end
\r
1608 else begin T[28]:=2000;Col(10,7);RL(504);play(22,22,999);RS(211);
\r
1609 delay(999);Blast;RS(212);PStat:=PStat+[4];T[29]:=14;end;
\r
1611 41,88:if N1=55 then RL(512);
\r
1617 procedure Room22; { Planetship (Lower Level) }
\r
1620 101:case Vb of { Security Tunnel #3 }
\r
1622 2,11:begin Region:=5;door(102,0);Score(20,112);
\r
1623 if not(20 in Wear)then RL(492)end;
\r
1624 41,88:if N1=55 then RL(509);
\r
1625 28:case N1 of 46:RS(216);55:RL(510);88:RL(511)end;
\r
1626 42,44,75:if N1=46 then begin RL(513);T[28]:=2000;Add(7)end;
\r
1627 39:if 88 in NounSet then begin RL(513);T[28]:=2000;Add(7)end;
\r
1630 102:if(Vb in[1..14,16,20..31,33..44,48..64,73..76,83..85,88..94])and
\r
1631 not(20 in Wear)then RL(491) else
\r
1632 case Vb of { North Catwalk }
\r
1633 1,11,13:begin Region:=Null;Door(101,0);Col(10,7);RS(209);delay(999);
\r
1637 24,25,28:case N1 of 34,49:RL(493);
\r
1638 131:if NStr='catwalk' then RL(494)else begin RS(195);RS(196)end end;
\r
1639 75,76:if N1=42 then RL(495);
\r
1640 51,59:if N1 in[42,54,131]then begin RL(496);DEAD;end;
\r
1643 103:if(Vb in[1..14,16,20..31,33..44,48..64,73..76,83..85,88..94])and
\r
1644 not(20 in Wear)then RL(491) else
\r
1645 case Vb of { East Catwalk }
\r
1648 24,25,28:case N1 of 34,49:RL(493);
\r
1649 131:if NStr='catwalk' then RL(494)else begin RS(195);RS(196)end end;
\r
1650 75,76:if N1=42 then RL(495);
\r
1651 51,59:if N1 in[42,54,131]then begin RL(496);DEAD;end;
\r
1654 104:if(Vb in[1..14,16,20..31,33..44,48..64,73..76,83..85,88..94])and
\r
1655 not(20 in Wear)then RL(491) else
\r
1656 case Vb of { South Catwalk }
\r
1657 2,13:begin Region:=Null;Door(106,5);Score(20,113)end;
\r
1660 24,25,28:case N1 of 34,49:RL(493);
\r
1661 131:if NStr='catwalk' then RL(494)else begin RS(195);RS(196)end end;
\r
1662 75,76:if N1=42 then RL(495);
\r
1663 51,59:if N1 in[42,54,131]then begin RL(496);DEAD;end;
\r
1666 105:if(Vb in[1..14,16,20..31,33..44,48..64,73..76,83..85,88..94])and
\r
1667 not(20 in Wear)then RL(491) else
\r
1668 case Vb of { West Catwalk }
\r
1671 24,25,28:case N1 of 34,49:RL(493);
\r
1672 131:if NStr='catwalk' then RL(494)else begin RS(195);RS(196)end end;
\r
1673 75,76:if N1=42 then RL(495);
\r
1674 51,59:if N1 in[42,54,131]then begin RL(496);DEAD;end;
\r
1680 procedure Room23; { Planetship (Lower Level) }
\r
1684 106:case Vb of { Junction }
\r
1685 1:begin Region:=5;Door(104,5);if not(20 in Wear)then RL(492)end;
\r
1688 4,11,13:door(107,20);
\r
1689 41..44,88:if N1=56 then RL(532);
\r
1692 107:case Vb of { Conference Room }
\r
1693 3,13:door(106,20);
\r
1694 39:if(30 in NounSet)and(19 in L[107])then R[19]:=107;
\r
1697 108:case Vb of { Reactor Regulators }
\r
1701 begin Add(65);L[108]:=L[108]+[40];Score(5,114);
\r
1702 for x:=22 to 25 do R[x]:=108;RL(519);RL(520);
\r
1705 53:if en(65)then RL(522)else RL(523);
\r
1706 28,24:case N1 of 55:if en(65)then goto JUMP else RL(523);
\r
1709 for x:=1 to 25 do if x in Socket then
\r
1710 if x=22 then writeln(' An ',FN(x),' is in one of the sockets.')
\r
1711 else writeln(' A ',FN(x),' is in one of the sockets.')
\r
1714 33:if(N2 in[40,55])and en(65)then
\r
1715 begin i:=0;for x:=1 to 25 do if x in Socket then i:=i+1;
\r
1718 if N1 in[1,22..25]then
\r
1720 writeln('The ',FN(N1),' fits perfectly in an open socket.');
\r
1721 Van(N1);Socket:=Socket+[N1];R[N1]:=108;
\r
1722 i:=0;for x:=1 to 25 do if x in Socket then i:=i+1;
\r
1723 if(i>3)and(1 in Socket) and not(25 in Socket)then
\r
1724 begin { #### You have won the game!!!!! #### }
\r
1725 Col(10,7);delay(999);Static;Static;RS(221);Static;Static;
\r
1726 delay(999);explode(1);sound(20);RS(222);delay(999);RS(223);
\r
1727 Pause;Bor(0,0);writeln;Score(55,115);
\r
1728 Add(66);Prm:=109;PStat:=[];PlayerInput(Line);
\r
1729 Col(10,15);for x:=224 to 229 do RS(x);
\r
1730 writeln;writeln;Pause;writeln;
\r
1731 WON; { <<<----- END OF GAME !!! *************}
\r
1734 else writeln('The ',FN(N1),' won''t fit in any of the sockets.')
\r
1735 else writeln('First you must have the ',FN(N1),'.')
\r
1743 {**************************** END OF ROOM ROUTINES **************************}
\r
1746 {$I DEFAULT.pas <<<<<------ LOADS IN DEFAULT ROUTINES *******************}
\r
1749 BEGIN { Main Program }
\r
1750 Assign1;Assign2;Assign3;Assign4;Assign5;
\r
1751 Names1;Names2;Names3;
\r
1754 Init1;Init2;Init3;
\r
1760 PlayerInput(LINE);
\r
1761 if length(input)>0 then Parser_Syntax(input);
\r
1762 if EFlag=Legal then
\r
1767 begin RL(11);Time1;
\r
1768 case TFlag of 1:Time2A;2:Time2B;3:Time2C;4:Time2D;end end
\r
1770 begin SFlag:=false; if(Vb=71)and(Prm=55)and not en(35)then Vb:=1;
\r
1785 64..67,71,72 :Room14;
\r
1789 81..83,93,95,96 :Room18;
\r
1792 94,97..100 :Room21;
\r
1795 end; { Room Defaults }
\r
1798 1..8,30,82,87 :Default0;
\r
1799 16,17,18 :Default1;
\r
1800 9..15,32,35,51,77,79,62 :Default2;
\r
1804 66..69,71 :Default6;
\r
1805 31,65,75,80,81,83,84,93,95 :Default7;
\r
1806 41,50,88 :Default8;
\r
1807 20,22,24,26,70,76 :Default9;
\r
1809 42,44,73,86,89,90,94 :Default11;
\r
1811 19,53,56,72,74,78,91 :Default13;
\r
1812 21,25,49,59,92 :Default14
\r
1814 if en(128)then DEAD;Min(128);
\r
1815 if not(Vb in[77..79,82,86,87,95])then
\r
1816 begin Time1;case TFlag of 1:Time2A;2:Time2B;3:Time2C;4:Time2D;end end;
\r
1821 END. { ADGAME2 (Supernova) }
\r