1 {//-------------------------------------------------------------------------}
\r
3 {Copyright (C) 1990, 2009 - Apogee Software, Ltd. }
\r
5 {This file is part of Supernova. Supernova is free software; you can }
\r
6 {redistribute it and/or modify it under the terms of the GNU General Public }
\r
7 {License as published by the Free Software Foundation; either version 3 }
\r
8 {of the License, or (at your option) any later version. }
\r
10 {This program is distributed in the hope that it will be useful, }
\r
11 {but WITHOUT ANY WARRANTY; without even the implied warranty of }
\r
12 {MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. }
\r
14 {See the GNU General Public License for more details. }
\r
16 {You should have received a copy of the GNU General Public License }
\r
17 {along with this program; if not, see https://gnu.org/licenses or write to: }
\r
18 { Free Software Foundation, Inc. }
\r
19 { 51 Franklin Street, Fifth Floor }
\r
20 { Boston, MA 02110-1301 }
\r
23 {Original Source: 1990 Scott Miller }
\r
24 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }
\r
26 {//-------------------------------------------------------------------------}
\r
27 (****************************************************************************)
\r
28 (* SUPERNOVA VERSION B *)
\r
29 (* >> This file contains the special room routines for Supernova << *)
\r
30 (* Programmer: Scott Miller *)
\r
31 (* << Began February 2, 1985 >> *)
\r
32 (* Copyright 1985 Scott Miller *)
\r
33 (****************************************************************************)
\r
38 VMax = 95; { Verbs }
\r
39 NMax = 133; { Nouns }
\r
40 PMax = 11; { Preps }
\r
41 AMax = 4; { Adverbs }
\r
42 TMax = 30; { Timers }
\r
43 RMax = 109; { Rooms }
\r
44 MMax = 29; { Mov's }
\r
56 Str130 = string[131];
\r
57 Str234 = string[234];
\r
58 Str255 = string[255];
\r
59 Entr = record AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags:integer;end;
\r
60 LSet = set of 1..NMax;
\r
62 aInv : set of 1..MMax;
\r
63 aPStat : set of 1..6;
\r
64 aEvents : set of 1..255;
\r
66 aWear : set of 1..MMax
\r
71 Sets : file of SaveSet;
\r
72 Objects : file of LSet;
\r
73 Things : file of byte;
\r
74 Timers : file of integer;
\r
75 V{erb} : array [1..VMax] of Str29;
\r
76 N{oun} : array [1..NMax] of Str29;
\r
77 P{rep} : array [1..PMax] of Str29;
\r
78 A{dvb} : array [1..AMax] of Str53;
\r
79 RN{ame} : array [1..RMax] of Str19;{ Name of each room stored here. }
\r
80 R{oom} : array [1..MMax] of byte; { Knows which room a Mov object is in.}
\r
81 L{ocate}: array [0..RMax] of LSet; { Locates all non-Mov objects. }
\r
82 T{imer} : array [1..TMax] of integer;
\r
83 Dir : array [1..8] of Str9;
\r
84 M{max} : array [1..3] of byte; {******************}
\r
85 PStat : set of 1..6; {* Player Status: *}
\r
86 NoNounOnly : set of 1..VMax; {* [] = Healthy *}
\r
87 OneNounMaybe : set of 1..VMax; {* 2 = Hungry *}
\r
88 ToNounOnly : set of 1..VMax; {* 3 = Sick *}
\r
89 ToNounMaybe : set of 1..VMax; {* 4 = Injured *}
\r
90 Events : set of 1..255; {* 5 = Tired *}
\r
91 Mov{able objects}, {* 6 = Thirsty *}
\r
92 Inv{ventory}, {******************}
\r
94 Wear : set of 1..MMax;
\r
95 Brief : set of 1..RMax;
\r
96 NounSet : set of 1..NMax;
\r
97 MugCon, { All -Con variables are containers. }
\r
114 Prm, { Player Room }
\r
115 EFlag, { Error Flag }
\r
116 FFlag, { Format Flag }
\r
117 TFlag, { Timer Flag }
\r
120 Region, { Knows what room to go in when exiting the player's ship }
\r
124 Serum, { Begins at zero, dispenser jams at 2! }
\r
126 Old, { for Block Reader }
\r
129 Code, { dials, etc }
\r
131 StoreR, { Knows if the previous Room that was read is the same as the }
\r
132 StoreS, { Room that is about to be read. If so, then it simply writes }
\r
133 StoreL, { that variable again! }
\r
135 RC, { Endless Room Counter }
\r
148 R1,R2,S1: file of Str234;
\r
149 L1 : file of Str78;
\r
150 C1 : file of Str77;
\r
151 T1,T2 : text[2500];
\r
166 SFlag : boolean; { If TRUE then a Special action took place. }
\r
169 {$Ia:ADPAR.pas <<<<<------ LOADS IN MANY PARSER COMMANDS ***************}
\r
171 procedure Describe(Room:byte);
\r
173 col(9,9);write(RN[Prm]);col(11,7);writeln;
\r
174 if(en(1))or(not(en(1))and not(Prm in Brief))then
\r
175 begin Brief:=Brief+[Prm];
\r
176 case Prm of { Alternate Room Descriptions }
\r
177 29:if en(35) then begin RS(130);RS(131)end else RR(29);
\r
178 34:if en(30) then begin RS(81);RS(82)end else RR(34);
\r
179 52:if en(39) then RS(126)else RR(52);
\r
180 91:if en(51) then begin RS(157);RS(158)end else RR(91)
\r
184 case Prm of { For initial object's description }
\r
185 1:if 16 in L[1] then RL(150);
\r
186 107:if 19 in L[107] then RL(518);
\r
187 38:if 17 in L[38] then RL(260);
\r
188 41:if(18 in L[41])and not en(34)then RS(96);
\r
189 55:if 11 in L[55] then RL(290);
\r
190 63:if 20 in L[63] then RL(356);
\r
191 73:if 28 in L[73] then RL(352);
\r
192 80:if 17 in L[80] then RL(395);
\r
193 94:begin if 26 in L[94] then RL(397);if 2 in L[94] then RL(398)end;
\r
195 for o:=1 to MMax do { Print the objects that are lying in the room }
\r
198 if o=6 then write('There is some ',FN(o),' here.')
\r
201 if Word[1] in['a','e','i','o','u']then
\r
202 write('There is an ',FN(o),' here.')else
\r
203 write('There is a ',FN(o),' here.')
\r
205 if((o=29)and(MugCon<>Null))or((o=7)and(HolstCon<>Null))or
\r
206 ((o=5)and(SatchCon<>Null))then write(' (with something in it)');
\r
207 if(o=5)and(R[5]=20)then write(' (lying in some trash)');
\r
208 if(o=7)and(7 in L[12])and(R[7]=12)then write(' (on the shelf)');
\r
209 if o=NicheCon then write(' (on the niche)');
\r
210 if(en(6))and(o=16)then write(' (on the seat)');
\r
211 if o=PyraCon then write(' (in the pyramid''s slot)');
\r
212 if o=HingeCon then write(' (inside the statue''s mouth)');
\r
213 if o=PodumCon then write(' (on top of the podium)');
\r
214 if(o=16)and en(37)then write(' (under the crystal)');
\r
215 if o=RobotCon then write(' (in the robot''s panel)');
\r
216 if o in Socket then write(' (in one of the regulator''s sockets)');
\r
221 procedure Move{New:byte};
\r
223 if en(7) then RL(22) else
\r
224 if en(8) then RL(23) else
\r
226 if(MugCon<>Null)and(29 in Inv)then
\r
227 begin if Prm<>8 then L[Prm]:=L[Prm]-[MugCon];L[New]:=L[New]+[MugCon]end;
\r
228 if(SatchCon<>Null)and(5 in Inv)then
\r
229 begin L[Prm]:=L[Prm]-[SatchCon];L[New]:=L[New]+[SatchCon]end;
\r
230 if(HolstCon<>Null)and(7 in Inv)then
\r
231 begin L[Prm]:=L[Prm]-[HolstCon];L[New]:=L[New]+[HolstCon]end;
\r
238 {$Ia:VOCAB.pas <<<<<------- Loads in VOCABULARY LIST **********}
\r
241 {****************************** ROOM ROUTINES *******************************}
\r
242 overlay procedure Room1; { The Player's Ship }
\r
245 1:case Vb of { Bridge }
\r
248 22,24,28:case N1 of
\r
249 37,38,55,44:if Md<>Null then RL(534)else RB(3,11);103:RL(317);
\r
250 35:if en(6)then RL(542)else RL(543);
\r
257 35:if N1 in[16,35] then
\r
258 if(here(16))and(en(6))then
\r
260 begin Add(7);sound(440);RS(19);T[6]:=4;for x:=1 to random(30)+9 do
\r
261 begin y:=random(6000)+60;play(y,y,70);delay(9)end;Score(10,67)
\r
263 else begin Add(7);RL(149); for x:=1 to random(9)+9 do
\r
264 begin y:=random(9999);play(y,y,30);delay(55)end;end
\r
266 56:if en(7)and en(6)then
\r
268 if input=Identity then
\r
269 begin RS(21);T[6]:=Null;Score(15,4);play(400,400,200)end
\r
272 if input='r2/20-8 d2/vega' then
\r
273 if not(Region in[2,4]) then
\r
274 begin RS(28);Add(26);Min(27);play(600,600,99)end
\r
277 begin Min(26);RS(39);Min(27);play(600,600,99)end
\r
279 44:if en(7)and en(6)then
\r
281 43:begin play(750,750,200); { Purple }
\r
283 if T[9]=11 then begin Score(5,68);Region:=2;T[13]:=3;TFlag:=2;
\r
284 n[126]:='hinged mouth\mouth\hinge\';
\r
285 RB(9,11);Explode(30)end
\r
289 40:begin play(900,900,200); { Cyan }
\r
290 if en(26) then begin RS(37);Add(27)end
\r
293 41:begin play(600,600,200); { Tan }
\r
295 if not(en(22))and not(en(23))then
\r
296 begin col(28,23);RL(180);col(11,7);
\r
299 for y:=30 to 200 do begin sound(y);delay(5)end;nosound;
\r
301 else begin RS(40);play(500,999,3);Min(26);Min(27)end
\r
302 else if en(26)then RL(184)else RL(185)
\r
306 39:if(16 in NounSet)and en(6)then
\r
307 if en(7)then RL(575)else begin Min(6);RL(145);SFlag:=false;end;
\r
312 overlay procedure Room2; { The Player's Ship }
\r
315 2:case Vb of { Forward Corridor }
\r
316 9,13,51:if(n1 in[0,62,64,71])then
\r
317 if en(23) then begin RL(237);case Region of 1:move(22);2:move(24);end end
\r
322 24,28:if NStr='hatch' then if en(23) then RL(163)else RL(99);
\r
324 if en(22)then begin RL(160);Min(22)end else
\r
325 begin RL(161);Add(22);
\r
326 if T[8]>0 then begin RS(40);play(500,999,3);T[8]:=0;Min(27)end end;
\r
327 41:if NStr='hatch' then
\r
330 begin RL(96);Add(23);
\r
331 if(not en(44))and(Region=2)then
\r
332 begin Add(44);RL(327);for i:=1 to 400 do sound(random(3500)+999);
\r
333 for i:=7500 downto 500 do begin sound(random(i)+i);
\r
334 sound(random(3500)+2000)end;
\r
335 for i:=1 to 300 do sound(random(3500)+2500);nosound;
\r
339 else begin RS(45);DEAD end;
\r
341 if en(23) then begin RL(98);Min(23)end else say('hatch','closed');
\r
344 3:case Vb of { Rear Corridor }
\r
348 28,31:if N1 in[55,81] then begin RB2(4,12);Pause;end;
\r
349 24,41,76:if N1=55 then if Md in[1,4]then RL(533)else begin RS(22);DEAD;end;
\r
354 overlay procedure Room3; { The Player's Ship }
\r
358 4:case Vb of { Ship's Lab }
\r
361 90:RS(23); 52:RS(26); 38:RS(27); 55:RS(31);
\r
362 81,119:begin RB(10,14);Pause;end;
\r
363 64:if NicheCon<>Null then
\r
364 writeln('There is a ',FN(NicheCon),' sitting on the niche.')
\r
367 31:if N1 in[81,119] then begin RB(10,14);Pause;end;
\r
368 41..44,88:if N1=55 then RL(174);
\r
370 if N1 in[3,4,8,9,12,17,29] then
\r
371 if Pr in[1,5,10] then
\r
372 if NicheCon=Null then
\r
373 begin Van(N1);R[N1]:=4;NicheCon:=N1;RL(147)end
\r
377 54:if N1 in[38,90]then begin RL(321);Serum:=1;end;
\r
378 56:begin Serum:=Serum+1;
\r
380 if NicheCon=Null then RS(24)
\r
381 else if NicheCon<>29 then
\r
382 writeln('A small amount of serum drips onto the ',FN(NicheCon),' and ',
\r
385 if MugCon=Null then begin MugCon:=92;RS(25);L[4]:=L[4]+[92];
\r
386 if input='6' then Add(42)else Min(42)end
\r
388 if MugCon in[79,92,99] then
\r
389 writeln('The serum mixes with the ',FN(MugCon),' inside the mug.')
\r
391 writeln('The serum drips on the ',FN(MugCon),' inside the mug and',
\r
392 ' quickly evaporates.')
\r
398 5:case Vb of { Sanitary Facilities }
\r
400 22,28:if N1=98 then RL(122);
\r
403 6:case Vb of { Sleep Chamber }
\r
406 28:case N1 of 80:RL(159); 69:RS(29) end;
\r
407 51:if N1=69 then Vb:=35;
\r
410 7:case Vb of { Cargo Area }
\r
412 22,28:if N1=32 then RL(155);
\r
413 24:if N1=32 then RL(156);
\r
414 41,53:if N1=32 then RL(157);
\r
415 39:if 32 in NounSet then RL(158);
\r
421 overlay procedure Room4; { The Tavern }
\r
424 8:case Vb of { Tavern }
\r
425 2,13:if en(7)then RL(22)else begin RL(93);move(13)end;
\r
426 3,9,11,51:if en(7)then RL(22)
\r
427 else if(N1 in[null,71])then begin RL(283);move(9)end
\r
428 else if N1=126 then RL(473);
\r
429 31:if N1 in[81,119]then RB(2,9);
\r
431 83:if T[1] in[4..7,11..17] then RS(8) else begin Add(19);Add(7);RL(30)end;
\r
432 35,84,85:begin Add(7);RL(30);if N1 in[35,84] then Add(2)else Min(2)end;
\r
436 if T[1] in[5..7,11..18] then
\r
437 if(md=1)or(en(18))then begin RL(31);Score(20,3);
\r
438 if not en(18)then begin Add(18);T[1]:=8;end end
\r
442 28:case N1 of 56:RL(371);81,119:RB(2,9);111:RL(44)end;
\r
443 41:if N1=56 then RL(394);
\r
444 39:if(29 in NounSet)and not en(21)then RL(86);
\r
445 54,93:if N1=111 then begin RS(32);DEAD;end;
\r
446 42,44,75:if N1=111 then RL(474);
\r
447 59:if N1=126 then RL(473);
\r
448 20:if N1=126 then RL(178);
\r
451 9:case Vb of { West Hallway }
\r
454 28:if N1=56 then RL(92);
\r
455 4,10,13,51:if(n1 in[null,71])then begin RL(284);move(8)end;
\r
456 54:if(N1=56)and(T[1]<1)then RS(13)else RL(123);
\r
457 41,88:if N1=56 then
\r
458 case N2 of 0:RL(107);3:RL(101)else RL(137)end;
\r
461 10:case Vb of { Central Hallway }
\r
465 28:if N1=56 then if en(11)then RL(370)else RL(92);
\r
466 2,11:if en(11) then begin RL(90);Score(5,69);move(12);Min(11)end
\r
468 41,88:if N1=56 then case N2 of 0:RL(107);3:begin;end else RL(137)end;
\r
469 54:if N1=56 then RL(123);
\r
472 11:case Vb of { East Hallway }
\r
475 28:if N1=56 then RL(92);
\r
476 41,88:if N1=56 then
\r
477 case N2 of 0:RL(107);3:RL(101)else RL(137)end;
\r
478 54:if N1=56 then RL(123);
\r
479 53:if N1=56 then begin RL(92);Min(11)end;
\r
482 12:case Vb of { Suite #4 }
\r
483 1,13:if en(7)then RL(22)else
\r
484 if en(11) then begin RL(91);move(10);Min(11)end else RL(92);
\r
485 41,88:if N1=56 then begin RL(104);Add(11)end;
\r
488 56:if en(11)then RL(370)else RL(92);
\r
489 80:if Md<>Null then RL(535)else RL(536);
\r
490 87:if 7 in L[12] then begin RL(106);R[7]:=12;Score(5,24)end;
\r
493 53:if N1=56 then begin RL(92);Min(11)end;
\r
494 39:if(7 in NounSet)or(30 in NounSet)then Score(5,24);
\r
500 overlay procedure Room5; { Barre-An Planet }
\r
501 procedure Zap; begin for x:=1 to 29 do if R[x]=Prm then Van(x) end;
\r
504 13:case Vb of { Crossroads }
\r
505 1,11:if en(7)then RL(22)else begin RL(93);move(8)end;
\r
509 28,31:if N1 in[81,88] then begin Score(5,70);RB2(5,6);Pause;end;
\r
510 41:if N1=56 then RL(394);
\r
513 14:case Vb of { Dusty Road }
\r
515 4:begin RC:=1;move(15)end;
\r
518 15:case Vb of { Dusty Road (endless) }
\r
519 3:begin Zap;RC:=RC-1;if RC<1 then move(14)else move(15)end;
\r
520 4:begin Zap;RC:=RC+1;move(15);if RC=40 then
\r
521 writeln('You notice something unusual.')end;
\r
522 11,13:if RC=40 then begin RL(135);Explode(3);play(1,9999,0);play(9999,1,0);
\r
523 walls(10);Explode(5);TFlag:=4;Inv:=[1,6,12,17,20,26,28,29];move(78);
\r
524 T[3]:=120;T[4]:=120;T[5]:=120;PStat:=[];MugCon:=79;Bor(0,0)end;
\r
527 16:case Vb of { Gravel Road }
\r
528 2,11:begin RL(108);move(20)end;
\r
529 3:begin RC:=1;move(17)end;
\r
531 28,31:if N1=81 then RL(109);
\r
534 17:case Vb of { Gravel Road (endless) }
\r
535 3:begin Zap;RC:=RC+1;if(RC=80)and(Inv<>[])then
\r
536 begin move(17);RS(17);Inv:=[];end
\r
538 4:begin Zap;RC:=RC-1;if RC<1 then move(16)else move(17)end;
\r
541 18:case Vb of { Paved Road }
\r
543 2:begin RC:=1;move(19);end;
\r
547 19:case Vb of { Paved Road (endless) }
\r
548 1:begin Zap;RC:=RC-1;if RC<1then move(18)else move(19)end;
\r
549 2:if RC=60 then RS(18) else begin Zap;RC:=RC+1;move(19)end;
\r
552 20:case Vb of { General Store }
\r
554 28:if N1=132 then RL(88);
\r
555 20,26,76:if(N1 in[86,87])and(5 in L[20])then
\r
556 begin RS(14);R[5]:=20;Score(15,20)end;
\r
557 39:if(5 in NounSet)or(30 in NounSet)then Score(15,20);
\r
560 21:case Vb of { Gravel Lot }
\r
563 2,9,51:if N1 in[Null,62,71] then begin RL(234);move(22)end;
\r
564 28,31:if n1=81 then begin Score(5,71);RB(1,7);Pause;end;
\r
567 22:case Vb of { Top of Ship (Barre-An) }
\r
568 1:begin RL(235);move(21)end;
\r
569 10,11,51:if(n1 in[null,62,64,71])then
\r
570 if en(23) then begin RL(236);move(2);Score(15,72)end else RL(99);
\r
571 24,28,31:case N1 of
\r
572 56:if en(23) then RL(163)else RL(99);81:begin RB(1,7);Pause;end end;
\r
574 if en(22)then begin RL(94);Min(22)end else begin RL(95);Add(22)end;
\r
576 if en(22) then begin RL(96);Add(23);Score(5,73)end else RL(97);
\r
578 if en(23) then begin RL(98);Min(23)end else say('hatch','closed');
\r
579 59:if(N1 in[49,122])or(VStr='jump off')then move(21);
\r
585 overlay procedure Room6; { Jungle Planet }
\r
588 23:case Vb of { Deep Pit }
\r
590 28,31:case N1 of 73:RL(218); 81,116:RS(80) end;
\r
591 75:if N1=73 then move(34);
\r
594 24:case Vb of { Top of Ship (Jungle planet) }
\r
595 3:begin RL(235);move(25)end;
\r
596 10,11,51:if(n1 in[null,62,64,71])then
\r
597 if en(23) then begin Score(5,74);RL(236);move(2)end else RL(99);
\r
598 24,28:if N1=56 then if en(23) then RL(163)else RL(99);
\r
600 if en(22)then begin RL(94);Min(22)end else begin RL(95);Add(22)end;
\r
602 if en(22) then begin RL(96);Add(23)end else RL(97);
\r
604 if en(23) then begin RL(98);Min(23)end else say('hatch','closed');
\r
605 59:if(N1 in[49,122])or(VStr='jump off')then move(25);
\r
608 25:case Vb of { Sandy Clearing }
\r
609 4,9,51:if N1 in[Null,62,71] then begin RL(234);move(24)end;
\r
610 1:begin move(26);Score(5,75)end;
\r
614 26:case Vb of { Winding Path 1 }
\r
616 5:begin RS(65);DEAD;end;
\r
618 if VStr='jump in' then begin RL(288);DEAD;end
\r
619 else begin RS(66);move(27);Score(25,76)end;
\r
621 9,51:if N1=112 then RL(204);
\r
622 28:if N1=66 then RS(85);
\r
623 35,62:if N1=66 then begin RL(288);DEAD;end;
\r
624 75,76:if N1=66 then RL(285);
\r
625 83:if N1=66 then RL(286);
\r
626 84:if N1=66 then begin RL(287);DEAD;end;
\r
629 27:case Vb of { Winding Path 2 }
\r
631 8,11:begin RS(65);DEAD;end;
\r
633 9,51:if N1=112 then RL(204);
\r
635 if VStr='jump in' then begin RL(288);DEAD;end
\r
636 else begin RS(66);move(26)end;
\r
637 28:if N1=66 then RS(85);
\r
638 35,62:if N1=66 then begin RL(288);DEAD;end;
\r
639 75,76:if N1=66 then RL(285);
\r
640 83:if N1=66 then RL(286);
\r
641 84:if N1=66 then begin RL(287);DEAD;end;
\r
644 28:case Vb of { Winding Path 3 }
\r
647 8:begin RS(67);DEAD;end;
\r
649 9,51:if N1=112 then RL(204);
\r
650 28:if N1=112 then RS(86);
\r
651 24:if N1=112 then RL(553);
\r
654 29:case Vb of { Winding Path 4 }
\r
656 5:if en(29) then move(32) else
\r
657 begin col(10,7);RS(72);col(11,7);T[12]:=146;Add(29);move(32)end;
\r
658 9,51:if N1 in[Null,112] then begin RL(201);move(30)end;
\r
659 6:begin RS(69);Prm:=31;T[11]:=4;end;
\r
660 8:if en(35)or en(130)then begin RC:=1;move(59);Score(20,77)end;
\r
662 28:case N1 of 112:RL(238);120:RL(544);
\r
663 113:if Md=1 then begin RL(314);Add(130)end end;
\r
664 59:if N1=120 then begin RL(541);Prm:=31;T[11]:=4;end;
\r
670 overlay procedure Room7; { Jungle Planet }
\r
673 30:case Vb of { Top of Tree }
\r
675 10,51:if N1 in[Null,112] then begin RL(203);move(29)end;
\r
677 20..28:if N1=68 then RS(79);
\r
681 31:case Vb of { Quicksand Pit }
\r
683 9,51:if N1=112 then RL(204);
\r
684 39,42,76:if N1=47 then
\r
685 if en(78)then RL(549)else begin T[11]:=0;RS(71);Prm:=29;Score(25,78)end;
\r
686 28:case N1 of 47:RL(239); 120:RL(240);end
\r
689 32:case Vb of { Winding Path 5 }
\r
691 8:begin move(29);if en(35) and not en(40) then begin RL(314);Add(40)end end;
\r
693 9,51:if N1=112 then RL(204);
\r
696 33:case Vb of { Winding Path 6 }
\r
698 6:if not en(28)then begin RS(68);Add(28);move(34)end else move(34);
\r
700 9,51:if N1=112 then RL(204);
\r
703 34:case Vb of { Front of Pyramid }
\r
705 41..44,54,75,88:if N1=56 then RL(220) else
\r
707 if HingeCon<>Null then
\r
708 begin writeln('The hinged mouth opens, revealing a ',FN(HingeCon),
\r
709 ' inside.');Add(31);R[HingeCon]:=34;Score(25,79)end
\r
710 else begin RL(226);Add(31)end;
\r
711 53:if N1=56 then RL(220) else
\r
713 begin RL(227);if HingeCon<>Null then R[HingeCon]:=Null;Min(31)end;
\r
714 1,11:if en(30) then begin Score(25,80);move(35)end else RL(219);
\r
715 39:if(PyraCon in NounSet)or((30 in Nounset)and(PyraCon=9))then
\r
716 begin RL(225);Min(30);SFlag:=false;end else
\r
717 if HingeCon in NounSet then begin RL(228);SFlag:=false;end;
\r
719 9,51:if N1=112 then RL(204);
\r
720 92:if N1 in[Null,49,122] then begin RL(216);move(23) end;
\r
721 31:if N1 in[81,89,119] then begin RB(8,7);Pause;end;
\r
722 28,24:case N1 of 68:RS(87); 89:RS(88); 81,119:begin RB(8,7);Pause;end;
\r
723 64:if PyraCon=Null then RL(241)else
\r
724 writeln('The small slot contains a ',FN(PyraCon),'.');
\r
725 56:if en(30) then RL(244)else RL(245);
\r
727 if HingeCon=Null then RL(242)else
\r
728 writeln('The open mouth contains a ',FN(HingeCon),'.')
\r
736 overlay procedure Room8; { Inside Pyramid (Top Level) }
\r
739 35:case Vb of { Vestibule }
\r
741 10,11,51:if N1 in[Null,71] then
\r
742 if en(32) then move(36) else begin RS(84);Add(32);move(36)end;
\r
743 28:if N1=56 then if en(30) then RL(244)else RL(245);
\r
746 36:case Vb of { Descending Stairs }
\r
747 10,11,51:if N1 in[Null,71] then move(37);
\r
751 37:case Vb of { Halcyon Hall }
\r
752 1:if T[16]>1 then begin RL(278);DEAD;end else move(39);
\r
754 10,51:if N1 in[Null,71] then move(42);
\r
758 38:case Vb of { Departure Room }
\r
761 73:if 10 in L[38] then begin RL(253);RL(252)end else RL(253);
\r
762 10:if 10 in L[38] then RL(254);
\r
763 30:if 17 in L[38] then begin SF;writeln('It''s a grey disk!')end
\r
765 26:if(N1=10)and(10 in L[38])then RL(255);
\r
766 42,44:if N1 in[10,73] then RL(256);
\r
767 75:if N1=73 then RL(257);
\r
769 39:if(10 in L[38])and(10 in NounSet)then
\r
770 begin L[38]:=L[38]+[17];RL(259);Score(15,81);SFlag:=false;end
\r
771 else if(30 in NounSet)and(17 in L[38])then R[17]:=38;
\r
777 overlay procedure Room9; { Inside Pyramid (Top Level) }
\r
780 39:case Vb of { Holey Hall }
\r
781 2,13:if T[15]>1 then begin RL(269);move(37);Score(5,82)end else move(37);
\r
782 4,11:if T[15]>1 then begin RS(95);DEAD;end else move(40);
\r
785 40:case Vb of { Pyramid Lobby }
\r
786 1,11:if T[14]>1 then
\r
787 begin n[68]:='podium\alter\column\';WRITE('');move(41)end;
\r
788 3,13:if(18 in Inv)or(4 in Inv)then begin Brief:=Brief-[39];move(39);
\r
789 T[15]:=3;T[16]:=9;col(10,7);RS(93);
\r
790 for i:=500 to 5500 do sound(random(i)+random(i));
\r
791 for j:=1 to 7000 do sound(random(i)+random(i));
\r
792 for j:=i downto 500 do sound(random(j)+random(j));nosound;
\r
797 if T[14]>1 then RL(246) else
\r
798 if en(33) then begin T[14]:=7;RL(261);Walls(8);end
\r
799 else begin T[14]:=7;Score(20,33);RS(89);Walls(8);end;
\r
800 28:case N1 of 56:if T[14]>1 then RL(370)else RL(92);68:RL(247)end;
\r
803 41:case Vb of { Treasure's Keeper }
\r
804 2,13:if T[14]>1 then begin n[68]:='pyramid\podium\';WRITE('');move(40)end
\r
807 56:if T[14]>1 then RL(370)else RL(92);
\r
808 68:if PodumCon=Null then RL(264) else
\r
809 writeln('There is a ',FN(PodumCon),' on the podium.');
\r
810 18:if(18 in L[41])and not en(34)then RS(90);
\r
815 if PodumCon=Null then
\r
816 begin Van(N1);R[N1]:=41;PodumCon:=N1;RL(266)end
\r
819 75:if N1=68 then RL(276);
\r
820 50:if N1=68 then begin RL(277);Walls(8);T[14]:=7;end;
\r
821 39:if(30 in NounSet)and(18 in L[41])then R[18]:=41;
\r
827 overlay procedure Room10; { Pyramid Maze }
\r
830 42:case Vb of { Ladder Room }
\r
831 1..13:if Maze then case Vb of 9,13:move(37);6:move(43);3,8:move(42)end
\r
832 else case Vb of 9,13:move(37)end;
\r
833 41..44,50,55:if N1=116 then RL(325);
\r
834 28:if N1=116 then RL(547);
\r
837 43:case Vb of { Shifting Room NW }
\r
838 1..8:if Maze then case Vb of 7:move(42)end
\r
839 else case Vb of 2:move(44);8:move(45)end;
\r
840 41..44,50,55:if N1=116 then RL(325);
\r
841 28:if N1=116 then RL(547);
\r
844 44:case Vb of { Shifting Room W }
\r
845 1..8:if Maze then case Vb of 7:move(47);2:move(45)end
\r
846 else case Vb of 1:move(43);5:move(44)end;
\r
847 41..44,50,55:if N1=116 then RL(325);
\r
848 28:if N1=116 then RL(547);
\r
851 45:case Vb of { Shifting Room SW }
\r
852 1..8:if Maze then case Vb of 1,3:move(45)end
\r
853 else case Vb of 1:move(45);6:move(43)end;
\r
854 41..44,50,55:if N1=116 then RL(325);
\r
855 28:if N1=116 then RL(547);
\r
858 46:case Vb of { Shifting Room N }
\r
860 case Vb of 1:begin RS(98);DEAD;end;
\r
861 7:begin Score(50,84);move(50)end end
\r
863 case Vb of 1:begin RS(98);DEAD;end;
\r
864 7:begin Score(50,84);move(50)end;3:move(48);8:move(45)end;
\r
865 41..44,50,55:if N1=116 then RL(325);
\r
866 28:if N1=116 then RL(547);
\r
869 47:case Vb of { Shifting Room S }
\r
870 1..8:if Maze then case Vb of 6:move(44)end
\r
871 else case Vb of 3:move(49);1:move(47);4:move(45)end;
\r
872 41..44,50,55:if N1=116 then RL(325);
\r
873 28:if N1=116 then RL(547);
\r
876 48:case Vb of { Shifting Room NE }
\r
877 1..8:if Maze then case Vb of 7:move(49);3,4:move(48)end
\r
878 else case Vb of 4:move(46);1,2:move(48)end;
\r
879 41..44,50,55:if N1=116 then RL(325);
\r
880 28:if N1=116 then RL(547);
\r
883 49:case Vb of { Shifting Room SE }
\r
884 1..8:if Maze then case Vb of 5:move(48)end
\r
885 else case Vb of 4:move(47);2:move(45)end;
\r
886 41..44,50,55:if N1=116 then RL(325);
\r
887 28:if N1=116 then RL(547);
\r
890 50:case Vb of { Stairway Room E }
\r
892 4,10,13,51:move(51);
\r
893 41..44,50,55:if N1=116 then RL(325);
\r
899 overlay procedure Room11; { Inside Pyramid (Bottom Level) }
\r
902 51:case Vb of { Lower Stairway }
\r
903 3,9,13,51:move(50);
\r
907 52:case Vb of { Misty Passage }
\r
908 2:if T[19]>1 then begin RS(129);DEAD;end else move(51);
\r
909 4:if en(35)then begin RL(305);DEAD;end else move(53);
\r
910 33:if(N1=11)and(11 in Inv)then
\r
911 if Pr in[1,5,7,10] then
\r
912 if N2 in[34,49,64] then
\r
914 begin Score(40,39);Van(11);L[52]:=L[52]+[11];T[19]:=0;RS(127)end
\r
915 else begin Van(N1);R[N1]:=52;RL(586)end;
\r
916 39:if(11 in NounSet)and en(39)then RL(307);
\r
917 28:case N1 of 11:RL(312); 64:RL(313) end;
\r
918 42,44,55:case N1 of 11:RL(307); 34:RL(308); end;
\r
922 53:case Vb of { Damp Passage }
\r
923 2:begin move(54);if en(35)then begin RS(122);DEAD;end end;
\r
924 3:if T[18]>1 then begin RL(305);DEAD;end else move(52);
\r
926 begin RS(125);Brief:=Brief-[52];move(52);T[18]:=0;T[19]:=3;
\r
927 col(10,7);RL(306);Walls(12);Score(20,85)end;
\r
930 54:case Vb of { Dark Passage }
\r
935 55:case Vb of { Circular Chamber }
\r
936 1:begin Brief:=Brief-[54];move(54);
\r
939 begin col(10,7);RS(119);RS(120);Pause;L[53]:=L[53]+[66];Score(20,86);
\r
940 Brief:=Brief-[53];move(53);col(10,7);RS(121);Walls(12);T[18]:=4;end
\r
941 else begin col(10,7);RS(118);DEAD;end end;
\r
942 2:if Md=1 then RS(230)else
\r
943 if random(2)=1 then begin Prm:=58;RL(563)end else begin RS(100);DEAD;end;
\r
944 3:begin move(56);if 11 in Inv then begin RS(102);DEAD;end end;
\r
945 4:if Md=1 then RS(231)else begin RS(99);DEAD;end;
\r
946 39:if(11 in NounSet)then begin RS(101);SFlag:=false;end
\r
947 else if(30 in Nounset)and(11 in L[55])then R[11]:=55;
\r
953 overlay procedure Room12; { Inside Pyramid (Bottom Level) }
\r
956 56:case Vb of { The Erusaert }
\r
957 2,11:if en(36) then begin Score(5,88);move(57)end;
\r
958 4,13:if T[17]>4 then begin RS(108);DEAD;end else move(55);
\r
960 1:if not en(35) then RL(292);
\r
961 34:if 1 in L[56]then RL(291)
\r
962 else if not en(35)then begin RS(103);L[56]:=L[56]+[1]end;
\r
969 26:if N1 in[49,68] then RL(295);
\r
970 39:if 1 in NounSet then
\r
972 if not en(35)then RL(300) else
\r
974 begin RS(113);T[17]:=3;Van(1);Inv:=Inv+[1];Score(50,87)end
\r
976 else if(30 in NounSet)then RL(578);
\r
977 37:if not(1 in NounSet)and(not en(35))then RL(300);
\r
978 35,51,62:if N1=68 then begin RS(106);DEAD;end;
\r
979 59:begin RS(107);DEAD;end;
\r
980 41,88:if N1 in[68,110] then
\r
983 if here(16)and en(37)then
\r
984 begin RS(117);T[17]:=6;L[56]:=L[56]+[1,56];Add(35);Min(37)end
\r
985 else begin RS(111);DEAD;end
\r
990 if Pr in[1,10] then
\r
991 if N2 in[49,1] then
\r
992 begin Van(16);Add(37);R[16]:=56;
\r
994 if Pr=1 then RL(297)else RL(298)
\r
998 if(N2=34)and(Pr=10)then
\r
999 begin writeln('Done.');Van(16);SF;R[16]:=56;end
\r
1000 else if N2=68 then RL(299)
\r
1003 if N2 in[68,110] then
\r
1004 if Pr=1 then RL(299) else
\r
1008 if here(16)and en(37)then
\r
1009 begin RS(117);T[17]:=6;L[56]:=L[56]+[1];Add(35);Min(37)end
\r
1010 else begin RS(111);DEAD;end
\r
1013 54,75,76:case N1 of
\r
1014 1:if 1 in L[56] then RL(300);
\r
1022 overlay procedure Room13; { Inside Pyramid (Bottom Level) }
\r
1025 57:case Vb of { Solar Chamber }
\r
1027 28:case N1 of 56:RL(370);72,82,116:RS(149);109:RS(150)end;
\r
1028 44,75:if N1=103 then begin Prm:=58;RS(233);Walls(5);Static end;
\r
1031 58:case Vb of { Eternal Trap }
\r
1036 59:case Vb of { Overgrown Path }
\r
1037 5:begin RC:=RC-1;if RC<1 then begin RL(309);move(29)end else RL(310)end;
\r
1038 8:begin RC:=RC+1;if RC>7 then begin RL(309);move(60)end else RL(310)end;
\r
1040 9,51:if N1=112 then RL(204);
\r
1043 60:case Vb of { Antenna Building (Outside) }
\r
1044 4,11:begin Door(61,25);
\r
1045 if not en(43)then begin RS(137);Score(10,43)end end;
\r
1048 28:case N1 of 96:RL(323);115:RL(324)end;
\r
1049 41..44,54,75,88:if N1=56 then RL(315);
\r
1050 9,51:if N1=112 then RL(204)else RL(316);
\r
1053 61:case Vb of { Monitor Outpost }
\r
1056 28,24,31:case N1 of 37,59:RS(133);38,44:RL(322);93:RL(319);
\r
1058 42,44,75:if N1 in[37,38,44] then RL(318);
\r
1061 62:case Vb of { Booth (Jungle Planet) }
\r
1067 for y:=60 downto 1 do for x:=800 downto 1 do sound(x*y);
\r
1068 nosound;TFlag:=3;Brief:=Brief-[70];Score(10,89);
\r
1069 for x:=1 to MMax do if R[x]=62 then R[x]:=70;move(70)
\r
1072 28,24,31:case N1 of 37,59:RS(133);38:RL(322);93:RL(319);
\r
1073 94:RS(134);44:RL(320);end;
\r
1076 63:case Vb of { Booth (Ringed Planet) }
\r
1078 42,44,75:case N1 of
\r
1081 for y:=60 downto 1 do for x:=800 downto 1 do sound(x*y);
\r
1082 nosound;TFlag:=3;Brief:=Brief-[70];
\r
1083 for x:=1 to MMax do if R[x]=63 then R[x]:=70;move(70)
\r
1086 28,24,31:case N1 of 37,59:RS(133);38:RL(322);93:RL(319);
\r
1087 94:RS(134);44:RL(320);end;
\r
1088 39:if(30 in NounSet)and(20 in L[63])then R[20]:=63;
\r
1094 overlay procedure Room14; { Inner Planet }
\r
1097 64:case Vb of { Lobby }
\r
1098 1,13:begin DOpen(99);RS(139);DEAD;end;
\r
1100 28:case N1 of 35:RL(330);49,122:RL(334);72,116:begin Score(5,90);RS(148)end;
\r
1101 81:RB(5,11);86:RL(333);127:RL(351)end;
\r
1102 31:if N1=81 then RB(5,11);
\r
1103 20,24:if N1=127 then RS(142);
\r
1104 54:if N1=127 then if Md=3 then begin RL(537);DEAD;end else RL(538);
\r
1107 65:case Vb of { North Corridor }
\r
1111 28:if N1=56 then RL(92);
\r
1114 66:case Vb of { Central Corridor }
\r
1117 3:if T[20]>1 then begin Score(15,91);move(73)end else RL(92);
\r
1119 28:case N1 of 56:if T[20]>1 then RL(370)else RL(92);64:RL(335)end;
\r
1123 begin RL(336);T[20]:=3;DOpen(20);Score(5,92)end
\r
1127 67:case Vb of { South Corridor }
\r
1133 71:case Vb of { Monitor Station }
\r
1135 28:case N1 of 59:if CodeSet=4 then RL(353)else RL(355);116:RL(354)end;
\r
1137 if CodeSet=4 then begin RB2(11,14);Pause;end else RL(355);
\r
1140 72:case Vb of { Reactor Control }
\r
1142 28,24:case N1 of 128:RL(560);
\r
1143 37,38:RL(339);46:if Md<>Null then begin Score(5,93);RL(343)end
\r
1146 if RobotCon<>Null then
\r
1147 writeln('The robot''s panel contains a ',FN(RobotCon),'.')
\r
1154 if RobotCon=Null then
\r
1155 if N1 in[3,4,8,12,17]then
\r
1156 begin Van(N1);RL(347);R[N1]:=72;RobotCon:=N1;end
\r
1160 41:if N1 in[55,46] then
\r
1161 if RobotCon=Null then RL(558)else
\r
1162 begin R[RobotCon]:=72;Add(46);Score(25,94);
\r
1163 writeln('The panel slides open, revealing a ',FN(RobotCon),' inside.')
\r
1165 53:if N1=55 then begin Van(RobotCon);Min(46);RL(344)end;
\r
1167 37,38,44:begin RL(340);Walls(9);gotoxy(43,wherey-1);col(28,31);
\r
1168 writeln('BOOM!');Explode(32);DEAD;end;
\r
1169 46:if(VStr='turn on')or(VStr='activat')or
\r
1170 (VStr='turn off')then RL(341)
\r
1171 else if(not en(94))and(not en(93))then begin RL(342);RL(559)end
\r
1179 overlay procedure Room15; { Inner Planet }
\r
1182 68:case Vb of { Decontamination }
\r
1183 3,13:if en(45)then Door(65,20) else RL(331);
\r
1185 28,24:case N1 of 131:RL(329);end;
\r
1186 42,44,75:if N1=44 then begin RL(332);Add(45);play(20,99,7);play(99,99,600);
\r
1187 play(99,20,7);Score(10,95)end;
\r
1190 69:case Vb of { Waiting Room }
\r
1193 28,24:case N1 of 35:RL(330);131:RL(329);end;
\r
1196 70:case Vb of { Transporter Booth }
\r
1198 28,24:case N1 of 44:RS(140);93:RL(319);94:RS(141);end;
\r
1200 if N1 in[40..43]then
\r
1201 begin Brief:=Brief-[62,63,78];RS(138);Min(45);
\r
1202 for y:=60 downto 1 do for x:=800 downto 1 do sound(x*y);nosound;
\r
1204 40:begin for x:=1 to MMax do if R[x]=70 then R[x]:=78;
\r
1205 TFlag:=4;move(78);Score(15,97)end;
\r
1206 41:begin for x:=1 to MMax do if R[x]=70 then R[x]:=62;
\r
1207 TFlag:=2;move(62)end;
\r
1208 43:begin for x:=1 to MMax do if R[x]=70 then R[x]:=63;
\r
1209 TFlag:=2;move(63);Score(10,96)end
\r
1214 { 71 and 72 are in Room14 }
\r
1219 overlay procedure Room16; { Inner Planet }
\r
1222 73:case Vb of { Communications }
\r
1226 48:begin RL(366);writeln('The dial is set at number ',CodeSet,'.')end;
\r
1227 115:RL(350);121:RL(367);127:RL(351)
\r
1231 if(code>0)and(code<11)then
\r
1232 begin RL(363);CodeSet:=Code;if Code=4 then Score(10,98)end
\r
1237 74:case Vb of { Computer Station }
\r
1239 28:case N1 of 37:RL(349);38:RL(322);52:RL(37);
\r
1240 59:begin RB2(7,10);col(26,23);RL(364);Score(5,47)end end;
\r
1241 31:if N1=59 then begin RB2(7,10);col(26,23);RL(364);Add(47)end;
\r
1244 75:case Vb of { Elevator 1st Floor }
\r
1246 42,44,75:begin RS(143);play(20,42,20);sound(42);delay(5500);RL(338);
\r
1247 play(42,20,20);Prm:=76;for x:=1 to MMax do if R[x]=75 then R[x]:=76;end;
\r
1250 76:case Vb of { Elevator 2nd Floor }
\r
1251 1:begin Score(5,99);Door(77,5)end;
\r
1252 42,44,75:begin RS(144);play(20,42,20);sound(42);delay(5500);RL(338);
\r
1253 play(42,20,20);Prm:=75;for x:=1 to MMax do if R[x]=76 then R[x]:=75;end;
\r
1256 77:case Vb of { Observatory }
\r
1258 28:case N1 of 34:RL(562);104:if Nstr='eyepiec' then RL(561)else RS(146)end;
\r
1260 if 20 in Wear then begin Score(5,100);RS(147)end
\r
1261 else begin RL(368);RL(369)end;
\r
1267 overlay procedure Room17; { Planetship }
\r
1270 78:case Vb of { Icy Platform }
\r
1273 54:RL(379);93:RL(380);96:RL(381);103:RL(500);115:RL(350);118:RL(382)
\r
1275 59:if N1=54 then begin RL(400);DEAD;end;
\r
1278 79:case Vb of { Confirmation Port }
\r
1280 28:case N1 of 44:RL(383);64:RL(384);116:RL(600)end;
\r
1281 44,75:if N1=44 then begin RS(156);Score(10,50);
\r
1282 play(20,99,7);play(99,99,600);play(99,20,7)end;
\r
1286 begin Explode(1);sound(50);RS(151);
\r
1287 for i:=9000 downto 1 do
\r
1288 for j:=1 to 4 do sound(random(i div 2 + 400)+i);nosound;
\r
1289 Van(17);L[80]:=L[80]+[17];move(80);Add(7);T[22]:=3;T[26]:=91;
\r
1290 delay(900);sound(70);RL(399);delay(999);nosound;Score(25,101);
\r
1291 n[40]:='sockets\socket\';
\r
1292 n[82]:='laser beam\laser\beam\';
\r
1293 n[110]:='speaker\';
\r
1298 80:case Vb of { Inspection Lobby }
\r
1301 28:case N1 of 55:RL(385);86:if 17 in L[80]then RL(395);72,116:RS(148)end;
\r
1302 41..44,88,53:if N1=55 then RL(405);
\r
1308 overlay procedure Room18; { Planetship }
\r
1311 81:case Vb of { Circular Corridor }
\r
1315 28:case N1 of 72:RL(386)end;
\r
1318 82:case Vb of { Circular Corridor }
\r
1323 28:case N1 of 72,103:RL(387)end;
\r
1326 83:case Vb of { Circular Corridor }
\r
1330 28:case N1 of 72,115:RL(388)end;
\r
1333 93:case Vb of { Central Elevator }
\r
1334 3,11,13:case Floor of
\r
1336 2..5,30..40,89..95,170..230,333..444,543..600,793..812:RL(413);
\r
1338 begin door(98,5);delay(999);RS(217);Score(20,102);
\r
1339 for x:=1 to 7 do begin i:=random(7000)+1500;j:=random(600)+400;
\r
1343 else begin door(97,5);Score(5,103)end
\r
1345 28:if N1 in[44,52] then RS(188);
\r
1346 56:begin val(input,i,testc);
\r
1348 if(i>0)and(i<837)then
\r
1350 begin j:=i;i:=abs(floor-i);Floor:=j;RL(411);play(20,36,35);
\r
1351 sound(37);for x:=1 to 200 do delay(i div 4);
\r
1352 RL(412);play(36,20,35);
\r
1360 95:case Vb of { Transmission Room }
\r
1362 28:if N1 in[38,121]then RS(191);
\r
1363 42,44,75:if N1=44 then begin Score(5,104);RL(404);play(1200,1200,99);
\r
1364 if en(48)then Min(48)else Add(48)end;
\r
1367 96:case Vb of { Station Control }
\r
1369 28:case N1 of 38:RS(192);59:begin Score(5,105);RB2(11,5);Pause;end end;
\r
1370 31:if N1=59 then begin Score(5,105);RB2(11,5);Pause;end;
\r
1376 overlay procedure Room19; { Planetship }
\r
1379 84:case Vb of { Circular Corridor }
\r
1383 28:case N1 of 72,46:RL(389)end;
\r
1386 85:case Vb of { Circular Corridor }
\r
1390 28:case N1 of 72:RL(390)end;
\r
1393 86:case Vb of { Circular Corridor }
\r
1395 4,11:if T[21]>1 then begin Score(15,107);move(91);
\r
1396 if en(52)then T[23]:=2;end else RL(92);
\r
1398 28:case N1 of 56:if T[21]>1 then RL(370);64:RL(335);72,69:RL(391)end;
\r
1402 begin RL(336);T[21]:=3;DOpen(15);Score(5,106)end
\r
1406 87:case Vb of { Circular Corridor }
\r
1410 28:case N1 of 72:RL(392)end;
\r
1413 88:case Vb of { Circular Corridor }
\r
1417 28:case N1 of 72:RL(392)end;
\r
1420 89:case Vb of { Reactors West }
\r
1423 28:case N1 of 38:RL(414);59:RL(401);128:RS(189)end;
\r
1426 1:RB2(8,6); { Orange Crystal }
\r
1427 2:RB2(10,10); { Green Crystal }
\r
1428 3:RB2(12,14); { Yellow Crystal }
\r
1429 4:begin RB2(14,9); { Blue Crystal (Cracked) }
\r
1430 x:=wherex;y:=wherey;gotoxy(40,14);col(25,23);write('LACITIRC');
\r
1431 gotoxy(x,y);Score(20,108)
\r
1434 44,75:if N1=44 then
\r
1435 begin RL(402);ScrnSet:=ScrnSet+1;if ScrnSet>4 then ScrnSet:=1;
\r
1437 begin i:=random(7000)+999;play(i,i,50);delay(random(15)+5)end
\r
1439 if N1 in[38,128]then RL(403);
\r
1440 42,75:if N1 in[38,128]then RL(403);
\r
1446 overlay procedure Room20; { Planetship }
\r
1449 90:case Vb of { Reactors East }
\r
1452 28:case N1 of 38:RL(393);59:RL(402);128:RS(190)end;
\r
1453 31:if N1=59 then begin Score(5,109);RB2(9,random(14)+1)end;
\r
1454 42,44,75:if N1 in[38,128]then RL(403);
\r
1457 91:case Vb of { Emergency Override }
\r
1458 3,13:begin if T[25]>2 then
\r
1459 begin Col(10,7);RL(424);T[25]:=Null;T[24]:=Null;T[26]:=14;Add(52)end;
\r
1461 if(T[24]>0)and not en(64)then begin T[24]:=Null;T[26]:=14;Add(52)end
\r
1464 28:case N1 of 37,38,51:RL(393);44:RL(469);59:RL(468);64:RL(335);
\r
1465 69:if en(51)then RL(426)else if Md=1 then RL(467)else RS(182);
\r
1467 31:if N1=59 then RL(468);
\r
1468 24:if N1=69 then if en(51)then crazy else RL(427);
\r
1469 75:if N1=69 then if en(51)then crazy else RL(428);
\r
1471 69:if en(51)then RL(426)else
\r
1472 if N2 in[0,60]then RL(601)else
\r
1473 if not(N2 in[10,18,29])then RL(602)else
\r
1474 begin RS(160);L[91]:=L[91]+[123];L[91]:=L[91]-[44,129];T[23]:=15;
\r
1477 42,44:if(N1=69)and not en(51)then RL(470)else
\r
1478 if N1=44 then begin RL(471);play(20,440,1);play(440,440,500);
\r
1479 play(440,20,1);end;
\r
1480 41,88:if N1=69 then if en(51)then crazy else RL(467);
\r
1481 39:if N1=95 then RL(442);
\r
1485 if(T[24]>1)and(T[24]<6)then
\r
1486 begin T[24]:=Null;T[25]:=7;RS(181)end
\r
1491 if N1=12 then RL(577);
\r
1494 92:case Vb of { Climate Control }
\r
1496 28,31:case N1 of 59:RS(152);end;
\r
1502 overlay procedure Room21; { Planetship }
\r
1505 94:case Vb of { Maintenance }
\r
1509 87:begin RL(490);Score(15,110);
\r
1511 begin Score(10,49);RL(396);L[94]:=L[94]+[26];end
\r
1512 else if 26 in L[94] then RL(397);
\r
1516 if(30 in NounSet)then
\r
1517 begin if 2 in L[94] then R[2]:=94;if 26 in L[94] then R[26]:=94;end;
\r
1518 if(51 in NounSet)then
\r
1519 begin RL(491);NounSet:=NounSet-[51];
\r
1520 if not(NounSet=[])then SFlag:=false end
\r
1524 97:case Vb of { Cryogenic Chamber }
\r
1525 4,11,13:door(93,5);
\r
1526 28:if N1=69 then RS(193);
\r
1527 18:begin RS(194);Van(N1)end;
\r
1530 98:case Vb of { Identity Booth }
\r
1531 2,11:begin door(99,0);
\r
1532 if T[27]>1 then begin Col(10,7);RS(208);delay(999);Blast;DEAD end
\r
1533 else begin T[27]:=2000;Col(10,7);RL(504);play(22,22,999);RS(210);
\r
1534 delay(999);Blast;RL(505)end
\r
1537 28,31:case N1 of 81,119:if NStr='message' then RL(517)else RB2(13,13);
\r
1541 99:case Vb of { Security Tunnel #1 }
\r
1543 2,11:begin Score(15,111);door(100,0)end;
\r
1545 41,88:if N1=55 then RL(509);
\r
1546 28:case N1 of 46:RS(216);55:RL(510);88:RL(511)end;
\r
1547 42,44,75:if N1=46 then begin RL(513);T[27]:=2000;Add(7)end;
\r
1548 39:if 88 in NounSet then begin RL(513);T[27]:=2000;Add(7)end;
\r
1551 100:case Vb of { Security Tunnel #2 }
\r
1552 1,13:begin door(99,0);Col(10,7);RS(208);delay(999);Blast;DEAD end;
\r
1553 2,11:begin door(101,0);
\r
1554 if T[28]>1 then begin Col(10,7);RS(209);delay(999);Blast;DEAD end
\r
1555 else begin T[28]:=2000;Col(10,7);RL(504);play(22,22,999);RS(211);
\r
1556 delay(999);Blast;RS(212);PStat:=PStat+[4];T[29]:=14;end;
\r
1558 41,88:if N1=55 then RL(512);
\r
1564 overlay procedure Room22; { Planetship (Lower Level) }
\r
1567 101:case Vb of { Security Tunnel #3 }
\r
1569 2,11:begin Region:=5;door(102,0);Score(20,112);
\r
1570 if not(20 in Wear)then RL(492)end;
\r
1571 41,88:if N1=55 then RL(509);
\r
1572 28:case N1 of 46:RS(216);55:RL(510);88:RL(511)end;
\r
1573 42,44,75:if N1=46 then begin RL(513);T[28]:=2000;Add(7)end;
\r
1574 39:if 88 in NounSet then begin RL(513);T[28]:=2000;Add(7)end;
\r
1577 102:if(Vb in[1..14,16,20..31,33..44,48..64,73..76,83..85,88..94])and
\r
1578 not(20 in Wear)then RL(491) else
\r
1579 case Vb of { North Catwalk }
\r
1580 1,11,13:begin Region:=Null;Door(101,0);Col(10,7);RS(209);delay(999);
\r
1584 24,25,28:case N1 of 34,49:RL(493);
\r
1585 131:if NStr='catwalk' then RL(494)else begin RS(195);RS(196)end end;
\r
1586 75,76:if N1=42 then RL(495);
\r
1587 51,59:if N1 in[42,54,131]then begin RL(496);DEAD;end;
\r
1590 103:if(Vb in[1..14,16,20..31,33..44,48..64,73..76,83..85,88..94])and
\r
1591 not(20 in Wear)then RL(491) else
\r
1592 case Vb of { East Catwalk }
\r
1595 24,25,28:case N1 of 34,49:RL(493);
\r
1596 131:if NStr='catwalk' then RL(494)else begin RS(195);RS(196)end end;
\r
1597 75,76:if N1=42 then RL(495);
\r
1598 51,59:if N1 in[42,54,131]then begin RL(496);DEAD;end;
\r
1601 104:if(Vb in[1..14,16,20..31,33..44,48..64,73..76,83..85,88..94])and
\r
1602 not(20 in Wear)then RL(491) else
\r
1603 case Vb of { South Catwalk }
\r
1604 2,13:begin Region:=Null;Door(106,5);Score(20,113)end;
\r
1607 24,25,28:case N1 of 34,49:RL(493);
\r
1608 131:if NStr='catwalk' then RL(494)else begin RS(195);RS(196)end end;
\r
1609 75,76:if N1=42 then RL(495);
\r
1610 51,59:if N1 in[42,54,131]then begin RL(496);DEAD;end;
\r
1613 105:if(Vb in[1..14,16,20..31,33..44,48..64,73..76,83..85,88..94])and
\r
1614 not(20 in Wear)then RL(491) else
\r
1615 case Vb of { West Catwalk }
\r
1618 24,25,28:case N1 of 34,49:RL(493);
\r
1619 131:if NStr='catwalk' then RL(494)else begin RS(195);RS(196)end end;
\r
1620 75,76:if N1=42 then RL(495);
\r
1621 51,59:if N1 in[42,54,131]then begin RL(496);DEAD;end;
\r
1627 overlay procedure Room23; { Planetship (Lower Level) }
\r
1631 106:case Vb of { Junction }
\r
1632 1:begin Region:=5;Door(104,5);if not(20 in Wear)then RL(492)end;
\r
1635 4,11,13:door(107,20);
\r
1636 41..44,88:if N1=56 then RL(532);
\r
1639 107:case Vb of { Conference Room }
\r
1640 3,13:door(106,20);
\r
1641 39:if(30 in NounSet)and(19 in L[107])then R[19]:=107;
\r
1644 108:case Vb of { Reactor Regulators }
\r
1648 begin Add(65);L[108]:=L[108]+[40];Score(5,114);
\r
1649 for x:=22 to 25 do R[x]:=108;RL(519);RL(520);
\r
1652 53:if en(65)then RL(522)else RL(523);
\r
1653 28,24:case N1 of 55:if en(65)then goto JUMP else RL(523);
\r
1656 for x:=1 to 25 do if x in Socket then
\r
1657 if x=22 then writeln(' An ',FN(x),' is in one of the sockets.')
\r
1658 else writeln(' A ',FN(x),' is in one of the sockets.')
\r
1661 33:if(N2 in[40,55])and en(65)then
\r
1662 begin i:=0;for x:=1 to 25 do if x in Socket then i:=i+1;
\r
1665 if N1 in[1,22..25]then
\r
1667 writeln('The ',FN(N1),' fits perfectly in an open socket.');
\r
1668 Van(N1);Socket:=Socket+[N1];R[N1]:=108;
\r
1669 i:=0;for x:=1 to 25 do if x in Socket then i:=i+1;
\r
1670 if(i>3)and(1 in Socket) and not(25 in Socket)then
\r
1671 begin { #### You have won the game!!!!! #### }
\r
1672 Col(10,7);delay(999);Static;Static;RS(221);Static;Static;
\r
1673 delay(999);explode(1);sound(20);RS(222);delay(999);RS(223);
\r
1674 Pause;Bor(0,0);writeln;Score(55,115);
\r
1675 Add(66);Prm:=109;PStat:=[];PlayerInput(Line);
\r
1676 Col(10,15);for x:=224 to 229 do RS(x);
\r
1677 writeln;writeln;Pause;writeln;
\r
1678 WON; { <<<----- END OF GAME !!! *************}
\r
1681 else writeln('The ',FN(N1),' won''t fit in any of the sockets.')
\r
1682 else writeln('First you must have the ',FN(N1),'.')
\r
1690 {**************************** END OF ROOM ROUTINES **************************}
\r
1693 {$Ia:DEFAULT.pas <<<<<------ LOADS IN DEFAULT ROUTINES *******************}
\r
1696 BEGIN { Main Program }
\r
1697 Assign1;Assign2;Assign3;Assign4;Assign5;
\r
1698 Names1;Names2;Names3;
\r
1700 Init1;Init2;Init3;
\r
1706 PlayerInput(LINE);
\r
1707 if length(input)>0 then Parser_Syntax(input);
\r
1708 if EFlag=Legal then
\r
1713 begin RL(11);Time1;
\r
1714 case TFlag of 1:Time2A;2:Time2B;3:Time2C;4:Time2D;end end
\r
1716 begin SFlag:=false; if(Vb=71)and(Prm=55)and not en(35)then Vb:=1;
\r
1731 64..67,71,72 :Room14;
\r
1735 81..83,93,95,96 :Room18;
\r
1738 94,97..100 :Room21;
\r
1741 end; { Room Defaults }
\r
1744 1..8,30,82,87 :Default0;
\r
1745 16,17,18 :Default1;
\r
1746 9..15,32,35,51,77,79,62 :Default2;
\r
1750 66..69,71 :Default6;
\r
1751 31,65,75,80,81,83,84,93,95 :Default7;
\r
1752 41,50,88 :Default8;
\r
1753 20,22,24,26,70,76 :Default9;
\r
1755 42,44,73,86,89,90,94 :Default11;
\r
1757 19,53,56,72,74,78,91 :Default13;
\r
1758 21,25,49,59,92 :Default14
\r
1760 if en(128)then DEAD;Min(128);
\r
1761 if not(Vb in[77..79,82,86,87,95])then
\r
1762 begin Time1;case TFlag of 1:Time2A;2:Time2B;3:Time2C;4:Time2D;end end;
\r
1767 END. { ADGAME2 (Supernova) }
\r