10 ' PYRAMID1
20 MODE 1:BORDER 0
30 FOR i=0 TO 3:INK i,0:NEXT i
40 MEMORY &3FFF
50 LOAD"Pyramid1.cmp"
60 FOR i=0 TO 3:INK i,0:NEXT i
70 POKE &A634,&C8:POKE &A635,0:POKE &A636,0:CALL &A60B
80 POKE &C7F1,&C9:CALL &C7D0
90 CALL &A60B
100 WINDOW #1,25,36,4,19
110 INK 0,0:INK 1,3:INK 2,15:INK 3,24

120 PEN #1,3:PRINT #1:PRINT #1,"A":PRINT #1,"pyramid":PRINT #1,"almost":PRINT #1,"swallowed":PRINT #1,"by the"
125 PRINT #1,"sand,":PRINT #1,"with":PRINT #1,"its sealed":PRINT #1,"entrance":PRINT #1,"guarding":PRINT #1,"secrets..."

130 LOCATE 13,20:PEN 2:PRINT"WHAT WILL YOU DO ?"
140 PEN 3:LOCATE 4,21:PRINT "1-NORTH   2-SOUTH   3-WEST  4-EAST"
150 PEN 2:LOCATE 4,22:PRINT "5-Examine the pyramid"
160 PEN 3:LOCATE 4,23:PRINT "6-Climb the pyramid"
170 PEN 2:LOCATE 4,24:PRINT "7-Grumble   8-Urinate  9-Defecate"

200 k$=INKEY$
210 IF k$="1" OR k$="3" OR k$="4" THEN GOTO 300
220 IF k$="2"THEN RUN"Desert4.bas"
250 IF k$="5"THEN GOTO 600
260 IF k$="6"THEN GOTO 1100
265 IF k$="7"THEN GOTO 400
270 IF k$="8" AND PEEK(&BE85)=0 THEN GOTO 1300
280 IF k$="8" AND PEEK(&BE85)=1 THEN GOTO 1400
290 IF k$="9"THEN GOTO 500
295 IF k$<"1"OR k$>"9" THEN GOTO 200

300 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
310 PEN 1:PRINT:PRINT"You plan to leave the pyramid?"
320 PEN 2:PRINT:PRINT"No way !!!":PRINT"I prefer to stay here, where the":PRINT"real story is!"
330 PEN 3:PRINT:PRINT"TARIQ sent you to Qattara for this,":PRINT"not just to count sand dunes!"
340 PEN 2:PRINT:PRINT"I might go SOUTH if you think you":PRINT"forgot something.":PRINT:PEN 3:PRINT"We could even go to CAIRO if you want..."
350 LOCATE 12,11:PEN 3:PRINT"SOUTH"
360 PEN 2:LOCATE 1,16:PRINT"But elsewhere? No thanks!"
370 PEN 1:PRINT:PRINT"Who's the boss here anyway?!?"
380 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
390 GOTO 60

400 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
410 PEN 3:PRINT"Oh, our Egyptologist is grumpy?"
420 PEN 1:PRINT:PRINT"Not happy?"
430 PEN 2:PRINT:PRINT"Does he pout in the desert?":PEN 1:PRINT:PRINT"Stomping feet, sulking?"
440 PEN 3:PRINT:PRINT"What's the problem?":PRINT:PRINT"Too much sand in sandals?":PRINT:PRINT"Struggling with the adventure?"
450 PEN 2:PRINT:PRINT"Or maybe he preferred a Nile":PRINT"cruise with free buffet?"
460 PEN 1:PRINT:PRINT"Here, a magic kiss...":PRINT:PRINT"                ...and off we go!"
470 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
480 GOTO 60

500 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
510 PEN 1:PRINT:PRINT"Uh... excuse me? Defecate?"
520 PEN 3:PRINT:PRINT"That's too far, are you serious?"
530 PEN 2:PRINT:PRINT"I'm a narrator, not a public":PRINT"toilet keeper!"
540 PEN 3:PRINT:PRINT"I refuse to endorse the sick":PRINT"delusions of the programmer!":PRINT:PRINT"Even less your bowel whims."
550 PEN 2:PRINT:PRINT"Remember, you are supposed to":PRINT"explore the desert, not fertilize it."
560 PEN 1:PRINT:PRINT:PRINT"           Shame on you!"
570 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
580 GOTO 60

