SHARE
TWEET

Untitled

a guest Sep 19th, 2019 140 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 0 ON ERROR GOTO 4
  2. 1 REM AKALABETH, PORT TO GWBASIC BY NANOCHESS, JAN/28/2019 TO FEB/03/2019
  3. 4 CLS:KEY OFF
  4. 7 CLEAR:GOSUB 60000
  5. 8 RANDOMIZE ABS(LN)
  6. 9 LEVEL = 0
  7. 10 SCREEN 1:SCREEN 0:LOCATE 12:PRINT " WELCOME TO AKALABETH, WORLD OF DOOM!"
  8. 20 DIM DN%(10,10),TE%(20,20),XX%(10),YY%(10),PE%(10,3),LD%(10,5),CD%(10,3),FT%(10,5),LA%(10,3)
  9. 30 FOR X=0 TO 20:TE%(X,0)=1:TE%(0,X)=1:TE%(X,20)=1:TE%(20,X)=1:NEXT
  10. 35 LOCATE 23:PRINT " (PLEASE WAIT)";
  11. 40 FOR X=1 TO 19:FOR Y=1 TO 19:TE%(X,Y)=INT(RND^5*4.5)
  12. 41 IF TE%(X,Y)=3 AND RND>.5 THEN TE%(X,Y)=0
  13. 42 NEXT:PRINT ".";:NEXT
  14. 50 TE%(INT(RND*19+1),INT(RND*19+1))=5:TX=INT(RND*19+1):TY=INT(RND*19+1):TE%(TX,TY)=3
  15. 51 XX%(0)=139:YY%(0)=79
  16. 52 FOR X=2 TO 20 STEP 2:XX%(X/2)=INT(ATN(1/X)/ATN(1)*140+.5):YY%(X/2)=INT(XX%(X/2)*4/7)
  17. 53 PE%(X/2,0)=139-XX%(X/2):PE%(X/2,1)=139+XX%(X/2):PE%(X/2,2)=79-YY%(X/2):PE%(X/2,3)=79+YY%(X/2):NEXT
  18. 54 PE%(0,0)=0:PE%(0,1)=279:PE%(0,2)=0:PE%(0,3)=159
  19. 55 FOR X=1 TO 10:CD%(X,0)=139-XX%(X)/3:CD%(X,1)=139+XX%(X)/3:CD%(X,2)=79-YY%(X)*.7:CD%(X,3)=79+YY%(X):NEXT:PRINT ".";
  20. 56 FOR X=0 TO 9:LD%(X,0)=(PE%(X,0)*2+PE%(X+1,0))/3:LD%(X,1)=(PE%(X,0)+2*PE%(X+1,0))/3:W=LD%(X,0)-PE%(X,0)
  21. 57 LD%(X,2)=PE%(X,2)+W*4/7:LD%(X,3)=PE%(X,2)+2*W*4/7:LD%(X,4)=(PE%(X,3)*2+PE%(X+1,3))/3:LD%(X,5)=(PE%(X,3)+2*PE%(X+1,3))/3
  22. 58 LD%(X,2)=LD%(X,4)-(LD%(X,4)-LD%(X,2))*.8:LD%(X,3)=LD%(X,5)-(LD%(X,5)-LD%(X,3))*.8:IF LD%(X,3)=LD%(X,4) THEN LD%(X,3)=LD%(X,3)-1
  23. 59 NEXT
  24. 60 FOR X=0 TO 9:FT%(X,0)=139-XX%(X)/3:FT%(X,1)=139+XX%(X)/3:FT%(X,2)=139-XX%(X+1)/3:FT%(X,3)=139+XX%(X+1)/3
  25. 61 FT%(X,4)=79+(YY%(X)*2+YY%(X+1))/3:FT%(X,5)=79+(YY%(X)+2*YY%(X+1))/3:NEXT
  26. 62 FOR X=0 TO 9:LA%(X,0)=(FT%(X,0)*2+FT%(X,1))/3:LA%(X,1)=(FT%(X,0)+2*FT%(X,1))/3:LA%(X,3)=FT%(X,4):LA%(X,2)=159-LA%(X,3):NEXT
  27. 68 COLOR 3
  28. 70 GOSUB 100:GOTO 1000
  29. 90 FOR X=0 TO 9:FOR Y=0 TO 5:PRINT LD%(X,Y);" ";:NEXT:PRINT:NEXT:INPUT Q$
  30. 100 GOSUB 60900:FOR Y=-1 TO 1:FOR X=-1 TO 1
  31. 105 LINE (138,75)-(142,75):LINE (140,73)-(140,77)
  32. 110 ZZ=TE%(TX+X,TY+Y):X1=65+(X+1)*50:Y1=(Y+1)*50
  33. 120 IF ZZ=2 THEN LINE (X1+20,Y1+20)-(X1+30,Y1+20):LINE -(X1+30,Y1+30):LINE -(X1+20,Y1+30):LINE -(X1+20,Y1+20)
  34. 130 IF ZZ=3 THEN LINE (X1+10,Y1+10)-(X1+20,Y1+10):LINE -(X1+20,Y1+40):LINE -(X1+10,Y1+40):LINE -(X1+10,Y1+30):LINE -(X1+40,Y1+30)
  35. 135 IF ZZ=3 THEN LINE -(X1+40,Y1+40):LINE -(X1+30,Y1+40):LINE -(X1+30,Y1+10):LINE -(X1+40,Y1+10):LINE -(X1+40,Y1+20):LINE -(X1+10,Y1+20):LINE -(X1+10,Y1+10)
  36. 140 IF ZZ=4 THEN LINE (X1+20,Y1+20)-(X1+30,Y1+30):LINE -(X1+20,Y1+30):LINE -(X1+30,Y1+20)
  37. 150 IF ZZ=5 THEN LINE (X1,Y1)-(X1+50,Y1):LINE -(X1+50,Y1+50):LINE -(X1,Y1+50):LINE -(X1,Y1):LINE (X1+10,Y1+10)-(X1+10,Y1+40)
  38. 155 IF ZZ=5 THEN LINE -(X1+40,Y1+40):LINE -(X1+40,Y1+10):LINE -(X1+10,Y1+10):LINE -(X1+40,Y1+40):LINE (X1+10,Y1+40)-(X1+40,Y1+10)
  39. 160 IF ZZ=1 THEN LINE (X1+10,Y1+50)-(X1+10,Y1+40):LINE -(X1+20,Y1+30):LINE -(X1+40,Y1+30):LINE -(X1+40,Y1+50):LINE (X1,Y1+10)-(X1+10,Y1+10):LINE (X1+50,Y1+10)-(X1+40,Y1+10):LINE (X1,Y1+40)-(X1+10,Y1+40):LINE (X1+40,Y1+40)-(X1+50,Y1+40)
  40. 170 IF ZZ=1 THEN LINE (X1+10,Y1)-(X1+10,Y1+20):LINE -(X1+20,Y1+20):LINE -(X1+20,Y1+30):LINE -(X1+30,Y1+30):LINE -(X1+30,Y1+10):LINE -(X1+40,Y1+10):LINE -(X1+40,Y1)
  41. 190 NEXT:NEXT:RETURN
  42. 200 GOSUB 60900:DI=0:COLOR 3
  43. 202 CE=DN%(PX+DX*DI,PY+DY*DI):LE=DN%(PX+DX*DI+DY,PY+DY*DI-DX):RI=DN%(PX+DX*DI-DY,PY+DY*DI+DX)
  44. 204 L1=PE%(DI,0):R1=PE%(DI,1):T1=PE%(DI,2):B1=PE%(DI,3):L2=PE%(DI+1,0):R2=PE%(DI+1,1):T2=PE%(DI+1,2):B2=PE%(DI+1,3)
  45. 205 CE=INT(CE):LE=INT(LE):RI=INT(RI)
  46. 206 MC=INT(CE/10):CE=CE-MC*10:LE=INT((LE/10-INT(LE/10))*10+.1):RI=INT((RI/10-INT(RI/10))*10+.1)
  47. 208 IF DI=0 THEN 216
  48. 210 IF CE=1 OR CE=3 OR CE=4 THEN LINE (L1,T1)-(R1,T1):LINE -(R1,B1):LINE -(L1,B1):LINE -(L1,T1)
  49. 212 IF CE=1 OR CE=3 THEN EN=1:GOTO 260
  50. 214 IF CE=4 THEN LINE (CD%(DI,0),CD%(DI,3))-(CD%(DI,0),CD%(DI,2)):LINE -(CD%(DI,1),CD%(DI,2)):LINE -(CD%(DI,1),CD%(DI,3)):EN=1:GOTO 260
  51. 216 IF LE=1 OR LE=3 OR LE=4 THEN LINE (L1,T1)-(L2,T2):LINE (L1,B1)-(L2,B2)
  52. 218 IF RI=1 OR RI=3 OR RI=4 THEN LINE (R1,T1)-(R2,T2):LINE (R1,B1)-(R2,B2)
  53. 220 IF LE=4 AND DI>0 THEN LINE (LD%(DI,0),LD%(DI,4))-(LD%(DI,0),LD%(DI,2)):LINE -(LD%(DI,1),LD%(DI,3)):LINE -(LD%(DI,1),LD%(DI,5))
  54. 222 IF LE=4 AND DI=0 THEN LINE (0,LD%(DI,2)-3)-(LD%(DI,1),LD%(DI,3)):LINE -(LD%(DI,1),LD%(DI,5))
  55. 224 IF RI=4 AND DI>0 THEN LINE (279-LD%(DI,0),LD%(DI,4))-(279-LD%(DI,0),LD%(DI,2)):LINE -(279-LD%(DI,1),LD%(DI,3)):LINE -(279-LD%(DI,1),LD%(DI,5))
  56. 226 IF RI=4 AND DI=0 THEN LINE (279,LD%(DI,2)-3)-(279-LD%(DI,1),LD%(DI,3)):LINE -(279-LD%(DI,1),LD%(DI,5))
  57. 228 IF LE=3 OR LE=1 OR LE=4 THEN 234
  58. 230 IF DI<>0 THEN LINE (L1,T1)-(L1,B1)
  59. 232 LINE (L1,T2)-(L2,T2):LINE -(L2,B2):LINE -(L1,B2)
  60. 234 IF RI=3 OR RI=1 OR RI=4 THEN 240
  61. 236 IF DI<>0 THEN LINE (R1,T1)-(R1,B1)
  62. 238 LINE (R1,T2)-(R2,T2):LINE -(R2,B2):LINE -(R1,B2)
  63. 240 IF CE=7 OR CE=9 THEN LINE (FT%(DI,0),FT%(DI,4))-(FT%(DI,2),FT%(DI,5)):LINE -(FT%(DI,3),FT%(DI,5)):LINE -(FT%(DI,1),FT%(DI,4)):LINE -(FT%(DI,0),FT%(DI,4))
  64. 242 IF CE=8 THEN LINE (FT%(DI,0),158-FT%(DI,4))-(FT%(DI,2),158-FT%(DI,5)):LINE -(FT%(DI,3),158-FT%(DI,5)):LINE -(FT%(DI,1),158-FT%(DI,4)):LINE -(FT%(DI,0),158-FT%(DI,4))
  65. 244 IF CE=7 OR CE=8 THEN BA=LA%(DI,3):TP=LA%(DI,2):LX=LA%(DI,0):RX=LA%(DI,1):LINE (LX,BA)-(LX,TP):LINE (RX,TP)-(RX,BA)
  66. 246 IF CE=7 OR CE=8 THEN Y1=(BA*4+TP)/5:Y2=(BA*3+TP*2)/5:Y3=(BA*2+TP*3)/5:Y4=(BA+TP*4)/5:LINE (LX,Y1)-(RX,Y1):LINE (LX,Y2)-(RX,Y2):LINE (LX,Y3)-(RX,Y3):LINE (LX,Y4)-(RX,Y4)
  67. 248 IF DI>0 AND CE=5 THEN LINE (139-10/DI,PE%(DI,3))-(139-10/DI,PE%(DI,3)-10/DI):LINE -(139+10/DI,PE%(DI,3)-10/DI):LINE -(139+10/DI,PE%(DI,3)):LINE -(139-10/DI,PE%(DI,3))
  68. 249 IF CE=5 AND DI>0 THEN COLOR 1:PRINT "CHEST!":COLOR 3
  69. 250 IF DI>0 AND CE=5 THEN LINE (139-10/DI,PE%(DI,3)-10/DI)-(139-5/DI,PE%(DI,3)-15/DI):LINE -(139+15/DI,PE%(DI,3)-15/DI):LINE -(139+15/DI,PE%(DI,3)-5/DI):LINE -(139+10/DI,PE%(DI,3))
  70. 252 IF DI>0 AND CE=5 THEN LINE (139+10/DI,PE%(DI,3)-10/DI)-(139+15/DI,PE%(DI,3)-15/DI)
  71. 260 IF MC<1 THEN 490
  72. 265 B=79+YY%(DI):C=139
  73. 266 COLOR 1:IF MC=8 THEN PRINT "CHEST!";:GOSUB 60868:PRINT:COLOR 3:GOTO 269
  74. 267 PRINT M$(MC);:GOSUB 60868:PRINT:COLOR 3
  75. 269 IF DI=0 THEN 490
  76. 270 ON MC GOTO 300,310,320,330,340,350,360,370,380,390
  77. 280 GOTO 490
  78. 300 LINE (C-23/DI,B)-(C-15/DI,B):LINE -(C-15/DI,B-15/DI):LINE -(C-8/DI,B-30/DI):LINE -(C+8/DI,B-30/DI):LINE -(C+15/DI,B-15/DI):LINE -(C+15/DI,B):LINE -(C+23/DI,B)
  79. 301 LINE (C,B-26/DI)-(C,B-65/DI):LINE (C-2/DI+.5,B-38/DI)-(C+2/DI+.5,B-38/DI):LINE (C-3/DI+.5,B-45/DI)-(C+3/DI+.5,B-45/DI):LINE (C-5/DI+.5,B-53/DI)-(C+5/DI+.5,B-53/DI)
  80. 302 LINE (C-23/DI,B-56/DI)-(C-30/DI,B-53/DI):LINE -(C-23/DI,B-45/DI):LINE -(C-23/DI,B-53/DI):LINE -(C-8/DI,B-38/DI)
  81. 303 LINE (C-15/DI,B-45/DI)-(C-8/DI,B-60/DI):LINE -(C+8/DI,B-60/DI):LINE -(C+15/DI,B-45/DI):LINE (C+15/DI,B-42/DI)-(C+15/DI,B-57/DI):LINE (C+12/DI,B-45/DI)-(C+20/DI,B-45/DI)
  82. 304 LINE (C,B-75/DI)-(C-5/DI+.5,B-80/DI):LINE -(C-8/DI,B-75/DI):LINE -(C-5/DI+.5,B-65/DI):LINE -(C+5/DI+.5,B-65/DI):LINE -(C+5/DI+.5,B-68/DI):LINE -(C-5/DI+.5,B-68/DI):LINE -(C-5/DI+.5,B-65/DI)
  83. 305 LINE -(C+5/DI+.5,B-65/DI):LINE -(C+8/DI,B-75/DI):LINE -(C+5/DI+.5,B-80/DI):LINE -(C-5/DI+.5,B-80/DI):PSET (C-5/DI+.5,B-72/DI):PSET (C+5/DI+.5,B-72/DI)
  84. 309 GOTO 490
  85. 310 LINE (C,B-56/DI)-(C,B-8/DI):LINE -(C+10/DI,B):LINE -(C+30/DI,B):LINE -(C+30/DI,B-45/DI):LINE -(C+10/DI,B-64/DI):LINE -(C,B-56/DI)
  86. 311 LINE -(C-10/DI,B-64/DI):LINE -(C-30/DI,B-45/DI):LINE -(C-30/DI,B):LINE -(C-10/DI,B):LINE -(C,B-8/DI)
  87. 312 LINE (C-10/DI,B-64/DI)-(C-10/DI,B-75/DI):LINE -(C,B-83/DI):LINE -(C+10/DI,B-75/DI):LINE -(C,B-79/DI):LINE -(C-10/DI,B-75/DI):LINE -(C,B-60/DI):LINE -(C+10/DI,B-75/DI):LINE -(C+10/DI,B-64/DI)
  88. 319 GOTO 490
  89. 320 LINE (C+5/DI,B-30/DI)-(C,B-25/DI):LINE -(C-5/DI,B-30/DI):LINE -(C-15/DI,B-5/DI):LINE -(C-10/DI,B):LINE -(C+10/DI,B):LINE -(C+15/DI,B-5/DI)
  90. 321 LINE -(C+20/DI,B-5/DI):LINE -(C+10/DI,B):LINE -(C+15/DI,B-5/DI):LINE -(C+5/DI,B-30/DI):LINE -(C+10/DI,B-40/DI):LINE -(C+3/DI+.5,B-35/DI):LINE -(C-3/DI+.5,B-35/DI):LINE -(C-10/DI,B-40/DI):LINE -(C-5/DI,B-30/DI)
  91. 322 LINE (C-5/DI,B-33/DI)-(C-3/DI+.5,B-30/DI):LINE (C+5/DI,B-33/DI)-(C+3/DI+.5,B-30/DI):LINE (C-5/DI,B-20/DI)-(C-5/DI,B-15/DI)
  92. 323 LINE (C+5/DI,B-20/DI)-(C+5/DI,B-15/DI):LINE (C-7+DI,B-20/DI)-(C-7/DI,B-15/DI):LINE (C+7/DI,B-20/DI)-(C+7/DI,B-15/DI)
  93. 329 GOTO 490
  94. 330 LINE (C,B)-(C-15/DI,B):LINE -(C-8/DI,B-8/DI):LINE -(C-8/DI,B-15/DI):LINE -(C-15/DI,B-23/DI):LINE -(C-15/DI,B-15/DI):LINE -(C-23/DI,B-23/DI)
  95. 331 LINE -(C-23/DI,B-45/DI):LINE -(C-15/DI,B-53/DI):LINE -(C-8/DI,B-53/DI):LINE -(C-15/DI,B-68/DI):LINE -(C-8/DI,B-75/DI):LINE -(C,B-75/DI)
  96. 332 LINE (C,B)-(C+15/DI,B):LINE -(C+8/DI,B-8/DI):LINE -(C+8/DI,B-15/DI):LINE -(C+15/DI,B-23/DI):LINE -(C+15/DI,B-15/DI):LINE -(C+23/DI,B-23/DI)
  97. 333 LINE -(C+23/DI,B-45/DI):LINE -(C+15/DI,B-53/DI):LINE -(C+8/DI,B-53/DI):LINE -(C+15/DI,B-68/DI):LINE -(C+8/DI,B-75/DI):LINE -(C,B-75/DI)
  98. 334 LINE (C-15/DI,B-68/DI)-(C+15/DI,B-68/DI):LINE (C-8/DI,B-53/DI)-(C+8/DI,B-53/DI):LINE (C-23/DI,B-15/DI)-(C+8/DI,B-45/DI)
  99. 335 LINE (C-8/DI,B-68/DI)-(C,B-60/DI):LINE -(C+8/DI,B-68/DI):LINE -(C+8/DI,B-60/DI):LINE -(C-8/DI,B-60/DI):LINE -(C-8/DI,B-68/DI)
  100. 336 LINE (C,B-38/DI)-(C-8/DI,B-38/DI):LINE -(C+8/DI,B-53/DI):LINE -(C+8/DI,B-45/DI):LINE -(C+15/DI,B-45/DI):LINE -(C,B-30/DI):LINE -(C,B-38/DI)
  101. 339 GOTO 490
  102. 340 LINE (C-10/DI,B-15/DI)-(C-10/DI,B-30/DI):LINE -(C-15/DI,B-20/DI):LINE -(C-15/DI,B-15/DI):LINE -(C-15/DI,B):LINE -(C+15/DI,B):LINE -(C+15/DI,B-15/DI):LINE -(C-15/DI,B-15/DI)
  103. 341 LINE (C-15/DI,B-10/DI)-(C+15/DI,B-10/DI):LINE (C-15/DI,B-5/DI)-(C+15/DI,B-5/DI)
  104. 342 LINE (C,B-15/DI)-(C-5/DI,B-20/DI):LINE -(C-5/DI,B-35/DI):LINE -(C+5/DI,B-35/DI):LINE -(C+5/DI,B-20/DI):LINE -(C+10/DI,B-15/DI)
  105. 343 LINE (C-5/DI,B-20/DI)-(C+5/DI,B-20/DI):LINE (C-5/DI,B-25/DI)-(C+5/DI,B-25/DI):LINE (C-5/DI,B-30/DI)-(C+5/DI,B-30/DI)
  106. 344 LINE (C-10/DI,B-35/DI)-(C-10/DI,B-40/DI):LINE -(C-5/DI,B-45/DI):LINE -(C+5/DI,B-45/DI):LINE -(C+10/DI,B-40/DI):LINE -(C+10/DI,B-35/DI)
  107. 345 LINE (C-10/DI,B-40/DI)-(C,B-45/DI):LINE -(C+10/DI,B-40/DI)
  108. 346 LINE (C-5/DI,B-40/DI)-(C+5/DI,B-40/DI):LINE -(C+15/DI,B-30/DI):LINE -(C,B-40/DI):LINE -(C-15/DI,B-30/DI):LINE -(C-5/DI+.5,B-40/DI)
  109. 349 GOTO 490
  110. 350 LINE (C-20/DI,79-YY%(DI))-(C-20/DI,B-88/DI):LINE -(C-10/DI,B-83/DI):LINE -(C+10/DI,B-83/DI):LINE -(C+20/DI,B-88/DI):LINE -(C+20/DI,79-YY%(DI)):LINE -(C-20/DI,79-YY%(DI))
  111. 351 LINE (C-20/DI,B-88/DI)-(C-30/DI,B-83/DI):LINE -(C-30/DI,B-78/DI):LINE (C+20/DI,B-88/DI)-(C+30/DI,B-83/DI):LINE -(C+40/DI,B-83/DI)
  112. 352 LINE (C-15/DI,B-86/DI)-(C-20/DI,B-83/DI):LINE -(C-20/DI,B-78/DI):LINE -(C-30/DI,B-73/DI):LINE -(C-30/DI,B-68/DI):LINE -(C-20/DI,B-63/DI)
  113. 353 LINE (C-10/DI,B-83/DI)-(C-10/DI,B-58/DI):LINE -(C,B-50/DI):LINE (C+10/DI,B-83/DI)-(C+10/DI,B-78/DI):LINE -(C+20/DI,B-73/DI):LINE -(C+20/DI,B-40/DI)
  114. 354 LINE (C+15/DI,B-85/DI)-(C+20/DI,B-78/DI):LINE -(C+30/DI,B-76/DI):LINE -(C+30/DI,B-60/DI)
  115. 355 LINE (C,B-83/DI)-(C,B-73/DI):LINE -(C+10/DI,B-68/DI):LINE -(C+10/DI,B-63/DI):LINE -(C,B-58/DI)
  116. 359 GOTO 490
  117. 360 LINE (C+5/DI+.5,B-10/DI)-(C-5/DI+.5,B-10/DI):LINE -(C,B-15/DI):LINE -(C+10/DI,B-20/DI):LINE -(C+5/DI+.5,B-15/DI):LINE -(C+5/DI+.5,B-10/DI)
  118. 361 LINE -(C+7/DI+.5,B-6/DI):LINE -(C+5/DI+.5,B-3/DI):LINE -(C-5/DI+.5,B-3/DI):LINE -(C-7/DI+.5,B-6/DI):LINE -(C-5/DI+.5,B-10/DI)
  119. 362 LINE (C+2/DI+.5,B-3/DI)-(C+5/DI+.5,B):LINE -(C+8/DI,B):LINE (C-2/DI+.5,B-3/DI)-(C-5/DI+.5,B):LINE -(C-8/DI,B):PSET (C+3/DI+.5,B-8/DI):PSET (C-3/DI+.5,B-8/DI):LINE (C+3/DI+.5,B-5/DI)-(C-3/DI+.5,B-5/DI)
  120. 363 GOTO 490
  121. 370 LINE (139-10/DI,PE%(DI,3))-(139-10/DI,PE%(DI,3)-10/DI):LINE -(139+10/DI,PE%(DI,3)-10/DI):LINE -(139+10/DI,PE%(DI,3)):LINE -(139-10/DI,PE%(DI,3))
  122. 371 LINE (139-10/DI,PE%(DI,3)-10/DI)-(139-5/DI,PE%(DI,3)-15/DI):LINE -(139+15/DI,PE%(DI,3)-15/DI):LINE -(139+15/DI,PE%(DI,3)-5/DI):LINE -(139+10/DI,PE%(DI,3))
  123. 372 LINE (139+10/DI,PE%(DI,3)-10/DI)-(139+15/DI,PE%(DI,3)-15/DI)
  124. 373 GOTO 490
  125. 380 LINE (C-14/DI,B-46/DI)-(C-12/DI,B-37/DI):LINE -(C-20/DI,B-32/DI):LINE -(C-30/DI,B-32/DI):LINE -(C-22/DI,B-24/DI):LINE -(C-40/DI,B-17/DI):LINE -(C-40/DI,B-7/DI):LINE -(C-38/DI,B-5/DI):LINE -(C-40/DI,B-3/DI):LINE -(C-40/DI,B)
  126. 381 LINE -(C-36/DI,B):LINE -(C-34/DI,B-2/DI):LINE -(C-32/DI,B):LINE -(C-28/DI,B):LINE -(C-28/DI,B-3/DI):LINE -(C-30/DI,B-5/DI):LINE -(C-28/DI,B-7/DI):LINE -(C-28/DI,B-15/DI):LINE -(C,B-27/DI)
  127. 382 LINE (C+14/DI,B-46/DI)-(C+12/DI,B-37/DI):LINE -(C+20/DI,B-32/DI):LINE -(C+30/DI,B-32/DI):LINE -(C+22/DI,B-24/DI):LINE -(C+40/DI,B-17/DI):LINE -(C+40/DI,B-7/DI):LINE -(C+38/DI,B-5/DI):LINE -(C+40/DI,B-3/DI):LINE -(C+40/DI,B)
  128. 383 LINE -(C+36/DI,B):LINE -(C+34/DI,B-2/DI):LINE -(C+32/DI,B):LINE -(C+28/DI,B):LINE -(C+28/DI,B-3/DI):LINE -(C+30/DI,B-5/DI):LINE -(C+28/DI,B-7/DI):LINE -(C+28/DI,B-15/DI):LINE -(C,B-27/DI)
  129. 384 LINE (C+6/DI,B-48/DI)-(C+38/DI,B-41/DI):LINE -(C+40/DI,B-42/DI):LINE -(C+18/DI,B-56/DI):LINE -(C+12/DI,B-56/DI):LINE -(C+10/DI,B-57/DI):LINE -(C+8/DI,B-56/DI):LINE -(C-8/DI,B-56/DI):LINE -(C-10/DI,B-58/DI):LINE -(C+14/DI,B-58/DI)
  130. 385 LINE -(C+16/DI,B-59/DI)
  131. 386 LINE -(C+8/DI,B-63/DI):LINE -(C+6/DI,B-63/DI):LINE -(C+2/DI+.5,B-70/DI):LINE -(C+2/DI+.5,B-63/DI):LINE -(C-2/DI+.5,B-63/DI):LINE -(C-2/DI+.5,B-70/DI):LINE -(C-6/DI,B-63/DI):LINE -(C-8/DI,B-63/DI):LINE -(C-16/DI,B-59/DI):LINE -(C-14/DI,B-58/DI)
  132. 387 LINE -(C+10/DI,B-57/DI):LINE -(C-12/DI,B-56/DI):LINE -(C-18/DI,B-56/DI):LINE -(C-36/DI,B-47/DI):LINE -(C-36/DI,B-39/DI):LINE -(C-28/DI,B-41/DI):LINE -(C-28/DI,B-46/DI):LINE -(C-20/DI,B-50/DI):LINE -(C-18/DI,B-50/DI):LINE -(C-14/DI,B-46/DI)
  133. 388 GOTO 3087
  134. 390 LINE (C+6/DI,B-60/DI)-(C+30/DI,B-90/DI):LINE -(C+60/DI,B-30/DI):LINE -(C+60/DI,B-10/DI):LINE-(C+30/DI,B-40/DI):LINE -(C+15/DI,B-40/DI)
  135. 391 LINE (C-6/DI,B-60/DI)-(C-30/DI,B-90/DI):LINE -(C-60/DI,B-30/DI):LINE -(C-60/DI,B-10/DI):LINE -(C-30/DI,B-40/DI):LINE -(C-15/DI,B-40/DI)
  136. 392 LINE (C,B-25/DI)-(C+6/DI,B-25/DI):LINE -(C+10/DI,B-20/DI):LINE -(C+12/DI,B-10/DI):LINE -(C+10/DI,B-6/DI):LINE -(C+10/DI,B):LINE -(C+14/DI,B):LINE-(C+15/DI,B-5/DI):LINE -(C+16/DI,B):LINE -(C+20/DI,B)
  137. 393 LINE -(C+20/DI,B-6/DI):LINE -(C+18/DI,B-10/DI):LINE -(C+18/DI,B-20/DI):LINE -(C+15/DI,B-30/DI):LINE -(C+15/DI,B-45/DI):LINE -(C+40/DI,B-60/DI):LINE -(C+40/DI,B-70/DI)
  138. 394 LINE -(C+10/DI,B-55/DI):LINE -(C+6/DI,B-60/DI):LINE -(C+10/DI,B-74/DI):LINE -(C+6/DI,B-80/DI):LINE -(C+4/DI+.5,B-80/DI):LINE -(C+3/DI+.5,B-82/DI):LINE -(C+2/DI+.5,B-80/DI):LINE -(C,B-80/DI)
  139. 395 LINE (C,B-25/DI)-(C-6/DI,B-25/DI):LINE -(C-10/DI,B-20/DI):LINE -(C-12/DI,B-10/DI):LINE -(C-10/DI,B-6/DI):LINE -(C-10/DI,B):LINE -(C-14/DI,B):LINE -(C-15/DI,B-5/DI):LINE -(C-16/DI,B):LINE -(C-20/DI,B)
  140. 396 LINE -(C-20/DI,B-6/DI):LINE -(C-18/DI,B-10/DI):LINE -(C-18/DI,B-20/DI):LINE -(C-15/DI,B-30/DI):LINE -(C-15/DI,B-45/DI):LINE -(C-40/DI,B-60/DI):LINE -(C-40/DI,B-70/DI)
  141. 397 LINE -(C-10/DI,B-55/DI):LINE -(C-6/DI,B-60/DI):LINE -(C-10/DI,B-74/DI):LINE -(C-6/DI,B-80/DI):LINE -(C-4/DI+.5,B-80/DI):LINE -(C-3/DI+.5,B-82/DI):LINE -(C-2/DI+.5,B-80/DI):LINE -(C,B-80/DI)
  142. 398 LINE (C-6/DI,B-25/DI)-(C,B-6/DI):LINE -(C+10/DI,B):LINE -(C+4/DI+.5,B-8/DI):LINE -(C+6/DI,B-25/DI):LINE (C-40/DI,B-64/DI)-(C-40/DI,B-90/DI):LINE -(C-52/DI,B-80/DI):LINE -(C-52/DI,B-40/DI)
  143. 399 LINE (C+40/DI,B-86/DI)-(C+38/DI,B-92/DI):LINE -(C+42/DI,B-92/DI):LINE -(C+40/DI,B-86/DI):LINE -(C+40/DI,B-50/DI)
  144. 400 LINE (C+4/DI+.5,B-70/DI)-(C+6/DI,B-74/DI):LINE (C-4/DI+.5,B-70/DI)-(C-6/DI,B-74/DI):LINE (C,B-64/DI)-(C,B-60/DI):GOTO 490
  145. 490 IF EN=1 THEN EN=0:RETURN
  146. 491 DI=DI+1:GOTO 202
  147. 500 RANDOMIZE ABS(LN)-TX*10-TY*1000+IN*31.4
  148. 501 FOR X=1 TO 9:FOR Y=1 TO 9:DN%(X,Y)=0:NEXT:NEXT
  149. 510 FOR X=0 TO 10:DN%(X,0)=1:DN%(X,10)=1:DN%(0,X)=1:DN%(10,X)=1:NEXT
  150. 520 FOR X=2 TO 8 STEP 2:FOR Y=1 TO 9:DN%(X,Y)=1:DN%(Y,X)=1:NEXT:NEXT
  151. 530 FOR X=2 TO 8 STEP 2:FOR Y=1 TO 9 STEP 2
  152. 540 IF RND>.95 THEN DN%(X,Y)=2
  153. 541 IF RND>.95 THEN DN%(Y,X)=2
  154. 542 IF RND>.6 THEN DN%(Y,X)=3
  155. 543 IF RND>.6 THEN DN%(X,Y)=3
  156. 544 IF RND>.6 THEN DN%(X,Y)=4
  157. 545 IF RND>.6 THEN DN%(Y,X)=4
  158. 546 IF RND>.97 THEN DN%(Y,X)=9
  159. 547 IF RND>.97 THEN DN%(X,Y)=9
  160. 548 IF RND>.94 THEN DN%(X,Y)=5
  161. 549 IF RND>.94 THEN DN%(Y,X)=5
  162. 568 NEXT:NEXT
  163. 569 DN%(2,1)=0:IF IN/2=INT(IN/2) THEN DN%(7,3)=7:DN%(3,7)=8
  164. 570 IF IN/2<>INT(IN/2) THEN DN%(7,3)=8:DN%(3,7)=7
  165. 580 IF IN=1 THEN DN%(1,1)=8:DN%(7,3)=0
  166. 585 GOSUB 2000
  167. 590 RETURN
  168. 1000 GOSUB 60890:LINE (0,160)-(231,199),0,BF:LOCATE 21,1:PRINT "COMMAND? ";:GOSUB 60868
  169. 1001 X$=INKEY$:IF X$="" THEN 1001
  170. 1003 X=ASC(X$)
  171. 1004 IF LEN(X$)>1 THEN X2=ASC(MID$(X$,2)) ELSE X2=0
  172. 1030 IF X2=72 THEN ON SGN(IN)+1 GOTO 1100,1150
  173. 1040 IF X2=77 THEN ON SGN(IN)+1 GOTO 1200,1250
  174. 1050 IF X2=75 THEN ON SGN(IN)+1 GOTO 1300,1350
  175. 1060 IF X2=80 THEN ON SGN(IN)+1 GOTO 1400,1450
  176. 1070 IF X=13 THEN ON SGN(IN)+1 GOTO 1500,1550
  177. 1080 IF X=65 THEN ON SGN(IN)+1 GOTO 1600,1650
  178. 1081 IF X=32 THEN PRINT "PASS":GOTO 1090
  179. 1085 IF X=83 OR X=115 THEN 1700
  180. 1086 IF X=80 OR X=112 THEN IF PA=1 THEN PA=0:PRINT "PAUSE OFF":GOTO 1000
  181. 1087 IF X=80 OR X=112 THEN IF PA=0 THEN PA=1:PRINT "PAUSE ON":GOTO 1000
  182. 1089 PRINT "HUH?":GOTO 1000
  183. 1090 PW(0)=PW(0)-1+SGN(IN)*.9:IF PW(0)<0 THEN C(0)=0:PRINT:PRINT "YOU HAVE STARVED!!!!!":GOTO 1093
  184. 1091 LOCATE 22,30:PRINT "FOOD=";MID$(STR$(INT(PW(0)*10+0.5)/10),2);:GOSUB 60868:LOCATE 23,30:PRINT "H.P.=";C(0);:GOSUB 60868:LOCATE 24,30:PRINT "GOLD=";C(5);:GOSUB 60868:LOCATE 20,1
  185. 1092 PW(0)=INT(PW(0)*10)/10
  186. 1093 IF C(0)<=0 THEN 6000
  187. 1095 IF IN>0 THEN GOSUB 60890:LINE (0,160)-(231,199),0,BF:GOSUB 4000:IF C(0)<=0 THEN 1093
  188. 1096 LOCATE 22,30:PRINT "FOOD=";MID$(STR$(INT(PW(0)*10+0.5)/10),2);:GOSUB 60868:LOCATE 23,30:PRINT "H.P.=";C(0);:GOSUB 60868:LOCATE 24,30:PRINT "GOLD=";C(5);:GOSUB 60868:LOCATE 20,1
  189. 1097 IF IN=0 THEN GOSUB 100:GOTO 1000
  190. 1098 IF IN>0 THEN GOSUB 200:GOTO 1000
  191. 1100 PRINT "NORTH":IF TE%(TX,TY-1)=1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
  192. 1110 TY=TY-1:GOTO 1090
  193. 1150 IF DN%(PX+DX,PY+DY)<>1 AND DN%(PX+DX,PY+DY)<10 THEN PX=PX+DX:PY=PY+DY
  194. 1155 PRINT "FORWARD"
  195. 1160 IF DN%(PX,PY)=2 THEN PRINT "AAARRRGGGHHH!!! A TRAP!":C(0)=C(0)-INT(RND*IN+3):MR=1:IN=IN+1:PRINT "FALLING TO LEVEL ";IN:GOSUB 500:GOSUB 60890:LINE (0,160)-(231,199),0,BF:GOTO 1090
  196. 1165 Z=0
  197. 1170 IF DN%(PX,PY)=5 THEN DN%(PX,PY)=0:PRINT "GOLD!!!!!":Z=INT(RND*5*IN+IN):PRINT Z;"-PIECES OF EIGHT":C(5)=C(5)+Z
  198. 1175 IF Z>0 THEN Z=INT(RND*6):PRINT "AND A ";W$(Z):PW(Z)=PW(Z)+1:GOTO 1090
  199. 1190 GOTO 1090
  200. 1200 PRINT "EAST":IF TE%(TX+1,TY)=1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
  201. 1210 TX=TX+1:GOTO 1090
  202. 1250 PRINT "TURN RIGHT"
  203. 1255 IF DX<>0 THEN DY=DX:DX=0:GOTO 1090
  204. 1260 DX=-DY:DY=0:GOTO 1090
  205. 1300 PRINT "WEST":IF TE%(TX-1,TY)=1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
  206. 1310 TX=TX-1:GOTO 1090
  207. 1350 PRINT "TURN LEFT"
  208. 1355 IF DX<>0 THEN DY=-DX:DX=0:GOTO 1090
  209. 1360 DX=DY:DY=0:GOTO 1090
  210. 1400 PRINT "SOUTH":IF TE%(TX,TY+1)=1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
  211. 1410 TY=TY+1:GOTO 1090
  212. 1450 PRINT "TURN AROUND":DX=-DX:DY=-DY:GOTO 1090
  213. 1500 IF TE%(TX,TY)=3 THEN GOSUB 60080:GOSUB 60200:SCREEN 1:GOTO 1090
  214. 1510 IF TE%(TX,TY)=4 AND IN=0 THEN PRINT "GO DUNGEON":PRINT "PLEASE WAIT ":IN=1:GOSUB 500:DX=1:DY=0:PX=1:PY=1:GOTO 1090
  215. 1515 IF TE%(TX,TY)=5 THEN 7000
  216. 1520 PRINT "HUH?":GOTO 1000
  217. 1550 IF DN%(PX,PY)<>7 AND DN%(PX,PY)<>9 THEN 1580
  218. 1555 PRINT "GO DOWN TO LEVEL ";IN+1
  219. 1560 IN=IN+1:GOSUB 500:MR=1:GOTO 1090
  220. 1580 IF DN%(PX,PY)<>8 THEN PRINT "HUH?":GOTO 1090
  221. 1581 IF IN=1 THEN PRINT "LEAVE DUNGEON":IN=0:GOTO 1586
  222. 1584 PRINT "GO UP TO LEVEL ";IN-1
  223. 1585 IN=IN-1:GOSUB 500:MR=1
  224. 1586 IF IN=0 THEN PRINT "THOU HAST GAINED":PRINT LK;" HIT POINTS":C(0)=C(0)+LK:LK=0
  225. 1587 GOTO 1090
  226. 1600 GOTO 1090
  227. 1650 MN=0:DA=0:PRINT "ATTACK":PRINT "WHICH WEAPON ";:Q$=INPUT$(1)
  228. 1651 IF Q$="R" THEN DA=10:PRINT "RAPIER":IF PW(1)<1 THEN PRINT "NOT OWNED":GOTO 1650
  229. 1652 IF Q$="A" THEN DA=5:PRINT "AXE":IF PW(2)<1 THEN PRINT "NOT OWNED":GOTO 1650
  230. 1653 IF Q$="S" THEN DA=1:PRINT "SHIELD":IF PW(3)<1 THEN PRINT "NOT OWNED":GOTO 1650
  231. 1654 IF Q$="B" THEN DA=4:PRINT "BOW":IF PW(4)<1 THEN PRINT "NOT OWNED":GOTO 1650
  232. 1655 IF Q$="M" THEN PRINT "MAGIC AMULET":GOTO 1680
  233. 1656 IF Q$="B" AND PT$="M" THEN PRINT "MAGES CAN'T USE BOWS!":GOTO 1650
  234. 1657 IF Q$="R" AND PT$="M" THEN PRINT "MAGES CAN'T USE RAPIERS!":GOTO 1650
  235. 1659 IF DA=0 THEN PRINT "HANDS"
  236. 1660 IF DA=5 OR DA=4 THEN 1670
  237. 1661 MN=DN%(PX+DX,PY+DY)/10:MN=INT(MN)
  238. 1662 IF MN<1 OR C(2)-RND*251663 PRINT "HIT!!! ":DA=(RND*DA+C(1)/5):MZ%(MN,1)=MZ%(MN,1)-DA
  239. 1664 PRINT M$(MN);"'S HIT POINTS=";MZ%(MN,1)
  240. 1665 IF MZ%(MN,1)<1 THEN PRINT "THOU HAST KILLED A ";M$(MN):PRINT "THOU SHALT RECEIVE":DA=INT(MN+IN):PRINT DA;" PIECES OF EIGHT"
  241. 1666 IF MZ%(MN,1)<1 THEN C(5)=INT(C(5)+DA):DN%(ML%(MN,0),ML%(MN,1))=DN%(ML%(MN,0),ML%(MN,1))-10*MN:MZ%(MN,0)=0
  242. 1667 LK=LK+INT(MN*IN/2):IF MN=TA THEN TA=-TA
  243. 1668 IF PA=1 THEN PRINT "-CR- TO CONT. ";:Q$=INPUT$(1) ELSE GOSUB 60890
  244. 1669 LINE (0,160)-(231,199),0,BF:GOTO 1090
  245. 1670 IF DA=5 THEN PRINT "TO THROW OR SWING:";:Q$=INPUT$(1):IF Q$<>"T" THEN PRINT "SWING":GOTO 1661
  246. 1671 IF DA=5 THEN PRINT "THROW":PW(2)=PW(2)-1
  247. 1672 FOR Y=1 TO 5:IF PX+DX*Y<1 OR PX+DX*Y>9 OR PY+DY*Y>9 OR PY+DY*Y<0 THEN 1662
  248. 1673 MN=DN%(PX+DX*Y,PY+DY*Y):MN=INT(MN/10):IF MN>0 THEN 1662
  249. 1674 NEXT:GOTO 1662
  250. 1680 IF PW(5)<1 THEN PRINT "NONE OWNED":GOTO 1650
  251. 1681 IF PT$="F" THEN Q=INT(RND*4+1):GOTO 1685
  252. 1682 PRINT "1-LADDER-UP","2-LADDER-DN":PRINT "3-KILL","4-BAD??":PRINT "CHOICE ";:Q$=INPUT$(1):Q=VAL(Q$):PRINT Q:IF Q<1 OR Q>4 THEN 1682
  253. 1683 IF RND>.75 THEN PRINT "LAST CHARGE ON THIS AMULET!":PW(5)=PW(5)-1
  254. 1685 ON Q GOTO 1686,1690,1691,1692
  255. 1686 PRINT "LADDER UP":DN%(PX,PY)=8:GOTO 1090
  256. 1690 PRINT "LADDER DOWN":DN%(PX,PY)=7:GOTO 1090
  257. 1691 PRINT "MAGIC ATTACK":DA=10+IN:GOTO 1672
  258. 1692 ON INT(RND*3+1) GOTO 1693,1695,1697
  259. 1693 PRINT "YOU HAVE BEEN TURNED":PRINT "INTO A TOAD!"
  260. 1694 FOR Z2=1 TO 4:C(Z2)=3:NEXT Z2:GOTO 1090
  261. 1695 PRINT "YOU HAVE BEEN TURNED":PRINT "INTO A LIZARD MAN":FOR Y=0 TO 4:C(Y)=INT(C(Y)*2.5):NEXT:GOTO 1090
  262. 1697 PRINT "BACKFIRE":C(0)=C(0)/2:GOTO 1090
  263. 1700 GOSUB 60080:CLS:PRINT "PRESS ENTER TO CONTINUE";:Q$=INPUT$(1):SCREEN 0:SCREEN 1:CLS:GOTO 1090
  264. 2000 NM=0:FOR X=1 TO 10
  265. 2005 MZ%(X,0)=0:MZ%(X,1)=X+3+IN
  266. 2010 IF X-2>IN OR RND>.4 THEN 2090
  267. 2020 ML%(X,0)=INT(RND*9+1):ML%(X,1)=INT(RND*9+1)
  268. 2030 IF DN%(ML%(X,0),ML%(X,1))<>0 THEN 2020
  269. 2040 IF ML%(X,0)=PX AND ML%(X,1)=PY THEN 2020
  270. 2050 DN%(ML%(X,0),ML%(X,1))=X*10
  271. 2051 MZ%(X,0)=1
  272. 2052 NM=NM+1
  273. 2055 MZ%(X,1)=X*2+IN*2*LP
  274. 2090 NEXT:RETURN
  275. 3087 LINE (C-28/DI,B-41/DI)-(C+30/DI,B-55/DI):LINE (C+28/DI,B-58/DI)-(C+22/DI,B-56/DI):LINE -(C+22/DI,B-53/DI):LINE -(C+28/DI,B-52/DI):LINE -(C+34/DI,B-54/DI):LINE -(C+20/DI,B-50/DI):LINE -(C+26/DI,B-47/DI)
  276. 3088 LINE (C+10/DI,B-58/DI)-(C+10/DI,B-61/DI):LINE -(C+4/DI,B-58/DI):LINE (C-10/DI,B-58/DI)-(C-10/DI,B-61/DI):LINE -(C-4/DI,B-58/DI):LINE (C+40/DI,B-9/DI)-(C+50/DI,B-12/DI):LINE -(C+40/DI,B-7/DI)
  277. 3089 LINE (C-8/DI,B-25/DI)-(C+6/DI,B-7/DI):LINE -(C+28/DI,B-7/DI):LINE -(C+28/DI,B-9/DI):LINE -(C+20/DI,B-9/DI):LINE -(C+6/DI,B-25/DI):GOTO 490
  278. 4000 FOR MM=1 TO 10:IF MZ%(MM,0)=0 THEN 4999
  279. 4010 RA=SQR((PX-ML%(MM,0))^2+(PY-ML%(MM,1))^2)
  280. 4011 IF MZ%(MM,1)4020 IF RA<1.3 THEN 4500
  281. 4025 IF MM=8 AND RA<3 THEN 4999
  282. 4030 X1=SGN(PX-ML%(MM,0)):Y1=SGN(PY-ML%(MM,1))
  283. 4031 IF MZ%(MM,1)4035 IF Y1=0 THEN 4045
  284. 4040 D=DN%(ML%(MM,0),ML%(MM,1)+Y1):IF D=1 OR D>9 OR D=2 THEN 4045
  285. 4042 X1=0:GOTO 4050
  286. 4045 Y1=0:IF X1=0 THEN 4050
  287. 4046 D=DN%(ML%(MM,0)+X1,ML%(MM,1)):IF D=1 OR D>9 OR D=2 THEN X1=0:GOTO 4081
  288. 4050 DN%(ML%(MM,0),ML%(MM,1))=DN%(ML%(MM,0),ML%(MM,1))-10*MM
  289. 4055 IF ML%(MM,0)+X1=PX AND ML%(MM,1)+Y1=PY THEN 4999
  290. 4060 ML%(MM,0)=ML%(MM,0)+X1:ML%(MM,1)=ML%(MM,1)+Y1
  291. 4080 DN%(ML%(MM,0),ML%(MM,1))=DN%(ML%(MM,0),ML%(MM,1))+10*MM
  292. 4081 IF X1<>0 OR Y1<>0 THEN 4999
  293. 4082 IF MZ%(MM,1)4083 IF MZ%(MM,1)4499 GOTO 4999
  294. 4500 IF MM=2 OR MM=7 THEN 4600
  295. 4509 LOCATE 20,1:PRINT "YOU ARE BEING ATTACKED":PRINT "BY A ";M$(MM)
  296. 4510 IF RND*20-SGN(PW(3))-C(3)+MM+IN<0 THEN PRINT "MISSED":GOTO 4525
  297. 4520 PRINT "HIT":C(0)=C(0)-INT(RND*MM+IN)
  298. 4525 IF PA=1 THEN PRINT "-CR- TO CONT. ";:Q$=INPUT$(1) ELSE GOSUB 60890
  299. 4530 GOTO 4999
  300. 4600 IF RND<.5 THEN 4509
  301. 4610 IF MM=7 THEN PW(0)=INT(PW(0)/2):PRINT "A GREMLIN STOLE SOME FOOD":GOTO 4525
  302. 4620 ZZ=INT(RND*6):IF PW(ZZ)<1 THEN 4620
  303. 4630 PRINT "A THIEF STOLE A ";W$(ZZ):PW(ZZ)=PW(ZZ)-1:GOTO 4525
  304. 4999 NEXT:RETURN
  305. 6000 PRINT:PRINT:PRINT " WE MOURN THE PASSING OF"
  306. 6005 IF LEN(PN$)>22 THEN PN$=""
  307. 6010 IF PN$="" THEN PN$="THE PEASANT"
  308. 6020 PN$=PN$+" AND HIS COMPUTER"
  309. 6030 LOCATE ,20-INT(LEN(PN$)/2):PRINT PN$
  310. 6035 PRINT " TO INVOKE A MIRACLE OF RESURRECTION"
  311. 6040 PRINT " ";
  312. 6050 IF INKEY$=CHR$(27) THEN 1
  313. 6060 GOTO 6050
  314. 7000 SCREEN 0:CLS
  315. 7010 IF PN$<>"" THEN 7500
  316. 7020 PRINT:PRINT:PRINT " WELCOME PEASANT INTO THE HALLS OF":PRINT "THE MIGHTY LORD BRITISH. HEREIN THOU MAYCHOOSE TO DARE BATTLE WITH THE EVIL":PRINT "CREATURES OF THE DEPTHS, FOR GREAT":PRINT "REWARD!"
  317. 7030 PRINT:PRINT "WHAT IS THY NAME PEASANT ";:INPUT PN$
  318. 7040 PRINT "DOEST THOU WISH FOR GRAND ADVENTURE ? ";:Q$=INPUT$(1):IF Q$<>"Y" THEN PRINT:PRINT "THEN LEAVE AND BEGONE!":PN$="":PRINT:PRINT " PRESS -SPACE TO CONT.";:Q$=INPUT$(1):GOTO 1090
  319. 7045 PRINT
  320. 7050 PRINT:PRINT "GOOD! THOU SHALT TRY TO BECOME A":PRINT "KNIGHT!!!":PRINT:PRINT "THY FIRST TASK IS TO GO INTO THE":PRINT "DUNGEONS AND TO RETURN ONLY AFTER":PRINT "KILLING A(N) ";:TA=INT(C(4)/3):PRINT M$(TA)
  321. 7060 PRINT:PRINT " GO NOW UPON THIS QUEST, AND MAY":PRINT "LADY LUCK BE FAIR UNTO YOU.....":PRINT ".....ALSO I, BRITISH, HAVE INCREASED":PRINT "EACH OF THY ATTRIBUTES BY ONE!"
  322. 7070 PRINT:PRINT " PRESS -SPACE- TO CONT.";:Q$=INPUT$(1):FOR X=0 TO 5:C(X)=C(X)+1:NEXT:CLS:GOTO 1090
  323. 7500 IF TA>0 THEN PRINT:PRINT:PRINT PN$;" WHY HAST THOU RETURNED?":PRINT "THOU MUST KILL A(N) ";M$(TA):PRINT "GO NOW AND COMPLETE THY QUEST!":PRINT:PRINT " PRESS -SPACE- TO CONT.";:Q$=INPUT$(1):CLS:GOTO 1090
  324. 7510 PRINT:PRINT:PRINT:PRINT "AAHH!!......";PN$:PRINT:PRINT "THOU HAST ACOMPLISHED THY QUEST!":IF ABS(TA)=10 THEN 7900
  325. 7520 PRINT "UNFORTUNATELY, THIS IS NOT ENOUGH TO":PRINT "BECOME A KNIGHT.":TA=ABS(TA)+1:PRINT:PRINT "NOW THOU MUST KILL A(N) ";M$(TASK)
  326. 7530 GOTO 7060
  327. 7900 SCREEN 0:CLS:PRINT:PRINT:PRINT:PN$="LORD "+PN$:PRINT " ";PN$;","
  328. 7910 PRINT " THOU HAST PROVED THYSELF WORTHY":PRINT "OF KNIGHTHOOD, CONTINUE PLAY IF THOU":PRINT "DOTH WISH, BUT THOU HAST ACOMPLISHED":PRINT "THE MAIN OBJECTIVE OF THIS GAME..."
  329. 7920 IF LP=10 THEN 7950
  330. 7930 PRINT:PRINT " NOW MAYBE THOU ART FOOLHEARTY":PRINT "ENOUGH TO TRY DIFFICULTY LEVEL ";LP+1
  331. 7940 GOTO 7070
  332. 7950 PRINT:PRINT "...CALL CALIFORNIA PACIFIC COMPUTER":PRINT "AT (415)-569-9126 TO REPORT THIS":PRINT "AMAZING FEAT!"
  333. 7990 GOTO 7070
  334. 50000 REM TEST MONSTERS (BY NANOCHESS)
  335. 50002 MC=1
  336. 50003 SCREEN 2,1:SCREEN 0
  337. 50004 SCREEN 1
  338. 50005 C=160:B=120:DI=1
  339. 50010 EN=1:GOSUB 270
  340. 50020 A$=INPUT$(1)
  341. 50025 MC=MC+1:IF MC<11 THEN 50003
  342. 50030 SCREEN 2,1:SCREEN 0
  343. 50040 END
  344. 60000 SCREEN 1:SCREEN 0:CLS:LOCATE 5:INPUT "TYPE THY LUCKY NUMBER.....";Q$:LN=VAL(Q$)
  345. 60005 LOCATE 7:INPUT "LEVEL OF PLAY(1-10)......";Q$:LP=INT(VAL(Q$))
  346. 60006 IF LP<1 OR LP>10 THEN 60005
  347. 60010 RANDOMIZE ABS(LN)
  348. 60020 DATA "HIT POINTS.....","STRENGTH.......","DEXTERITY......","STAMINA........","WISDOM.........","GOLD..........."
  349. 60025 DIM PW(5)
  350. 60030 DIM C$(5):FOR X=0 TO 5:READ C$(X):NEXT
  351. 60040 DIM C(5)
  352. 60041 DIM M$(10),ML%(10,1),MZ%(10,1)
  353. 60042 DATA "SKELETON","THIEF","GIANT RAT","ORC","VIPER","CARRION CRAWLER","GREMLIN","MIMIC","DAEMON","BALROG"
  354. 60043 FOR X=1 TO 10:READ M$(X):NEXT
  355. 60050 FOR X=0 TO 5:C(X)=INT(SQR(RND)*21+4):NEXT X
  356. 60060 CLS:LOCATE 8:FOR X=0 TO 5:PRINT C$(X);C(X):NEXT:PRINT:PRINT"SHALT THOU PLAY WITH THESE QUALITIES?":LOCATE ,20:LINE INPUT Q$:IF Q$<>"Y" THEN 60050
  357. 60061 LOCATE 15:PRINT:PRINT "AND SHALT THOU BE A FIGHTER OR A MAGE?":LOCATE ,20:LINE INPUT PT$
  358. 60062 IF PT$="M" OR PT$="F" THEN 60070
  359. 60063 GOTO 60061
  360. 60070 DIM W$(5):DATA "FOOD","RAPIER","AXE","SHIELD","BOW AND ARROWS","MAGIC AMULET":FOR X=0 TO 5:READ W$(X):NEXT
  361. 60075 GOSUB 60080:GOSUB 60200:RETURN
  362. 60080 SCREEN 0:CLS:PRINT:PRINT:PRINT " STAT'S WEAPONS":PRINT:FOR X=0 TO 5:PRINT C$(X);C(X);TAB(24);"0-";W$(X):NEXT
  363. 60081 LOCATE 11,18:PRINT "Q-QUIT"
  364. 60085 FOR Z=0 TO 5:LOCATE 5+Z,25-LEN(STR$(PW(Z))):PRINT PW(Z):NEXT
  365. 60090 LOCATE 17,5:PRINT "PRICE";:LOCATE ,15:PRINT "DAMAGE";:LOCATE ,25:PRINT "ITEM"
  366. 60100 FOR X=0 TO 5:LOCATE 19+X,25:PRINT W$(X);:NEXT X
  367. 60110 LOCATE 19,5:PRINT "1 FOR 10";:LOCATE,15:PRINT "N/A":LOCATE 20,5:PRINT "8";:LOCATE,15:PRINT "1-10":LOCATE 21,5:PRINT "5";:LOCATE,15:PRINT "1-5"
  368. 60120 LOCATE 22,5:PRINT "6";:LOCATE,15:PRINT "1":LOCATE 23,5:PRINT "3";:LOCATE,15:PRINT "1-4":LOCATE 24,5:PRINT "15";:LOCATE,15:PRINT "?????";:LOCATE 1,1
  369. 60130 RETURN
  370. 60200 LOCATE 13,1:PRINT"WELCOME TO THE ADVENTURE SHOP"
  371. 60210 GOSUB 60890:LOCATE 14,1:PRINT STRING$(120," "):LOCATE 14,1
  372. 60211 PRINT "WHICH ITEM SHALT THOU BUY ";:Q$=INPUT$(1):IF Q$="Q" THEN PRINT:PRINT "BYE":GOSUB 60890:SCREEN 0:CLS:RETURN
  373. 60215 Z=-1
  374. 60220 IF Q$="F" THEN PRINT "FOOD":Z=0:P=1
  375. 60221 IF Q$="R" THEN PRINT "RAPIER":Z=1:P=8
  376. 60222 IF Q$="A" THEN PRINT "AXE":Z=2:P=5
  377. 60223 IF Q$="S" THEN PRINT "SHIELD":Z=3:P=6
  378. 60224 IF Q$="B" THEN PRINT "BOW":Z=4:P=3
  379. 60225 IF Q$="M" THEN PRINT "AMULET":Z=5:P=15
  380. 60226 IF Z=-1 THEN PRINT Q$:PRINT "I'M SORRY WE DON'T HAVE THAT.":GOTO 60210
  381. 60227 IF Q$="R" AND PT$="M" THEN PRINT "I'M SORRY MAGES":PRINT "CAN'T USE THAT!":GOTO 60210
  382. 60228 IF Q$="B" AND PT$="M" THEN PRINT "I'M SORRY MAGES":PRINT "CAN'T USE THAT!":GOTO 60210
  383. 60230 IF C(5)-P<0 THEN PRINT "M'LORD THOU CAN NOT AFFORD THAT ITEM.":GOTO 60210
  384. 60235 IF Z=0 THEN PW(Z)=PW(Z)+9
  385. 60236 PW(Z)=PW(Z)+1:C(5)=C(5)-P
  386. 60237 LOCATE 10,16:PRINT C(5);" "
  387. 60240 LOCATE 5+Z,25-LEN(STR$(PW(Z))):PRINT PW(Z);
  388. 60250 GOTO 60210
  389. 60868 CY=CSRLIN:CX=POS(0):IF CX>=39 THEN RETURN ELSE PRINT STRING$(39-CX," ");:LOCATE ,CX:RETURN
  390. 60890 X=TIMER
  391. 60891 IF TIMER-X<0.5 THEN 60891
  392. 60893 RETURN
  393. 60900 SCREEN 1:LINE (0,0)-(319,159),0,BF:RETURN
  394.  
  395.  
  396.  
  397.  
  398. et en MSX Basic :
  399.  
  400. 0 ON ERROR GOTO 4
  401. 1 REM AKALABETH, PORT TO MSX BASIC BY NANOCHESS, FEB/05/2019
  402. 4 COLOR 15,1,1:CLS:KEY OFF
  403. 7 CLEAR:GOSUB 60000
  404. 8 ZZ=RND(-ABS(LN))
  405. 9 LEVEL = 0
  406. 10 SCREEN 0:WIDTH 40:GO=0:LOCATE ,11:PRINT " WELCOME TO AKALABETH, WORLD OF DOOM!"
  407. 20 DIM DN%(10,10),TE%(20,20),XX%(10),YY%(10),PE%(10,3),LD%(10,5),CD%(10,3),FT%(10,5),LA%(10,3)
  408. 30 FOR X=0 TO 20:TE%(X,0)=1:TE%(0,X)=1:TE%(X,20)=1:TE%(20,X)=1:NEXT
  409. 35 LOCATE ,22:PRINT " (PLEASE WAIT)";
  410. 40 FOR X=1 TO 19:FOR Y=1 TO 19:TE%(X,Y)=INT(RND(1)^5*4.5)
  411. 41 IF TE%(X,Y)=3 AND RND(1)>.5 THEN TE%(X,Y)=0
  412. 42 NEXT:PRINT ".";:NEXT
  413. 50 TE%(INT(RND(1)*19+1),INT(RND(1)*19+1))=5:TX=INT(RND(1)*19+1):TY=INT(RND(1)*19+1):TE%(TX,TY)=3
  414. 51 XX%(0)=127:YY%(0)=79
  415. 52 FOR X=2 TO 20 STEP 2:XX%(X/2)=INT(ATN(1/X)/ATN(1)*128+.5):YY%(X/2)=INT(XX%(X/2)*4/7)
  416. 53 PE%(X/2,0)=127-XX%(X/2):PE%(X/2,1)=127+XX%(X/2):PE%(X/2,2)=79-YY%(X/2):PE%(X/2,3)=79+YY%(X/2):NEXT
  417. 54 PE%(0,0)=0:PE%(0,1)=255:PE%(0,2)=0:PE%(0,3)=159
  418. 55 FOR X=1 TO 10:CD%(X,0)=127-XX%(X)/3:CD%(X,1)=127+XX%(X)/3:CD%(X,2)=79-YY%(X)*.7:CD%(X,3)=79+YY%(X):NEXT:PRINT ".";
  419. 56 FOR X=0 TO 9:LD%(X,0)=(PE%(X,0)*2+PE%(X+1,0))/3:LD%(X,1)=(PE%(X,0)+2*PE%(X+1,0))/3:W=LD%(X,0)-PE%(X,0)
  420. 57 LD%(X,2)=PE%(X,2)+W*4/7:LD%(X,3)=PE%(X,2)+2*W*4/7:LD%(X,4)=(PE%(X,3)*2+PE%(X+1,3))/3:LD%(X,5)=(PE%(X,3)+2*PE%(X+1,3))/3
  421. 58 LD%(X,2)=LD%(X,4)-(LD%(X,4)-LD%(X,2))*.8:LD%(X,3)=LD%(X,5)-(LD%(X,5)-LD%(X,3))*.8:IF LD%(X,3)=LD%(X,4) THEN LD%(X,3)=LD%(X,3)-1
  422. 59 NEXT
  423. 60 FOR X=0 TO 9:FT%(X,0)=127-XX%(X)/3:FT%(X,1)=127+XX%(X)/3:FT%(X,2)=127-XX%(X+1)/3:FT%(X,3)=127+XX%(X+1)/3
  424. 61 FT%(X,4)=79+(YY%(X)*2+YY%(X+1))/3:FT%(X,5)=79+(YY%(X)+2*YY%(X+1))/3:NEXT
  425. 62 FOR X=0 TO 9:LA%(X,0)=(FT%(X,0)*2+FT%(X,1))/3:LA%(X,1)=(FT%(X,0)+2*FT%(X,1))/3:LA%(X,3)=FT%(X,4):LA%(X,2)=159-LA%(X,3):NEXT
  426. 68 COLOR 15
  427. 70 GOSUB 100:GOTO 1000
  428. 90 FOR X=0 TO 9:FOR Y=0 TO 5:PRINT LD%(X,Y);" ";:NEXT:PRINT:NEXT:INPUT Q$
  429. 100 GOSUB 60900:FOR Y=-1 TO 1:FOR X=-1 TO 1
  430. 105 LINE (126,75)-(130,75):LINE (128,73)-(128,77)
  431. 110 ZZ=TE%(TX+X,TY+Y):X1=53+(X+1)*50:Y1=(Y+1)*50
  432. 120 IF ZZ=2 THEN LINE (X1+20,Y1+20)-(X1+30,Y1+20):LINE -(X1+30,Y1+30):LINE -(X1+20,Y1+30):LINE -(X1+20,Y1+20)
  433. 130 IF ZZ=3 THEN LINE (X1+10,Y1+10)-(X1+20,Y1+10):LINE -(X1+20,Y1+40):LINE -(X1+10,Y1+40):LINE -(X1+10,Y1+30):LINE -(X1+40,Y1+30)
  434. 135 IF ZZ=3 THEN LINE -(X1+40,Y1+40):LINE -(X1+30,Y1+40):LINE -(X1+30,Y1+10):LINE -(X1+40,Y1+10):LINE -(X1+40,Y1+20):LINE -(X1+10,Y1+20):LINE -(X1+10,Y1+10)
  435. 140 IF ZZ=4 THEN LINE (X1+20,Y1+20)-(X1+30,Y1+30):LINE -(X1+20,Y1+30):LINE -(X1+30,Y1+20)
  436. 150 IF ZZ=5 THEN LINE (X1,Y1)-(X1+50,Y1):LINE -(X1+50,Y1+50):LINE -(X1,Y1+50):LINE -(X1,Y1):LINE (X1+10,Y1+10)-(X1+10,Y1+40)
  437. 155 IF ZZ=5 THEN LINE -(X1+40,Y1+40):LINE -(X1+40,Y1+10):LINE -(X1+10,Y1+10):LINE -(X1+40,Y1+40):LINE (X1+10,Y1+40)-(X1+40,Y1+10)
  438. 160 IF ZZ=1 THEN LINE (X1+10,Y1+50)-(X1+10,Y1+40):LINE -(X1+20,Y1+30):LINE -(X1+40,Y1+30):LINE -(X1+40,Y1+50):LINE (X1,Y1+10)-(X1+10,Y1+10):LINE (X1+50,Y1+10)-(X1+40,Y1+10):LINE (X1,Y1+40)-(X1+10,Y1+40):LINE (X1+40,Y1+40)-(X1+50,Y1+40)
  439. 170 IF ZZ=1 THEN LINE (X1+10,Y1)-(X1+10,Y1+20):LINE -(X1+20,Y1+20):LINE -(X1+20,Y1+30):LINE -(X1+30,Y1+30):LINE -(X1+30,Y1+10):LINE -(X1+40,Y1+10):LINE -(X1+40,Y1)
  440. 190 NEXT:NEXT:RETURN
  441. 200 GOSUB 60900:DI=0:COLOR 15
  442. 202 CE=DN%(PX+DX*DI,PY+DY*DI):LE=DN%(PX+DX*DI+DY,PY+DY*DI-DX):RI=DN%(PX+DX*DI-DY,PY+DY*DI+DX)
  443. 204 L1=PE%(DI,0):R1=PE%(DI,1):T1=PE%(DI,2):B1=PE%(DI,3):L2=PE%(DI+1,0):R2=PE%(DI+1,1):T2=PE%(DI+1,2):B2=PE%(DI+1,3)
  444. 205 CE=INT(CE):LE=INT(LE):RI=INT(RI)
  445. 206 MC=INT(CE/10):CE=CE-MC*10:LE=INT((LE/10-INT(LE/10))*10):RI=INT((RI/10-INT(RI/10))*10)
  446. 208 IF DI=0 THEN 216
  447. 210 IF CE=1 OR CE=3 OR CE=4 THEN LINE (L1,T1)-(R1,T1):LINE -(R1,B1):LINE -(L1,B1):LINE -(L1,T1)
  448. 212 IF CE=1 OR CE=3 THEN EN=1:GOTO 260
  449. 214 IF CE=4 THEN LINE (CD%(DI,0),CD%(DI,3))-(CD%(DI,0),CD%(DI,2)):LINE -(CD%(DI,1),CD%(DI,2)):LINE -(CD%(DI,1),CD%(DI,3)):EN=1:GOTO 260
  450. 216 IF LE=1 OR LE=3 OR LE=4 THEN LINE (L1,T1)-(L2,T2):LINE (L1,B1)-(L2,B2)
  451. 218 IF RI=1 OR RI=3 OR RI=4 THEN LINE (R1,T1)-(R2,T2):LINE (R1,B1)-(R2,B2)
  452. 220 IF LE=4 AND DI>0 THEN LINE (LD%(DI,0),LD%(DI,4))-(LD%(DI,0),LD%(DI,2)):LINE -(LD%(DI,1),LD%(DI,3)):LINE -(LD%(DI,1),LD%(DI,5))
  453. 222 IF LE=4 AND DI=0 THEN LINE (0,LD%(DI,2)-3)-(LD%(DI,1),LD%(DI,3)):LINE -(LD%(DI,1),LD%(DI,5))
  454. 224 IF RI=4 AND DI>0 THEN LINE (255-LD%(DI,0),LD%(DI,4))-(255-LD%(DI,0),LD%(DI,2)):LINE -(255-LD%(DI,1),LD%(DI,3)):LINE -(255-LD%(DI,1),LD%(DI,5))
  455. 226 IF RI=4 AND DI=0 THEN LINE (255,LD%(DI,2)-3)-(255-LD%(DI,1),LD%(DI,3)):LINE -(255-LD%(DI,1),LD%(DI,5))
  456. 228 IF LE=3 OR LE=1 OR LE=4 THEN 234
  457. 230 IF DI<>0 THEN LINE (L1,T1)-(L1,B1)
  458. 232 LINE (L1,T2)-(L2,T2):LINE -(L2,B2):LINE -(L1,B2)
  459. 234 IF RI=3 OR RI=1 OR RI=4 THEN 240
  460. 236 IF DI<>0 THEN LINE (R1,T1)-(R1,B1)
  461. 238 LINE (R1,T2)-(R2,T2):LINE -(R2,B2):LINE -(R1,B2)
  462. 240 IF CE=7 OR CE=9 THEN LINE (FT%(DI,0),FT%(DI,4))-(FT%(DI,2),FT%(DI,5)):LINE -(FT%(DI,3),FT%(DI,5)):LINE -(FT%(DI,1),FT%(DI,4)):LINE -(FT%(DI,0),FT%(DI,4))
  463. 242 IF CE=8 THEN LINE (FT%(DI,0),158-FT%(DI,4))-(FT%(DI,2),158-FT%(DI,5)):LINE -(FT%(DI,3),158-FT%(DI,5)):LINE -(FT%(DI,1),158-FT%(DI,4)):LINE -(FT%(DI,0),158-FT%(DI,4))
  464. 244 IF CE=7 OR CE=8 THEN BA=LA%(DI,3):TP=LA%(DI,2):LX=LA%(DI,0):RX=LA%(DI,1):LINE (LX,BA)-(LX,TP):LINE (RX,TP)-(RX,BA)
  465. 246 IF CE=7 OR CE=8 THEN Y1=(BA*4+TP)/5:Y2=(BA*3+TP*2)/5:Y3=(BA*2+TP*3)/5:Y4=(BA+TP*4)/5:LINE (LX,Y1)-(RX,Y1):LINE (LX,Y2)-(RX,Y2):LINE (LX,Y3)-(RX,Y3):LINE (LX,Y4)-(RX,Y4)
  466. 248 IF DI>0 AND CE=5 THEN LINE (127-10/DI,PE%(DI,3))-(127-10/DI,PE%(DI,3)-10/DI):LINE -(127+10/DI,PE%(DI,3)-10/DI):LINE -(127+10/DI,PE%(DI,3)):LINE -(127-10/DI,PE%(DI,3))
  467. 249 IF CE=5 AND DI>0 THEN COLOR 7:PRESET (0,0):PRINT #1,"CHEST!":COLOR 15
  468. 250 IF DI>0 AND CE=5 THEN LINE (127-10/DI,PE%(DI,3)-10/DI)-(127-5/DI,PE%(DI,3)-15/DI):LINE -(127+15/DI,PE%(DI,3)-15/DI):LINE -(127+15/DI,PE%(DI,3)-5/DI):LINE -(127+10/DI,PE%(DI,3))
  469. 252 IF DI>0 AND CE=5 THEN LINE (127+10/DI,PE%(DI,3)-10/DI)-(127+15/DI,PE%(DI,3)-15/DI)
  470. 260 IF MC<1 THEN 490
  471. 265 B=79+YY%(DI):C=127
  472. 266 COLOR 7:IF MC=8 THEN PRESET (0,0):PRINT #1,"CHEST!";:GOSUB 60868:PRINT:COLOR 15:GOTO 269
  473. 267 PRESET (0,8):PRINT #1,M$(MC):COLOR 15
  474. 269 IF DI=0 THEN 490
  475. 270 ON MC GOTO 300,310,320,330,340,350,360,370,380,390
  476. 280 GOTO 490
  477. 300 LINE (C-23/DI,B)-(C-15/DI,B):LINE -(C-15/DI,B-15/DI):LINE -(C-8/DI,B-30/DI):LINE -(C+8/DI,B-30/DI):LINE -(C+15/DI,B-15/DI):LINE -(C+15/DI,B):LINE -(C+23/DI,B)
  478. 301 LINE (C,B-26/DI)-(C,B-65/DI):LINE (C-2/DI+.5,B-38/DI)-(C+2/DI+.5,B-38/DI):LINE (C-3/DI+.5,B-45/DI)-(C+3/DI+.5,B-45/DI):LINE (C-5/DI+.5,B-53/DI)-(C+5/DI+.5,B-53/DI)
  479. 302 LINE (C-23/DI,B-56/DI)-(C-30/DI,B-53/DI):LINE -(C-23/DI,B-45/DI):LINE -(C-23/DI,B-53/DI):LINE -(C-8/DI,B-38/DI)
  480. 303 LINE (C-15/DI,B-45/DI)-(C-8/DI,B-60/DI):LINE -(C+8/DI,B-60/DI):LINE -(C+15/DI,B-45/DI):LINE (C+15/DI,B-42/DI)-(C+15/DI,B-57/DI):LINE (C+12/DI,B-45/DI)-(C+20/DI,B-45/DI)
  481. 304 LINE (C,B-75/DI)-(C-5/DI+.5,B-80/DI):LINE -(C-8/DI,B-75/DI):LINE -(C-5/DI+.5,B-65/DI):LINE -(C+5/DI+.5,B-65/DI):LINE -(C+5/DI+.5,B-68/DI):LINE -(C-5/DI+.5,B-68/DI):LINE -(C-5/DI+.5,B-65/DI)
  482. 305 LINE -(C+5/DI+.5,B-65/DI):LINE -(C+8/DI,B-75/DI):LINE -(C+5/DI+.5,B-80/DI):LINE -(C-5/DI+.5,B-80/DI):PSET (C-5/DI+.5,B-72/DI):PSET (C+5/DI+.5,B-72/DI)
  483. 309 GOTO 490
  484. 310 LINE (C,B-56/DI)-(C,B-8/DI):LINE -(C+10/DI,B):LINE -(C+30/DI,B):LINE -(C+30/DI,B-45/DI):LINE -(C+10/DI,B-64/DI):LINE -(C,B-56/DI)
  485. 311 LINE -(C-10/DI,B-64/DI):LINE -(C-30/DI,B-45/DI):LINE -(C-30/DI,B):LINE -(C-10/DI,B):LINE -(C,B-8/DI)
  486. 312 LINE (C-10/DI,B-64/DI)-(C-10/DI,B-75/DI):LINE -(C,B-83/DI):LINE -(C+10/DI,B-75/DI):LINE -(C,B-79/DI):LINE -(C-10/DI,B-75/DI):LINE -(C,B-60/DI):LINE -(C+10/DI,B-75/DI):LINE -(C+10/DI,B-64/DI)
  487. 319 GOTO 490
  488. 320 LINE (C+5/DI,B-30/DI)-(C,B-25/DI):LINE -(C-5/DI,B-30/DI):LINE -(C-15/DI,B-5/DI):LINE -(C-10/DI,B):LINE -(C+10/DI,B):LINE -(C+15/DI,B-5/DI)
  489. 321 LINE -(C+20/DI,B-5/DI):LINE -(C+10/DI,B):LINE -(C+15/DI,B-5/DI):LINE -(C+5/DI,B-30/DI):LINE -(C+10/DI,B-40/DI):LINE -(C+3/DI+.5,B-35/DI):LINE -(C-3/DI+.5,B-35/DI):LINE -(C-10/DI,B-40/DI):LINE -(C-5/DI,B-30/DI)
  490. 322 LINE (C-5/DI,B-33/DI)-(C-3/DI+.5,B-30/DI):LINE (C+5/DI,B-33/DI)-(C+3/DI+.5,B-30/DI):LINE (C-5/DI,B-20/DI)-(C-5/DI,B-15/DI)
  491. 323 LINE (C+5/DI,B-20/DI)-(C+5/DI,B-15/DI):LINE (C-7+DI,B-20/DI)-(C-7/DI,B-15/DI):LINE (C+7/DI,B-20/DI)-(C+7/DI,B-15/DI)
  492. 329 GOTO 490
  493. 330 LINE (C,B)-(C-15/DI,B):LINE -(C-8/DI,B-8/DI):LINE -(C-8/DI,B-15/DI):LINE -(C-15/DI,B-23/DI):LINE -(C-15/DI,B-15/DI):LINE -(C-23/DI,B-23/DI)
  494. 331 LINE -(C-23/DI,B-45/DI):LINE -(C-15/DI,B-53/DI):LINE -(C-8/DI,B-53/DI):LINE -(C-15/DI,B-68/DI):LINE -(C-8/DI,B-75/DI):LINE -(C,B-75/DI)
  495. 332 LINE (C,B)-(C+15/DI,B):LINE -(C+8/DI,B-8/DI):LINE -(C+8/DI,B-15/DI):LINE -(C+15/DI,B-23/DI):LINE -(C+15/DI,B-15/DI):LINE -(C+23/DI,B-23/DI)
  496. 333 LINE -(C+23/DI,B-45/DI):LINE -(C+15/DI,B-53/DI):LINE -(C+8/DI,B-53/DI):LINE -(C+15/DI,B-68/DI):LINE -(C+8/DI,B-75/DI):LINE -(C,B-75/DI)
  497. 334 LINE (C-15/DI,B-68/DI)-(C+15/DI,B-68/DI):LINE (C-8/DI,B-53/DI)-(C+8/DI,B-53/DI):LINE (C-23/DI,B-15/DI)-(C+8/DI,B-45/DI)
  498. 335 LINE (C-8/DI,B-68/DI)-(C,B-60/DI):LINE -(C+8/DI,B-68/DI):LINE -(C+8/DI,B-60/DI):LINE -(C-8/DI,B-60/DI):LINE -(C-8/DI,B-68/DI)
  499. 336 LINE (C,B-38/DI)-(C-8/DI,B-38/DI):LINE -(C+8/DI,B-53/DI):LINE -(C+8/DI,B-45/DI):LINE -(C+15/DI,B-45/DI):LINE -(C,B-30/DI):LINE -(C,B-38/DI)
  500. 339 GOTO 490
  501. 340 LINE (C-10/DI,B-15/DI)-(C-10/DI,B-30/DI):LINE -(C-15/DI,B-20/DI):LINE -(C-15/DI,B-15/DI):LINE -(C-15/DI,B):LINE -(C+15/DI,B):LINE -(C+15/DI,B-15/DI):LINE -(C-15/DI,B-15/DI)
  502. 341 LINE (C-15/DI,B-10/DI)-(C+15/DI,B-10/DI):LINE (C-15/DI,B-5/DI)-(C+15/DI,B-5/DI)
  503. 342 LINE (C,B-15/DI)-(C-5/DI,B-20/DI):LINE -(C-5/DI,B-35/DI):LINE -(C+5/DI,B-35/DI):LINE -(C+5/DI,B-20/DI):LINE -(C+10/DI,B-15/DI)
  504. 343 LINE (C-5/DI,B-20/DI)-(C+5/DI,B-20/DI):LINE (C-5/DI,B-25/DI)-(C+5/DI,B-25/DI):LINE (C-5/DI,B-30/DI)-(C+5/DI,B-30/DI)
  505. 344 LINE (C-10/DI,B-35/DI)-(C-10/DI,B-40/DI):LINE -(C-5/DI,B-45/DI):LINE -(C+5/DI,B-45/DI):LINE -(C+10/DI,B-40/DI):LINE -(C+10/DI,B-35/DI)
  506. 345 LINE (C-10/DI,B-40/DI)-(C,B-45/DI):LINE -(C+10/DI,B-40/DI)
  507. 346 LINE (C-5/DI,B-40/DI)-(C+5/DI,B-40/DI):LINE -(C+15/DI,B-30/DI):LINE -(C,B-40/DI):LINE -(C-15/DI,B-30/DI):LINE -(C-5/DI+.5,B-40/DI)
  508. 349 GOTO 490
  509. 350 LINE (C-20/DI,79-YY%(DI))-(C-20/DI,B-88/DI):LINE -(C-10/DI,B-83/DI):LINE -(C+10/DI,B-83/DI):LINE -(C+20/DI,B-88/DI):LINE -(C+20/DI,79-YY%(DI)):LINE -(C-20/DI,79-YY%(DI))
  510. 351 LINE (C-20/DI,B-88/DI)-(C-30/DI,B-83/DI):LINE -(C-30/DI,B-78/DI):LINE (C+20/DI,B-88/DI)-(C+30/DI,B-83/DI):LINE -(C+40/DI,B-83/DI)
  511. 352 LINE (C-15/DI,B-86/DI)-(C-20/DI,B-83/DI):LINE -(C-20/DI,B-78/DI):LINE -(C-30/DI,B-73/DI):LINE -(C-30/DI,B-68/DI):LINE -(C-20/DI,B-63/DI)
  512. 353 LINE (C-10/DI,B-83/DI)-(C-10/DI,B-58/DI):LINE -(C,B-50/DI):LINE (C+10/DI,B-83/DI)-(C+10/DI,B-78/DI):LINE -(C+20/DI,B-73/DI):LINE -(C+20/DI,B-40/DI)
  513. 354 LINE (C+15/DI,B-85/DI)-(C+20/DI,B-78/DI):LINE -(C+30/DI,B-76/DI):LINE -(C+30/DI,B-60/DI)
  514. 355 LINE (C,B-83/DI)-(C,B-73/DI):LINE -(C+10/DI,B-68/DI):LINE -(C+10/DI,B-63/DI):LINE -(C,B-58/DI)
  515. 359 GOTO 490
  516. 360 LINE (C+5/DI+.5,B-10/DI)-(C-5/DI+.5,B-10/DI):LINE -(C,B-15/DI):LINE -(C+10/DI,B-20/DI):LINE -(C+5/DI+.5,B-15/DI):LINE -(C+5/DI+.5,B-10/DI)
  517. 361 LINE -(C+7/DI+.5,B-6/DI):LINE -(C+5/DI+.5,B-3/DI):LINE -(C-5/DI+.5,B-3/DI):LINE -(C-7/DI+.5,B-6/DI):LINE -(C-5/DI+.5,B-10/DI)
  518. 362 LINE (C+2/DI+.5,B-3/DI)-(C+5/DI+.5,B):LINE -(C+8/DI,B):LINE (C-2/DI+.5,B-3/DI)-(C-5/DI+.5,B):LINE -(C-8/DI,B):PSET (C+3/DI+.5,B-8/DI):PSET (C-3/DI+.5,B-8/DI):LINE (C+3/DI+.5,B-5/DI)-(C-3/DI+.5,B-5/DI)
  519. 363 GOTO 490
  520. 370 LINE (127-10/DI,PE%(DI,3))-(127-10/DI,PE%(DI,3)-10/DI):LINE -(127+10/DI,PE%(DI,3)-10/DI):LINE -(127+10/DI,PE%(DI,3)):LINE -(127-10/DI,PE%(DI,3))
  521. 371 LINE (127-10/DI,PE%(DI,3)-10/DI)-(127-5/DI,PE%(DI,3)-15/DI):LINE -(127+15/DI,PE%(DI,3)-15/DI):LINE -(127+15/DI,PE%(DI,3)-5/DI):LINE -(127+10/DI,PE%(DI,3))
  522. 372 LINE (127+10/DI,PE%(DI,3)-10/DI)-(127+15/DI,PE%(DI,3)-15/DI)
  523. 373 GOTO 490
  524. 380 LINE (C-14/DI,B-46/DI)-(C-12/DI,B-37/DI):LINE -(C-20/DI,B-32/DI):LINE -(C-30/DI,B-32/DI):LINE -(C-22/DI,B-24/DI):LINE -(C-40/DI,B-17/DI):LINE -(C-40/DI,B-7/DI):LINE -(C-38/DI,B-5/DI):LINE -(C-40/DI,B-3/DI):LINE -(C-40/DI,B)
  525. 381 LINE -(C-36/DI,B):LINE -(C-34/DI,B-2/DI):LINE -(C-32/DI,B):LINE -(C-28/DI,B):LINE -(C-28/DI,B-3/DI):LINE -(C-30/DI,B-5/DI):LINE -(C-28/DI,B-7/DI):LINE -(C-28/DI,B-15/DI):LINE -(C,B-27/DI)
  526. 382 LINE (C+14/DI,B-46/DI)-(C+12/DI,B-37/DI):LINE -(C+20/DI,B-32/DI):LINE -(C+30/DI,B-32/DI):LINE -(C+22/DI,B-24/DI):LINE -(C+40/DI,B-17/DI):LINE -(C+40/DI,B-7/DI):LINE -(C+38/DI,B-5/DI):LINE -(C+40/DI,B-3/DI):LINE -(C+40/DI,B)
  527. 383 LINE -(C+36/DI,B):LINE -(C+34/DI,B-2/DI):LINE -(C+32/DI,B):LINE -(C+28/DI,B):LINE -(C+28/DI,B-3/DI):LINE -(C+30/DI,B-5/DI):LINE -(C+28/DI,B-7/DI):LINE -(C+28/DI,B-15/DI):LINE -(C,B-27/DI)
  528. 384 LINE (C+6/DI,B-48/DI)-(C+38/DI,B-41/DI):LINE -(C+40/DI,B-42/DI):LINE -(C+18/DI,B-56/DI):LINE -(C+12/DI,B-56/DI):LINE -(C+10/DI,B-57/DI):LINE -(C+8/DI,B-56/DI):LINE -(C-8/DI,B-56/DI):LINE -(C-10/DI,B-58/DI):LINE -(C+14/DI,B-58/DI)
  529. 385 LINE -(C+16/DI,B-59/DI)
  530. 386 LINE -(C+8/DI,B-63/DI):LINE -(C+6/DI,B-63/DI):LINE -(C+2/DI+.5,B-70/DI):LINE -(C+2/DI+.5,B-63/DI):LINE -(C-2/DI+.5,B-63/DI):LINE -(C-2/DI+.5,B-70/DI):LINE -(C-6/DI,B-63/DI):LINE -(C-8/DI,B-63/DI):LINE -(C-16/DI,B-59/DI):LINE -(C-14/DI,B-58/DI)
  531. 387 LINE -(C+10/DI,B-57/DI):LINE -(C-12/DI,B-56/DI):LINE -(C-18/DI,B-56/DI):LINE -(C-36/DI,B-47/DI):LINE -(C-36/DI,B-39/DI):LINE -(C-28/DI,B-41/DI):LINE -(C-28/DI,B-46/DI):LINE -(C-20/DI,B-50/DI):LINE -(C-18/DI,B-50/DI):LINE -(C-14/DI,B-46/DI)
  532. 388 GOTO 3087
  533. 390 LINE (C+6/DI,B-60/DI)-(C+30/DI,B-90/DI):LINE -(C+60/DI,B-30/DI):LINE -(C+60/DI,B-10/DI):LINE-(C+30/DI,B-40/DI):LINE -(C+15/DI,B-40/DI)
  534. 391 LINE (C-6/DI,B-60/DI)-(C-30/DI,B-90/DI):LINE -(C-60/DI,B-30/DI):LINE -(C-60/DI,B-10/DI):LINE -(C-30/DI,B-40/DI):LINE -(C-15/DI,B-40/DI)
  535. 392 LINE (C,B-25/DI)-(C+6/DI,B-25/DI):LINE -(C+10/DI,B-20/DI):LINE -(C+12/DI,B-10/DI):LINE -(C+10/DI,B-6/DI):LINE -(C+10/DI,B):LINE -(C+14/DI,B):LINE-(C+15/DI,B-5/DI):LINE -(C+16/DI,B):LINE -(C+20/DI,B)
  536. 393 LINE -(C+20/DI,B-6/DI):LINE -(C+18/DI,B-10/DI):LINE -(C+18/DI,B-20/DI):LINE -(C+15/DI,B-30/DI):LINE -(C+15/DI,B-45/DI):LINE -(C+40/DI,B-60/DI):LINE -(C+40/DI,B-70/DI)
  537. 394 LINE -(C+10/DI,B-55/DI):LINE -(C+6/DI,B-60/DI):LINE -(C+10/DI,B-74/DI):LINE -(C+6/DI,B-80/DI):LINE -(C+4/DI+.5,B-80/DI):LINE -(C+3/DI+.5,B-82/DI):LINE -(C+2/DI+.5,B-80/DI):LINE -(C,B-80/DI)
  538. 395 LINE (C,B-25/DI)-(C-6/DI,B-25/DI):LINE -(C-10/DI,B-20/DI):LINE -(C-12/DI,B-10/DI):LINE -(C-10/DI,B-6/DI):LINE -(C-10/DI,B):LINE -(C-14/DI,B):LINE -(C-15/DI,B-5/DI):LINE -(C-16/DI,B):LINE -(C-20/DI,B)
  539. 396 LINE -(C-20/DI,B-6/DI):LINE -(C-18/DI,B-10/DI):LINE -(C-18/DI,B-20/DI):LINE -(C-15/DI,B-30/DI):LINE -(C-15/DI,B-45/DI):LINE -(C-40/DI,B-60/DI):LINE -(C-40/DI,B-70/DI)
  540. 397 LINE -(C-10/DI,B-55/DI):LINE -(C-6/DI,B-60/DI):LINE -(C-10/DI,B-74/DI):LINE -(C-6/DI,B-80/DI):LINE -(C-4/DI+.5,B-80/DI):LINE -(C-3/DI+.5,B-82/DI):LINE -(C-2/DI+.5,B-80/DI):LINE -(C,B-80/DI)
  541. 398 LINE (C-6/DI,B-25/DI)-(C,B-6/DI):LINE -(C+10/DI,B):LINE -(C+4/DI+.5,B-8/DI):LINE -(C+6/DI,B-25/DI):LINE (C-40/DI,B-64/DI)-(C-40/DI,B-90/DI):LINE -(C-52/DI,B-80/DI):LINE -(C-52/DI,B-40/DI)
  542. 399 LINE (C+40/DI,B-86/DI)-(C+38/DI,B-92/DI):LINE -(C+42/DI,B-92/DI):LINE -(C+40/DI,B-86/DI):LINE -(C+40/DI,B-50/DI)
  543. 400 LINE (C+4/DI+.5,B-70/DI)-(C+6/DI,B-74/DI):LINE (C-4/DI+.5,B-70/DI)-(C-6/DI,B-74/DI):LINE (C,B-64/DI)-(C,B-60/DI):GOTO 490
  544. 490 IF EN=1 THEN EN=0:RETURN
  545. 491 DI=DI+1:GOTO 202
  546. 500 ZZ=RND(-ABS(LN)-TX*10-TY*1000+IN*31.4)
  547. 501 FOR X=1 TO 9:FOR Y=1 TO 9:DN%(X,Y)=0:NEXT:NEXT
  548. 510 FOR X=0 TO 10:DN%(X,0)=1:DN%(X,10)=1:DN%(0,X)=1:DN%(10,X)=1:NEXT
  549. 520 FOR X=2 TO 8 STEP 2:FOR Y=1 TO 9:DN%(X,Y)=1:DN%(Y,X)=1:NEXT:NEXT
  550. 530 FOR X=2 TO 8 STEP 2:FOR Y=1 TO 9 STEP 2
  551. 540 IF RND(1)>.95 THEN DN%(X,Y)=2
  552. 541 IF RND(1)>.95 THEN DN%(Y,X)=2
  553. 542 IF RND(1)>.6 THEN DN%(Y,X)=3
  554. 543 IF RND(1)>.6 THEN DN%(X,Y)=3
  555. 544 IF RND(1)>.6 THEN DN%(X,Y)=4
  556. 545 IF RND(1)>.6 THEN DN%(Y,X)=4
  557. 546 IF RND(1)>.97 THEN DN%(Y,X)=9
  558. 547 IF RND(1)>.97 THEN DN%(X,Y)=9
  559. 548 IF RND(1)>.94 THEN DN%(X,Y)=5
  560. 549 IF RND(1)>.94 THEN DN%(Y,X)=5
  561. 568 NEXT:NEXT
  562. 569 DN%(2,1)=0:IF IN/2=INT(IN/2) THEN DN%(7,3)=7:DN%(3,7)=8
  563. 570 IF IN/2<>INT(IN/2) THEN DN%(7,3)=8:DN%(3,7)=7
  564. 580 IF IN=1 THEN DN%(1,1)=8:DN%(7,3)=0
  565. 585 GOSUB 2000
  566. 590 RETURN
  567. 1000 GOSUB 60910:PRESET (0,160):PRINT #1,"COMMAND? ";
  568. 1001 X$=INKEY$:IF X$="" THEN 1001
  569. 1003 X=ASC(X$)
  570. 1030 IF X=30 THEN ON SGN(IN)+1 GOTO 1100,1150
  571. 1040 IF X=28 THEN ON SGN(IN)+1 GOTO 1200,1250
  572. 1050 IF X=29 THEN ON SGN(IN)+1 GOTO 1300,1350
  573. 1060 IF X=31 THEN ON SGN(IN)+1 GOTO 1400,1450
  574. 1070 IF X=13 THEN ON SGN(IN)+1 GOTO 1500,1550
  575. 1080 IF X=65 THEN ON SGN(IN)+1 GOTO 1600,1650
  576. 1081 IF X=32 THEN PRINT #1,"PASS":GOTO 1090
  577. 1085 IF X=83 OR X=115 THEN 1700
  578. 1086 IF X=80 OR X=112 THEN IF PA=1 THEN PA=0:PRINT #1,"PAUSE OFF":GOTO 1000
  579. 1087 IF X=80 OR X=112 THEN IF PA=0 THEN PA=1:PRINT #1,"PAUSE ON":GOTO 1000
  580. 1089 PRINT #1,"HUH?":GOTO 1000
  581. 1090 PW(0)=PW(0)-1+SGN(IN)*.9:IF PW(0)<0 THEN C(0)=0:PRINT #1,"":PRINT #1,"YOU HAVE STARVED!!!!!":GOTO 1093
  582. 1091 PRESET (168,168):PRINT #1,"FOOD=";MID$(STR$(INT(PW(0)*10+0.5)/10),2);:PRESET (168,176):PRINT #1,"H.P.=";C(0);:PRESET (168,184):PRINT #1,"GOLD=";C(5);:PRESET (0,160)
  583. 1092 PW(0)=INT(PW(0)*10)/10
  584. 1093 IF C(0)<=0 THEN 6000
  585. 1095 IF IN>0 THEN GOSUB 60910:GOSUB 4000:IF C(0)<=0 THEN 1093
  586. 1096 IF IN=0 THEN GOSUB 100
  587. 1097 IF IN>0 THEN GOSUB 200
  588. 1098 PRESET (168,168):PRINT #1,"FOOD=";MID$(STR$(INT(PW(0)*10+0.5)/10),2);:PRESET (168,176):PRINT #1,"H.P.=";C(0);:PRESET (168,184):PRINT #1,"GOLD=";C(5);:PRESET (0,160): GOTO 1000
  589. 1100 PRINT #1,"NORTH":IF TE%(TX,TY-1)=1 THEN PRINT #1,"YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
  590. 1110 TY=TY-1:GOTO 1090
  591. 1150 IF DN%(PX+DX,PY+DY)<>1 AND DN%(PX+DX,PY+DY)<10 THEN PX=PX+DX:PY=PY+DY
  592. 1155 PRINT #1,"FORWARD"
  593. 1160 IF DN%(PX,PY)=2 THEN PRINT #1,"AAARRRGGGHHH!!! A TRAP!":C(0)=C(0)-INT(RND(1)*IN+3):MR=1:IN=IN+1:PRINT #1,"FALLING TO LEVEL ";IN:GOSUB 500:GOSUB 60910:GOTO 1090
  594. 1165 Z=0
  595. 1170 IF DN%(PX,PY)=5 THEN DN%(PX,PY)=0:PRINT #1,"GOLD!!!!!":Z=INT(RND(1)*5*IN+IN):PRINT #1,Z;"-PIECES OF EIGHT":C(5)=C(5)+Z
  596. 1175 IF Z>0 THEN Z=INT(RND(1)*6):PRINT #1,"AND A ";W$(Z):PW(Z)=PW(Z)+1:GOTO 1090
  597. 1190 GOTO 1090
  598. 1200 PRINT #1,"EAST":IF TE%(TX+1,TY)=1 THEN PRINT #1,"YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
  599. 1210 TX=TX+1:GOTO 1090
  600. 1250 PRINT #1,"TURN RIGHT"
  601. 1255 IF DX<>0 THEN DY=DX:DX=0:GOTO 1090
  602. 1260 DX=-DY:DY=0:GOTO 1090
  603. 1300 PRINT #1,"WEST":IF TE%(TX-1,TY)=1 THEN PRINT #1,"YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
  604. 1310 TX=TX-1:GOTO 1090
  605. 1350 PRINT #1,"TURN LEFT"
  606. 1355 IF DX<>0 THEN DY=-DX:DX=0:GOTO 1090
  607. 1360 DX=DY:DY=0:GOTO 1090
  608. 1400 PRINT #1,"SOUTH":IF TE%(TX,TY+1)=1 THEN PRINT #1,"YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
  609. 1410 TY=TY+1:GOTO 1090
  610. 1450 PRINT #1,"TURN AROUND":DX=-DX:DY=-DY:GOTO 1090
  611. 1500 IF TE%(TX,TY)=3 THEN CLOSE #1:GOSUB 60080:GOSUB 60200:GOSUB 60900:GOTO 1090
  612. 1510 IF TE%(TX,TY)=4 AND IN=0 THEN PRINT #1,"GO DUNGEON":PRINT #1,"PLEASE WAIT ":IN=1:GOSUB 500:DX=1:DY=0:PX=1:PY=1:GOTO 1090
  613. 1515 IF TE%(TX,TY)=5 THEN 7000
  614. 1520 PRINT #1,"HUH?":GOTO 1000
  615. 1550 IF DN%(PX,PY)<>7 AND DN%(PX,PY)<>9 THEN 1580
  616. 1555 PRINT #1,"GO DOWN TO LEVEL ";IN+1
  617. 1560 IN=IN+1:GOSUB 500:MR=1:GOTO 1090
  618. 1580 IF DN%(PX,PY)<>8 THEN PRINT #1,"HUH?":GOTO 1090
  619. 1581 IF IN=1 THEN PRINT #1,"LEAVE DUNGEON":IN=0:GOTO 1586
  620. 1584 PRINT #1,"GO UP TO LEVEL ";IN-1
  621. 1585 IN=IN-1:GOSUB 500:MR=1
  622. 1586 IF IN=0 THEN PRINT #1,"THOU HAST GAINED":PRINT #1,LK;" HIT POINTS":C(0)=C(0)+LK:LK=0
  623. 1587 GOTO 1090
  624. 1600 GOTO 1090
  625. 1650 MN=0:DA=0:PRINT #1,"ATTACK":PRINT #1,"WHICH WEAPON ";:Q$=INPUT$(1)
  626. 1651 IF Q$="R" THEN DA=10:PRINT #1,"RAPIER":IF PW(1)<1 THEN PRINT #1,"NOT OWNED":GOTO 1650
  627. 1652 IF Q$="A" THEN DA=5:PRINT #1,"AXE":IF PW(2)<1 THEN PRINT #1,"NOT OWNED":GOTO 1650
  628. 1653 IF Q$="S" THEN DA=1:PRINT #1,"SHIELD":IF PW(3)<1 THEN PRINT #1,"NOT OWNED":GOTO 1650
  629. 1654 IF Q$="B" THEN DA=4:PRINT #1,"BOW":IF PW(4)<1 THEN PRINT #1,"NOT OWNED":GOTO 1650
  630. 1655 IF Q$="M" THEN PRINT #1,"MAGIC AMULET":GOTO 1680
  631. 1656 IF Q$="B" AND PT$="M" THEN PRINT #1,"MAGES CAN'T USE BOWS!":GOTO 1650
  632. 1657 IF Q$="R" AND PT$="M" THEN PRINT #1,"MAGES CAN'T USE RAPIERS!":GOTO 1650
  633. 1659 IF DA=0 THEN PRINT #1,"HANDS"
  634. 1660 IF DA=5 OR DA=4 THEN 1670
  635. 1661 MN=DN%(PX+DX,PY+DY)/10:MN=INT(MN)
  636. 1662 IF MN<1 OR C(2)-RND(1)*251663 PRINT #1,"HIT!!! ":DA=(RND(1)*DA+C(1)/5):MZ%(MN,1)=MZ%(MN,1)-DA
  637. 1664 PRINT #1,M$(MN);"'S HIT POINTS=";MZ%(MN,1)
  638. 1665 IF MZ%(MN,1)<1 THEN PRINT #1,"THOU HAST KILLED A ";M$(MN):PRINT #1,"THOU SHALT RECEIVE":DA=INT(MN+IN):PRINT #1,DA;" PIECES OF EIGHT"
  639. 1666 IF MZ%(MN,1)<1 THEN C(5)=INT(C(5)+DA):DN%(ML%(MN,0),ML%(MN,1))=DN%(ML%(MN,0),ML%(MN,1))-10*MN:MZ%(MN,0)=0
  640. 1667 LK=LK+INT(MN*IN/2):IF MN=TA THEN TA=-TA
  641. 1668 IF PA=1 THEN PRINT #1,"-CR- TO CONT. ";:Q$=INPUT$(1)
  642. 1669 GOSUB 60910:GOTO 1090
  643. 1670 IF DA=5 THEN PRINT #1,"TO THROW OR SWING:";:Q$=INPUT$(1):IF Q$<>"T" THEN PRINT #1,"SWING":GOTO 1661
  644. 1671 IF DA=5 THEN PRINT #1,"THROW":PW(2)=PW(2)-1
  645. 1672 FOR Y=1 TO 5:IF PX+DX*Y<1 OR PX+DX*Y>9 OR PY+DY*Y>9 OR PY+DY*Y<0 THEN 1662
  646. 1673 MN=DN%(PX+DX*Y,PY+DY*Y):MN=INT(MN/10):IF MN>0 THEN 1662
  647. 1674 NEXT:GOTO 1662
  648. 1680 IF PW(5)<1 THEN PRINT #1,"NONE OWNED":GOTO 1650
  649. 1681 IF PT$="F" THEN Q=INT(RND(1)*4+1):GOTO 1685
  650. 1682 PRINT #1,"1-LADDER-UP","2-LADDER-DN":PRINT #1,"3-KILL","4-BAD??":PRINT #1,"CHOICE ";:Q$=INPUT$(1):Q=VAL(Q$):PRINT Q:IF Q<1 OR Q>4 THEN 1682
  651. 1683 IF RND(1)>.75 THEN PRINT #1,"LAST CHARGE ON THIS AMULET!":PW(5)=PW(5)-1
  652. 1685 ON Q GOTO 1686,1690,1691,1692
  653. 1686 PRINT #1,"LADDER UP":DN%(PX,PY)=8:GOTO 1090
  654. 1690 PRINT #1,"LADDER DOWN":DN%(PX,PY)=7:GOTO 1090
  655. 1691 PRINT #1,"MAGIC ATTACK":DA=10+IN:GOTO 1672
  656. 1692 ON INT(RND(1)*3+1) GOTO 1693,1695,1697
  657. 1693 PRINT #1,"YOU HAVE BEEN TURNED":PRINT #1,"INTO A TOAD!"
  658. 1694 FOR Z2=1 TO 4:C(Z2)=3:NEXT Z2:GOTO 1090
  659. 1695 PRINT #1,"YOU HAVE BEEN TURNED":PRINT #1,"INTO A LIZARD MAN":FOR Y=0 TO 4:C(Y)=INT(C(Y)*2.5):NEXT:GOTO 1090
  660. 1697 PRINT #1,"BACKFIRE":C(0)=C(0)/2:GOTO 1090
  661. 1700 CLOSE #1:GOSUB 60080:PRINT "PRESS ENTER TO CONTINUE";:Q$=INPUT$(1):GOSUB 60900:GOTO 1090
  662. 2000 NM=0:FOR X=1 TO 10
  663. 2005 MZ%(X,0)=0:MZ%(X,1)=X+3+IN
  664. 2010 IF X-2>IN OR RND(1)>.4 THEN 2090
  665. 2020 ML%(X,0)=INT(RND(1)*9+1):ML%(X,1)=INT(RND(1)*9+1)
  666. 2030 IF DN%(ML%(X,0),ML%(X,1))<>0 THEN 2020
  667. 2040 IF ML%(X,0)=PX AND ML%(X,1)=PY THEN 2020
  668. 2050 DN%(ML%(X,0),ML%(X,1))=X*10
  669. 2051 MZ%(X,0)=1
  670. 2052 NM=NM+1
  671. 2055 MZ%(X,1)=X*2+IN*2*LP
  672. 2090 NEXT:RETURN
  673. 3087 LINE (C-28/DI,B-41/DI)-(C+30/DI,B-55/DI):LINE (C+28/DI,B-58/DI)-(C+22/DI,B-56/DI):LINE -(C+22/DI,B-53/DI):LINE -(C+28/DI,B-52/DI):LINE -(C+34/DI,B-54/DI):LINE -(C+20/DI,B-50/DI):LINE -(C+26/DI,B-47/DI)
  674. 3088 LINE (C+10/DI,B-58/DI)-(C+10/DI,B-61/DI):LINE -(C+4/DI,B-58/DI):LINE (C-10/DI,B-58/DI)-(C-10/DI,B-61/DI):LINE -(C-4/DI,B-58/DI):LINE (C+40/DI,B-9/DI)-(C+50/DI,B-12/DI):LINE -(C+40/DI,B-7/DI)
  675. 3089 LINE (C-8/DI,B-25/DI)-(C+6/DI,B-7/DI):LINE -(C+28/DI,B-7/DI):LINE -(C+28/DI,B-9/DI):LINE -(C+20/DI,B-9/DI):LINE -(C+6/DI,B-25/DI):GOTO 490
  676. 4000 FOR MM=1 TO 10:IF MZ%(MM,0)=0 THEN 4999
  677. 4010 RA=SQR((PX-ML%(MM,0))^2+(PY-ML%(MM,1))^2)
  678. 4011 IF MZ%(MM,1)4020 IF RA<1.3 THEN 4500
  679. 4025 IF MM=8 AND RA<3 THEN 4999
  680. 4030 X1=SGN(PX-ML%(MM,0)):Y1=SGN(PY-ML%(MM,1))
  681. 4031 IF MZ%(MM,1)4035 IF Y1=0 THEN 4045
  682. 4040 D=DN%(ML%(MM,0),ML%(MM,1)+Y1):IF D=1 OR D>9 OR D=2 THEN 4045
  683. 4042 X1=0:GOTO 4050
  684. 4045 Y1=0:IF X1=0 THEN 4050
  685. 4046 D=DN%(ML%(MM,0)+X1,ML%(MM,1)):IF D=1 OR D>9 OR D=2 THEN X1=0:GOTO 4081
  686. 4050 DN%(ML%(MM,0),ML%(MM,1))=DN%(ML%(MM,0),ML%(MM,1))-10*MM
  687. 4055 IF ML%(MM,0)+X1=PX AND ML%(MM,1)+Y1=PY THEN 4999
  688. 4060 ML%(MM,0)=ML%(MM,0)+X1:ML%(MM,1)=ML%(MM,1)+Y1
  689. 4080 DN%(ML%(MM,0),ML%(MM,1))=DN%(ML%(MM,0),ML%(MM,1))+10*MM
  690. 4081 IF X1<>0 OR Y1<>0 THEN 4999
  691. 4082 IF MZ%(MM,1)4083 IF MZ%(MM,1)4499 GOTO 4999
  692. 4500 IF MM=2 OR MM=7 THEN 4600
  693. 4509 PRESET (0,160):PRINT #1,"YOU ARE BEING ATTACKED":PRINT #1,"BY A ";M$(MM)
  694. 4510 IF RND(1)*20-SGN(PW(3))-C(3)+MM+IN<0 THEN PRINT #1,"MISSED":GOTO 4525
  695. 4520 PRINT #1,"HIT":C(0)=C(0)-INT(RND(1)*MM+IN)
  696. 4525 IF PA=1 THEN PRINT #1,"-CR- TO CONT. ";:Q$=INPUT$(1)
  697. 4530 GOTO 4999
  698. 4600 IF RND(1)<.5 THEN 4509
  699. 4610 IF MM=7 THEN PW(0)=INT(PW(0)/2):PRINT #1,"A GREMLIN STOLE SOME FOOD":GOTO 4525
  700. 4620 ZZ=INT(RND(1)*6):IF PW(ZZ)<1 THEN 4620
  701. 4630 PRINT #1,"A THIEF STOLE A ";W$(ZZ):PW(ZZ)=PW(ZZ)-1:GOTO 4525
  702. 4999 NEXT:RETURN
  703. 6000 PRINT #1,"":PRINT #1,"":PRINT #1," WE MOURN THE PASSING OF"
  704. 6005 IF LEN(PN$)>22 THEN PN$=""
  705. 6010 IF PN$="" THEN PN$="THE PEASANT"
  706. 6020 PN$=PN$+" AND HIS COMPUTER"
  707. 6030 PRINT #1,PN$
  708. 6035 PRINT #1," TO INVOKE A MIRACLE OF RESURRECTION"
  709. 6040 PRINT #1," ";
  710. 6050 IF INKEY$=CHR$(27) THEN 1
  711. 6060 GOTO 6050
  712. 7000 SCREEN 0:WIDTH 40:CLS:GO=0
  713. 7010 IF PN$<>"" THEN 7500
  714. 7020 PRINT:PRINT:PRINT " WELCOME PEASANT INTO THE HALLS OF":PRINT "THE MIGHTY LORD BRITISH. HEREIN THOU MAYCHOOSE TO DARE BATTLE WITH THE EVIL":PRINT "CREATURES OF THE DEPTHS, FOR GREAT":PRINT "REWARD!"
  715. 7030 PRINT:PRINT "WHAT IS THY NAME PEASANT ";:INPUT PN$
  716. 7040 PRINT "DOEST THOU WISH FOR GRAND ADVENTURE ? ";:Q$=INPUT$(1):IF Q$<>"Y" THEN PRINT:PRINT "THEN LEAVE AND BEGONE!":PN$="":PRINT:PRINT " PRESS -SPACE TO CONT.";:Q$=INPUT$(1):GOTO 1090
  717. 7045 PRINT
  718. 7050 PRINT:PRINT "GOOD! THOU SHALT TRY TO BECOME A":PRINT "KNIGHT!!!":PRINT:PRINT "THY FIRST TASK IS TO GO INTO THE":PRINT "DUNGEONS AND TO RETURN ONLY AFTER":PRINT "KILLING A(N) ";:TA=INT(C(4)/3):PRINT M$(TA)
  719. 7060 PRINT:PRINT " GO NOW UPON THIS QUEST, AND MAY":PRINT "LADY LUCK BE FAIR UNTO YOU.....":PRINT ".....ALSO I, BRITISH, HAVE INCREASED":PRINT "EACH OF THY ATTRIBUTES BY ONE!"
  720. 7070 PRINT:PRINT " PRESS -SPACE- TO CONT.";:Q$=INPUT$(1):FOR X=0 TO 5:C(X)=C(X)+1:NEXT:CLS:GOTO 1090
  721. 7500 IF TA>0 THEN PRINT #1,"":PRINT #1,"":PRINT #1,PN$;" WHY HAST THOU RETURNED?":PRINT #1,"THOU MUST KILL A(N) ";M$(TA):PRINT #1,"GO NOW AND COMPLETE THY QUEST!":PRINT #1,"":PRINT #1," PRESS -SPACE- TO CONT.";:Q$=INPUT$(1):CLS:GOTO 1090
  722. 7510 PRINT #1,"":PRINT #1,"":PRINT #1,"":PRINT #1,"AAHH!!......";PN$:PRINT #1,"":PRINT #1,"THOU HAST ACOMPLISHED THY QUEST!":IF ABS(TA)=10 THEN 7900
  723. 7520 PRINT #1,"UNFORTUNATELY, THIS IS NOT ENOUGH TO":PRINT #1,"BECOME A KNIGHT.":TA=ABS(TA)+1:PRINT #1,"":PRINT #1,"NOW THOU MUST KILL A(N) ";M$(TASK)
  724. 7530 GOTO 7060
  725. 7900 SCREEN 0:WIDTH 40:CLS:GO=0:PRINT:PRINT:PRINT:PN$="LORD "+PN$:PRINT " ";PN$;","
  726. 7910 PRINT " THOU HAST PROVED THYSELF WORTHY":PRINT "OF KNIGHTHOOD, CONTINUE PLAY IF THOU":PRINT "DOTH WISH, BUT THOU HAST ACOMPLISHED":PRINT "THE MAIN OBJECTIVE OF THIS GAME..."
  727. 7920 IF LP=10 THEN 7950
  728. 7930 PRINT:PRINT " NOW MAYBE THOU ART FOOLHEARTY":PRINT "ENOUGH TO TRY DIFFICULTY LEVEL ";LP+1
  729. 7940 GOTO 7070
  730. 7950 PRINT:PRINT "...CALL CALIFORNIA PACIFIC COMPUTER":PRINT "AT (415)-569-9126 TO REPORT THIS":PRINT "AMAZING FEAT!"
  731. 7990 GOTO 7070
  732. 50000 REM TEST MONSTERS (BY NANOCHESS)
  733. 50002 MC=1
  734. 50003 SCREEN 2:OPEN "GRP:" AS #1
  735. 50005 C=160:B=120:DI=1
  736. 50010 EN=1:GOSUB 270
  737. 50020 A$=INPUT$(1)
  738. 50025 MC=MC+1:IF MC<11 THEN 50003
  739. 50030 SCREEN 0
  740. 50040 END
  741. 60000 SCREEN 0:WIDTH 40:CLS:GO=0:LOCATE ,4:INPUT "TYPE THY LUCKY NUMBER.....";Q$:LN=VAL(Q$)
  742. 60005 LOCATE ,6:INPUT "LEVEL OF PLAY(1-10)......";Q$:LP=INT(VAL(Q$))
  743. 60006 IF LP<1 OR LP>10 THEN 60005
  744. 60010 ZZ=RND(-ABS(LN))
  745. 60020 DATA "HIT POINTS.....","STRENGTH.......","DEXTERITY......","STAMINA........","WISDOM.........","GOLD..........."
  746. 60025 DIM PW(5)
  747. 60030 DIM C$(5):FOR X=0 TO 5:READ C$(X):NEXT
  748. 60040 DIM C(5)
  749. 60041 DIM M$(10),ML%(10,1),MZ%(10,1)
  750. 60042 DATA "SKELETON","THIEF","GIANT RAT","ORC","VIPER","CARRION CRAWLER","GREMLIN","MIMIC","DAEMON","BALROG"
  751. 60043 FOR X=1 TO 10:READ M$(X):NEXT
  752. 60050 FOR X=0 TO 5:C(X)=INT(SQR(RND(1))*21+4):NEXT X
  753. 60060 CLS:LOCATE ,7:FOR X=0 TO 5:PRINT C$(X);C(X):NEXT:PRINT:PRINT"SHALT THOU PLAY WITH THESE QUALITIES?":LOCATE 19:LINE INPUT Q$:IF Q$<>"Y" THEN 60050
  754. 60061 LOCATE ,14:PRINT:PRINT "AND SHALT THOU BE A FIGHTER OR A MAGE?":LOCATE 20:LINE INPUT PT$
  755. 60062 IF PT$="M" OR PT$="F" THEN 60070
  756. 60063 GOTO 60061
  757. 60070 DIM W$(5):DATA "FOOD","RAPIER","AXE","SHIELD","BOW AND ARROWS","MAGIC AMULET":FOR X=0 TO 5:READ W$(X):NEXT
  758. 60075 GOSUB 60080:GOSUB 60200:RETURN
  759. 60080 SCREEN 0:WIDTH 40:CLS:GO=0:PRINT:PRINT:PRINT " STAT'S WEAPONS":PRINT:FOR X=0 TO 5:LOCATE ,4+X:PRINT C$(X);C(X);TAB(24);"0-";W$(X):NEXT
  760. 60081 LOCATE 17,10:PRINT "Q-QUIT"
  761. 60085 FOR Z=0 TO 5:LOCATE 24-LEN(STR$(PW(Z))),4+Z:PRINT PW(Z):NEXT
  762. 60090 LOCATE 4,16:PRINT "PRICE";:LOCATE 14:PRINT "DAMAGE";:LOCATE 24:PRINT "ITEM"
  763. 60100 FOR X=0 TO 5:LOCATE 24,18+X:PRINT W$(X);:NEXT X
  764. 60110 LOCATE 4,18:PRINT "1 FOR 10";:LOCATE 14:PRINT "N/A":LOCATE 4,19:PRINT "8";:LOCATE 14:PRINT "1-10":LOCATE 4,20:PRINT "5";:LOCATE 14:PRINT "1-5"
  765. 60120 LOCATE 4,21:PRINT "6";:LOCATE 14:PRINT "1":LOCATE 4,22:PRINT "3";:LOCATE 14:PRINT "1-4":LOCATE 4,23:PRINT "15";:LOCATE 14:PRINT "?????";:LOCATE 0,0
  766. 60130 RETURN
  767. 60200 LOCATE 0,12:PRINT"WELCOME TO THE ADVENTURE SHOP"
  768. 60210 LOCATE 0,13:PRINT STRING$(120," "):LOCATE 0,13
  769. 60211 PRINT "WHICH ITEM SHALT THOU BUY ";:Q$=INPUT$(1):IF Q$="Q" THEN PRINT:PRINT "BYE":SCREEN 0:CLS:WIDTH 40:GO=0:RETURN
  770. 60215 Z=-1
  771. 60220 IF Q$="F" THEN PRINT "FOOD":Z=0:P=1
  772. 60221 IF Q$="R" THEN PRINT "RAPIER":Z=1:P=8
  773. 60222 IF Q$="A" THEN PRINT "AXE":Z=2:P=5
  774. 60223 IF Q$="S" THEN PRINT "SHIELD":Z=3:P=6
  775. 60224 IF Q$="B" THEN PRINT "BOW":Z=4:P=3
  776. 60225 IF Q$="M" THEN PRINT "AMULET":Z=5:P=15
  777. 60226 IF Z=-1 THEN PRINT Q$:PRINT "I'M SORRY WE DON'T HAVE THAT.":GOTO 60210
  778. 60227 IF Q$="R" AND PT$="M" THEN PRINT "I'M SORRY MAGES":PRINT "CAN'T USE THAT!":GOTO 60210
  779. 60228 IF Q$="B" AND PT$="M" THEN PRINT "I'M SORRY MAGES":PRINT "CAN'T USE THAT!":GOTO 60210
  780. 60230 IF C(5)-P<0 THEN PRINT "M'LORD THOU CAN NOT AFFORD THAT ITEM.":GOTO 60210
  781. 60235 IF Z=0 THEN PW(Z)=PW(Z)+9
  782. 60236 PW(Z)=PW(Z)+1:C(5)=C(5)-P
  783. 60237 LOCATE 15,9:PRINT C(5);" "
  784. 60240 LOCATE 24-LEN(STR$(PW(Z))),4+Z:PRINT PW(Z);
  785. 60250 GOTO 60210
  786. 60868 CY=CSRLIN:CX=POS(0):IF CX>=31 THEN RETURN ELSE PRINT STRING$(31-CX," ");:LOCATE CX:RETURN
  787. 60900 SCREEN 2:IF GO=0 THEN OPEN "GRP:" AS #1:GO=1:CLS:RETURN ELSE CLS:RETURN
  788. 60910 LINE (0,160)-(167,191),1,BF
  789. 60915 RETURN
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top