600 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
605 IF PEEK(&BE86)=1 THEN GOTO 1700
610 PEN 3:PRINT:PRINT"A pyramid almost swallowed by sand,":PRINT"entrance closed."
620 PEN 2:PRINT:PRINT"Even the wind seems to have given up":PRINT"before you..."
630 PEN 1:PRINT:PRINT"But who knows what centuries":PRINT"of dust and stones hid inside?"
640 PEN 3:PRINT:PRINT"A strong smell of cat urine":PRINT"escapes from the left flank of the":PRINT"pyramid."
650 PEN 2:PRINT:PRINT"Three scarab-shaped holes":PRINT"overhang the door, as if saying:"
660 PEN 1:PRINT:PRINT CHR$(34);"Enter if you dare... or sniff":PRINT"cat surprises!";CHR$(34)
670 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
680 IF PEEK(&BE80)<5 THEN GOTO 60
690 IF PEEK(&BE80)>=5 THEN GOTO 700

700 CLS
710 PEN 3:PRINT:PRINT"Looking closer, the three scarabs":PRINT"seem familiar..."
715 PEN 1:PRINT:PRINT"Yes, that's it!!!"
720 PEN 2:PRINT:PRINT"They match exactly the scarabs":PRINT"you got from the market deal!"
730 PEN 1:PRINT:PRINT"But each color must be placed":PRINT"in the correct order..."
740 PEN 3:LOCATE 1,17:INPUT"Do you want to insert them (Y/N) ";sc$
750 IF UPPER$(sc$)="Y" THEN GOTO 800
760 IF UPPER$(sc$)="N" THEN GOTO 60
770 IF UPPER$(sc$)<>"Y" OR UPPER$(sc$)<>"N" THEN GOTO 740

800 CLS
810 PEN 3:PRINT:PRINT"In what order will you insert the 3 scarabs?"
820 PEN 2:PRINT:PRINT"1) Yellow - Brown - Orange"
830 PEN 3:PRINT"2) Yellow - Orange - Brown"
840 PEN 2:PRINT"3) Orange - Yellow - Brown"
850 PEN 3:PRINT"4) Orange - Brown - Yellow"
860 PEN 2:PRINT"5) Brown - Yellow - Orange"
870 PEN 3:PRINT"6) Brown - Orange - Yellow"
880 PEN 1:LOCATE 1,17:INPUT"Your choice (1-2-3-4-5-6) ";sc$
890 IF sc$="1" OR sc$="2" OR sc$="3" OR sc$="5" OR sc$="6" THEN GOTO 900
892 IF sc$="4" THEN GOTO 1000
895 GOTO 880

900 CLS:PEN 3:PRINT"You push the last scarab in place":PRINT"confidently..."
910 PEN 1:PRINT:PRINT"Immediately, a sinister squeak":PRINT"is heard."
920 PEN 2:PRINT:PRINT"Before understanding what happens,":PRINT"spikes emerge from the floor":PRINT"impaling you with deadly precision."
930 PEN 1:PRINT:PRINT"               Ouch."
940 PEN 3:PRINT:PRINT"Apparently, you didn't follow":PRINT"the exact order... TARIQ, in his":PRINT"wisdom, left a subtle clue you":PRINT"joyfully ignored."
950 PEN 2:PRINT:PRINT"You just invented a new way to":PRINT"explore a pyramid:":PRINT"Adventurer skewer edition!"
960 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
970 RUN"Mort.bas"

1000 CLS:PEN 3:PRINT:PRINT"You insert the last scarab while":PRINT"holding your breath..."
1010 PEN 2:PRINT:PRINT"A small click is heard, then a faint":PRINT"light glows on the left side of the":PRINT"pyramid..."
1020 PEN 1:PRINT:PRINT"Congratulations, you apparently":PRINT"managed not to break anything!"
1030 PEN 3:PRINT:PRINT"Better yet, you unlocked a mechanism:":PRINT"a small hatch slowly opens on the":PRINT"left flank, revealing a container":PRINT"ready to receive liquid."
1040 PEN 2:PRINT:PRINT"A breath of mystery hovers around":PRINT"you, and you cannot help wondering":PRINT"if this is the first step to opening":PRINT"the pyramid!"
1080 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
1090 POKE &BE86,1:GOTO 60

1100 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1110 PEN 3:PRINT:PRINT"You try to climb the pyramid with":PRINT"all the zeal of a champion."
1120 PEN 2:PRINT:PRINT"You climb 10 cm, slide 20...":PRINT"then 10 again and 20..."
1130 PEN 1:PRINT:PRINT"The average is clear:":PRINT"you are hopeless!"
1140 PEN 3:PRINT:PRINT"At this rate, you'll soon dig a":PRINT"vertical tunnel."
1150 PEN 2:PRINT:PRINT"In short, the only thing you":PRINT"climb is the wall of shame."
1160 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
1170 GOTO 60

1300 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1310 PEN 3:PRINT:PRINT"Pee? Why not..."
1320 PEN 1:PRINT:PRINT"But you should have drunk some":PRINT"water first to evacuate anything!"
1340 PEN 2:PRINT:PRINT"For now, your throat is dry as":PRINT"a bean and your bladder is":PRINT"equally uninspiring."
1350 PEN 3:PRINT:PRINT"A glass of fresh water would help..."
1360 PEN 2:PRINT:PRINT"But for now, no chance:"
1370 PEN 1:PRINT:PRINT"Not a drop comes from your little":PRINT"willy..."
1380 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
1390 GOTO 60

1400 IF PEEK(&BE86)=0 THEN GOTO 1500
1410 IF PEEK(&BE86)=1 THEN GOTO 1600

1500 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1510 PEN 3:PRINT"A sudden need to mark territory?"
1520 PEN 2:PRINT:PRINT"Perfect, you open your jar and":PRINT"take a gulp of fresh water":PRINT"from the oasis to awaken your bladder."
1530 PEN 3:PRINT:PRINT"Two minutes later, it's ready.":PEN 1:PRINT:PRINT"You relieve yourself abundantly":PRINT"on the pyramid wall to show"
1540 PRINT"all nearby cats who's the real boss!"
1550 PEN 3:PRINT:PRINT"But nothing happens:":PRINT"No mechanism triggers, no secret is":PRINT"revealed..."
1560 PEN 2:PRINT:PRINT"A doubt strikes you:":PRINT"Did you forget something before?"
1570 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
1580 GOTO 60

1600 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1610 PEN 3:PRINT"You think collecting some oasis":PRINT"water in your jar was a great idea:"
1620 PEN 1:PRINT:PRINT"A good gulp to wake the bladder and go!"
1630 PEN 2:PRINT:PRINT"Minutes later, you squirm on the":PRINT"sand like a caffeine eel, unable to":PRINT"hold on."
1640 PEN 1:PRINT:PRINT"Finally, you relieve yourself...":PEN 3:PRINT"directly into the small container":PRINT"that appeared earlier on the":PRINT"left flank of the pyramid."
1650 PEN 2:PRINT:PRINT"Your urine evaporates as if":PRINT"the pyramid itself swallows it!"
1660 PEN 1:PRINT:PRINT"  When suddenly...":PRINT:PRINT"              ALL OF A SUDDEN..."
1670 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
1680 GOTO 2000

1700 PEN 2:PRINT:PRINT"Scarabs aligned correctly,":PRINT"over the pyramid door, as if saying:"
1710 PEN 1:PRINT:PRINT CHR$(34);"Enter if you dare!";CHR$(34)
1720 PEN 3:PRINT:PRINT"But the cat pee smell remains left..."
1730 PEN 2:PRINT:PRINT"A smell that seems to defy you!"
1730 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
1740 GOTO 60

2000 CLS:PEN 3:INK 1,6,0:PRINT"A voice from nowhere echoes:"
2010 SOUND 1,200:PEN 1:PRINT:PRINT"DNA detected...":FOR i=1 TO 1200:NEXT i
2020 SOUND 1,150:PEN 2:PRINT:PRINT"Genetic analysis in progress...":FOR i=1 TO 1200:NEXT i
2030 SOUND 1,100:PEN 1:PRINT:PRINT"Profile valid.":FOR i=1 TO 1200:NEXT i
2040 SOUND 1,50:PEN 2:PRINT:PRINT"Access granted.":FOR i=1 TO 1200:NEXT i
2050 PEN 3:PRINT:PRINT"While trying to understand what":PRINT"happened, the pyramid door":PRINT"finally opens..."
2060 PEN 3:LOCATE 15,25:INPUT"  ENTER  ",en$

2100 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
2110 PEN 3:PRINT"You step into the pyramid, guided":PRINT"by the echo of your steps."
2120 PEN 2:PRINT:PRINT"A cold breath rises from the darkness,":PRINT"as if centuries of history held":PRINT"their breath."
2130 PEN 1:PRINT:PRINT"Suddenly, the thunder of stone sounds:"
2140 LOCATE 1,11:PEN 3:PRINT"the door closes behind you, trapping":PRINT"desert light and sealing your fate."
2150 PEN 2:PRINT:PRINT"No escape: only the unknown":PRINT"awaits you in the pyramid's depths..."
2160 PEN 3:LOCATE 15,25:INPUT"  ENTER  ",en$
2170 CLS:LOCATE 14,12:PEN 1:PRINT"INSERT SIDE B":PEN 3:LOCATE 12,14:PRINT"AND PRESS ANY KEY"
2180 PEN 3:LOCATE 15,25:INPUT"  ENTER  ",en$
2185 POKE &BE80,0:POKE &BE81,0:POKE &BE82,0:POKE &BE83,0:POKE &BE84,0:POKE &BE85,0:POKE &BE86,0
2190 RUN"Pyramid2.bas"
