home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1988 July / Ahoy_Magazine_88-07_1988_Double_L.d64 / tomb (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  18KB  |  436 lines

  1. 1 ifx=.thenx=1:load"tomb.obj",8,1
  2. 2 poke56,144:poke55,0:clr
  3. 3 poke53280,.:poke53281,.:x=rnd(-ti):forx=901to970:reada:pokex,a:next
  4. 4 forx=828to839:reada:pokex,a:next:forx=679to753:reada:pokex,a:next:goto79
  5. 5 d=rnd(u)*g:pokes+k,u(d):pokes+7,v(d):pokes+g,u(d+k+f):pokes+g-u,v(d+k+f)
  6. 6 return
  7. 7 vl=fc:onfc+ugosub45,45,46,47,48
  8. 8 return
  9. 9 onfc+ugosub50,51,52,53:return
  10. 10 onfc+ugosub54,55,56:return
  11. 11 print"[144] +                                    / ";
  12. 12 print"  [146][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160]  ";
  13. 13 print"  [146][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160]  ";
  14. 14 print"  [146][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160]  ";
  15. 15 print"  [146][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160]  ";
  16. 16 print"  [146][160][160][160][160]"z$"([144]                          "z$")[144][146][160][160][160][160]  ";
  17. 17 print"  [146][160][160][160][160][160]"z$"([144]========================"z$")[144][160][146][160][160][160][160]  ";
  18. 18 print"  [146][160][160][160][160][160][160] +                    / [160][160][146][160][160][160][160]  ";
  19. 19 print"  [146][160][160][160][160][160][160]  [146][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160]  [160][160][146][160][160][160][160]  ";
  20. 20 print"  [146][160][160][160][160][160][160]  [146][160][160]"z$"([144]=============="z$")[144][146][160][160]  [160][160][146][160][160][160][160]  ";
  21. 21 print"  [146][160][160][160][160][160][160]  [146][160][160][160]+            /[160][146][160][160]  [160][160][146][160][160][160][160]  ";
  22. 22 print"  [146][160][160][160][160][160][160]  [146][160][160][160] [146][160][160][160][160][160][160][160][160][160][160][160][160] [160][146][160][160]  [160][160][146][160][160][160][160]  ";
  23. 23 print"  [146][160][160][160][160][160][160]  [146][160][160][160] [146][160]"z$"([144]========"z$")[144][146][160] [160][146][160][160]  [160][160][146][160][160][160][160]  ";
  24. 24 print"  [146][160][160][160][160][160][160]  [146][160][160][160] [146][160][160] "z$"[146][166][173][173][173][173][192][144] [160][146][160] [160][146][160][160]  [160][160][146][160][160][160][160]  ";
  25. 25 print"  [146][160][160][160][160][160][160]  [146][160][160][160] [146][160][160] "z$"[146][255][144]    "z$"[146][223][144] [160][146][160] [160][146][160][160]  [160][160][146][160][160][160][160]  ";
  26. 26 print"  [146][160][160][160][160][160][160]  [146][160][160][160] [146][160][160] "z$"[146][255][144]    "z$"[146][223][144] [160][146][160] [160][146][160][160]  [160][160][146][160][160][160][160]  ";
  27. 27 print"  [146][160][160][160][160][160][160]  [146][160][160][160] [146][160]"z$"<[144]        "z$">[144][146][160] [160][146][160][160]  [160][160][146][160][160][160][160]  ";
  28. 28 print"  [146][160][160][160][160][160][160]  [146][160][160][160]/            +[160][146][160][160]  [160][160][146][160][160][160][160]  ";
  29. 29 print"  [146][160][160][160][160][160][160]  [146][160][160]"z$"<[144]              "z$">[144][146][160][160]  [160][160][146][160][160][160][160]  ";
  30. 30 print"  [146][160][160][160][160][160][160] /                    + [160][160][146][160][160][160][160]  ";
  31. 31 print"  [146][160][160][160][160][160][160]/                      +[160][160][146][160][160][160][160]  ";
  32. 32 print"  [146][160][160][160][160][160]"z$"<[144]                        "z$">[144][160][146][160][160][160][160]  ";
  33. 33 print"  [146][160][160][160][160]"z$"<[144]                          "z$">[144][146][160][160][160][160]  ";
  34. 34 print" /                                    + ";
  35. 35 printd$b$d$i$(dl(cl,t))tab(g+h)""d$(cd*-(cu=g))"[150]";
  36. 36 printtab(39-len(t$(dl(cl,u))))t$(dl(cl,u));:sysrl:return
  37. 37 print"[146]  ":forx=.to20:print"  ":next:return
  38. 38 print"[146]":forx=.to10:printtab(8)"  ":next:return
  39. 39 print"[146]";tab(13)" [157]";:forx=.tof:print" [157]";:next:return
  40. 40 print"";tab(16)" [157] [157] ":return
  41. 41 print"[146]":forx=.to21:printtab(39)chr$(20)chr$(32):next:return
  42. 42 print"[146]":forx=.to10:printtab(30)"  ":next:return
  43. 43 print"":forx=.to5:printtab(26)" ":next:return
  44. 44 print"[146]";tab(23)" [157] [157] ":return
  45. 45 print"[146]";:forx=.to17:printtab(6)w1$:next:return
  46. 46 print"[146]";:forx=.to9:printtab(12)w2$:next:return
  47. 47 print"[146]";:forx=.to5:printtab(15)w3$:next:return
  48. 48 print"[146]";:forx=.tot:printtab(17)w4$:next:return
  49. 49 return
  50. 50 print""tab(13)s1$;:return
  51. 51 print""tab(15)s2$;:return
  52. 52 print""tab(17)s3$;:return
  53. 53 print""tab(18)s4$;:return
  54. 54 print""tab(13)e1$:return
  55. 55 print""tab(15)e2$:return
  56. 56 print""tab(17)e3$:return
  57. 57 if(dl(cl,.)andb(f+h))=.then61
  58. 58 sb=peek(v+21):pokev+21,.:gosub273:gosub251:dl(cl,.)=(dl(cl,.)andg)
  59. 59 x=int(rnd(u)*10*(dl+u)):c$(1)="you take"+str$(x)+" hp damage!":aa=18:n=1
  60. 60 lf=lf-x:gosub257:gosub326:forx=.to2000:next:gosub288:pokev+21,sb
  61. 61 printd$tab(g+h)"move!";:cem=fnte(.):pokese,cem:gosub11:printz$;
  62. 62 fc=f:vl=fc:lv=cd-u+f*-(cd=u):rv=cd+u+f*(cd=f)
  63. 63 ebm=fncp(.):ifebm>.andebm<dethen65
  64. 64 fc=fc-u:on-(fc>-u)goto63:return
  65. 65 el=fncp(lv):er=fncp(rv):ifdl(ebm,.)then67
  66. 66 gosub7:fc=fc-u:onu-(fc<.)goto63,71
  67. 67 ifdl(el,.)andfc<fthenonfc+ugosub37,38,39,40
  68. 68 ifdl(er,.)andfc<fthenonfc+ugosub41,42,43,44
  69. 69 ford=.toh:if(dl(ebm,.)andb(d))thenondgosub9,10,7:printz$;
  70. 70 print"[146]";:next:fc=fc-u:iffc>-uthen63
  71. 71 gosub72:csm=fnsw(.):pokev+24,(peek(v+24)and15)orcsm:pokev+21,el:return
  72. 72 iffcandvlthenvl=vl-u
  73. 73 d=191:pokefnmp(u),d:pokefnmp(t),d:pokefnmp(h),d:pokefnmp(f+u),d
  74. 74 el=.:er=.:pokev+21,.:forx=vlto.step-u:fc=fncm(x):ifdl(fc,u)=.then78
  75. 75 fc=abs(dl(fc,u)-u):el=(elorsp(x+f))
  76. 76 mb=sp(x)-u:ford=utolen(sb$(x,fc)):pokefnmp(mb+d),asc(mid$(sb$(x,fc),d,u))
  77. 77 pokebc+sp(x)+d,cs(fc):next
  78. 78 next:sb=el:return
  79. 79 printchr$(147)chr$(8)chr$(142)"stand by....":gosub290:gosub298
  80. 80 dimdl(383,3),b(15),sp(7),sb$(3,12),d$(4),cs(12),l$(6),i(30),m(24),mh(24)
  81. 81 dimcm$(14),t$(13),i$(30),c$(30),c(30),m$(44),lv(2,2),cz$(2),h(8),sm$(8)
  82. 82 dimts(24),u(26),v(26)
  83. 83 fc=.:cl=17:cd=2:vl=.:el=.:er=.:vs=.:lf=20:m=.:w=.005:z=.94:wl=17
  84. 84 tl=388:tgl=16:csm=.:cem=192:de=383:v=53248:sb=.:rl=828:se=648:sr=679
  85. 85 u=1:t=2:h=3:f=4:k=8:g=15:joy=56320:dl=.:dm=.:ar=.:cu=.:we=.
  86. 86 s=54272:bc=v+38:ss=.:sc=.:cc=55296:sz=959:i=.
  87. 87 d(1)=1:d(2)=16:d(3)=-1:d(4)=-16
  88. 88 h(.)=1:h(1)=10:h(2)=2:h(3)=2:h(4)=1:h(5)=7:h(6)=3:h(7)=13:h(8)=5
  89. 89 sp(.)=.:sp(1)=4:sp(2)=6:sp(3)=7:sp(4)=15:sp(5)=48:sp(6)=64:sp(7)=128
  90. 90 d$(.)="  ?  ":d$(1)="east ":d$(2)="south":d$(3)="west ":d$(4)="north"
  91. 91 sm$(.)="\\":forx=1to8:sm$(x)=chr$(32)+chr$(32):next:cr$=chr$(13)
  92. 92 forx=.to38:w$=w$+chr$(160):b$=b$+chr$(32):mb$=mb$+"*":next
  93. 93 d$="[155][146]":forx=.to23:d$=d$+"":next
  94. 94 w1$=left$(w$,28):w2$=left$(w$,16):w3$=left$(w$,10):w4$=left$(w$,6)
  95. 95 s1$="[144])"+left$(w$,12)+"(":s2$="[144])"+left$(w$,8)+"("
  96. 96 s3$="[144])"+left$(w$,4)+"(":s4$="[144])"+left$(w$,2)+"("
  97. 97 e1$="[144]>"+left$(w$,12)+"<":e2$="[144]>"+left$(w$,8)+"<"
  98. 98 e3$="[144]>"+left$(w$,4)+"<":cz$(.)="[151]":cz$(1)="":cz$(2)="[149]"
  99. 99 i$(.)=left$(b$,15):t$(.)=left$(b$,13)
  100. 100 def fncp(x)=fc*d(cd)+(cl+d(x)):def fnsw(x)=(tgl-csm)
  101. 101 def fnte(x)=(tl-cem):def fncm(x)=x*d(cd)+cl:def fnmp(x)=cem*256+1016+x
  102. 102 deffnj(x)=(g-(xandg)):deffnc(x)=(lf<k)*-t+(lf>kandlf<g)*-(f+h)
  103. 103 deffncd(x)=cd+(cd=f+u)*f+(cd=.)*-f:deffnjf(x)=((jyand(g+u))=.)
  104. 104 deffnh(a)=(ar+i(ar)*t+lf/k)
  105. 105 forx=.to15:b(x)=2^x:next
  106. 106 forx=.tode:readd:dl(x,.)=d:next:forx=.to15:reada:pokev+x,a:next
  107. 107 forx=1to13:readt$(x):next:forx=.to24:reada:m(x)=a:next
  108. 108 forx=.to12:readcs(x):nextx:forx=.to24:readts(x):next
  109. 109 forx=.to6:fora=.to3:sb$(a,x)=chr$(32+x):nexta,x
  110. 110 forx=7to12:fora=.to3:readsb$(a,x):nexta,x
  111. 111 forx=.to1:sb$(x,.)=chr$(191)+chr$(32):next
  112. 112 forx=1to30:readi$(x):next:forx=1to14:readcm$(x):next
  113. 113 forx=.to2:fora=.to2:readlv(x,a):nexta,x:forx=1to44:readm$(x):next
  114. 114 j=1:ford=.tot:forx=.tok-u
  115. 115 a=int(rnd(u)*96+(d*128+16)):on-(dl(a,.)=.)goto115:dl(a,u)=m(j):m(j)=a
  116. 116 mh(j)=j*f*(d+u):j=j+u:next:next:forx=.to63:poke61376+x,.:next
  117. 117 ford=.tot:forx=.to10
  118. 118 a=int(rnd(u)*96+(d*128+16)):on-(dl(a,.)=.)goto118:dl(a,.)=dl(a,.)orb(7)
  119. 119 next:next
  120. 120 forx=.to26:a=2703*(2^((x-20)/12)):ifa>65535thena=65535
  121. 121 u(x)=int(a/b(k)):v(x)=a-u(x)*b(k):next
  122. 122 dl(wl,t)=u:dl(wl,h)=u:dl(wl+16,t)=10:dl(wl+16,h)=u
  123. 123 printchr$(147)chr$(14):pokev+21,.:pokev+23,127:pokev+29,15
  124. 124 pokev+17,peek(v+17)or64:gosub289:gosub61
  125. 125 ss=144:sc=148:gosub273
  126. 126 c$(u)=m$(31):bo$="[151]":mc$="":n=u:gosub254:gosub288:gosub319:it=it+1000
  127. 127 jy=peek(joy):j=fnj(jy):b=dl(cl,u):ifb>.thenifrnd(u)+b/50>zthengosub159
  128. 128 on-(rnd(u)>z)gosub5:on-(fnjf(j)andar>.)gosub163
  129. 129 ifjthenonjgosub138,146,8,149,8,8,8,150
  130. 130 pokev+k*f,fnc(.):lf=lf+w:on-(ti>it)gosub151:on-(lf>.)goto127
  131. 131 j=.:d=.:forx=uto100:poke63488+32*k+rnd(u)*k,rnd(u)*255+u:next
  132. 132 print"[144][147]":pokev+21,.:gosub327:forx=250to150step-u:syssr,.,240,x,.,17,1
  133. 133 next:forx=.to7:poke63488+32*k+x,.:next:x=.
  134. 134 pokev+17,peek(v+17)and191
  135. 135 c$(1)=m$(43+x):c$(2)="":c$(3)="     p l a y   a g a i n ?   "
  136. 136 bo$="":mc$="[150]":n=3:gosub256:gosub252:ifi=uthenpokes+24,.:run30
  137. 137 pokese,4:poke679,.:sys679
  138. 138 ifdl(cl+d(cd),.)=.thengosub326:return
  139. 139 cl=cl+d(cd):gosub57:return
  140. 140 on-(b>.)goto8:sb=peek(v+21):ss=144:sc=148:gosub273
  141. 141 gosub271:pokev+21,.:gosub274:ss=152:sc=156:gosub273
  142. 142 gosub271:gosub279:on-(i=g-u)goto145
  143. 143 onigosub180,185,193,194,195,196,202,210,224,232,235,243,248
  144. 144 ss=152:sc=156:gosub288:goto142
  145. 145 ss=144:sc=148:gosub288:pokev+21,sb:x=fre(.):gosub5:return
  146. 146 iffnjf(.)then140
  147. 147 ifdl(cl-d(cd),.)=.thengosub326:return
  148. 148 cl=cl-d(cd):gosub57:return
  149. 149 cd=cd-u:cd=fncd(.):gosub57:return
  150. 150 cd=cd+u:cd=fncd(.):gosub57:return
  151. 151 d=dl*k+u:j=d+k-u:forx=dtoj:on-(mh(x)=.)goto158:a=-u
  152. 152 ifcl<m(x)-kthena=m(x)+d(f)
  153. 153 ifcl>m(x)+kthena=m(x)+d(t)
  154. 154 ifcl>m(x)andcl<m(x)+kthena=m(x)+d(u)
  155. 155 ifcl<m(x)andcl>m(x)-kthena=m(x)+d(h)
  156. 156 ifa<.ora>dethen158
  157. 157 ifdl(a,.)anddl(a,u)=.thendl(a,u)=abs(dl(m(x),u)):dl(m(x),u)=.:m(x)=a
  158. 158 next:on-(dl(cl,u)>.)gosub317:gosub73:pokev+21,el:it=ti+sz:return
  159. 159 ifcu=20thenreturn
  160. 160 ifwethenb=b*((g-we)/10)
  161. 161 lf=lf-b*t:gosub326:forx=.toh:waitv+17,128:pokev+34,h(x):pokev+35,h(x)
  162. 162 next:gosub289:pokev+k*f,fnc(.):return
  163. 163 on-(b=.orcu=20)goto8:e=cl:dm=fnh(.):x=.
  164. 164 on-(mh(x)=.)goto179:on-(e<>m(x))goto179:mh(x)=mh(x)-dm:gosub326
  165. 165 ford=ftok:waitv+17,128:pokev+34,h(d):pokev+35,h(d):next:gosub289
  166. 166 on-(mh(x)>.)goto179:mh(x)=.:dl(e,u)=.:m(.)=.
  167. 167 lv=.:a=-u
  168. 168 a=a+u:fc=e+d(a)*lv:iffc<.orfc>dethen171
  169. 169 ifdl(fc,.)=.ordl(fc,t)then171
  170. 170 dl(fc,t)=ts(x):dl(fc,h)=u+int(-(ts(x)<g)*rnd(u)*h):goto173
  171. 171 ifa=fthena=.:lv=lv+u
  172. 172 goto168
  173. 173 forx=.tog:ford=utof
  174. 174 pokebc+d,x:next:next:pokev+21,peek(v+21)and240
  175. 175 gosub323:lf=lf+b
  176. 176 x=26+rnd(u)*5:i(x)=i(x)+int(rnd(u)*50*b*(lv+u))
  177. 177 c$(1)="a "+m$(22+rnd(u)*h)+" "+m$(25+rnd(u)*h)+" of "+i$(x)+"."
  178. 178 bo$="[158]":mc$="":n=u:gosub273:gosub254:gosub288:gosub35:return
  179. 179 x=x+u:on-(x<25)goto164:return
  180. 180 ifdl(cl,t)=.thenc$(u)="nothing here!":n=u:bo$="[156]":mc$="":gosub254:return
  181. 181 ifdl(cl,t)>14then183
  182. 182 ifi(dl(cl,t))thenc$(u)="you have a "+i$(dl(cl,t)):n=u:gosub254:return
  183. 183 i(dl(cl,t))=i(dl(cl,t))+dl(cl,h):c$(u)=i$(dl(cl,t))+" taken!"
  184. 184 n=u:bo$="":dl(cl,t)=.:printd$i$(.);:gosub254:return
  185. 185 ifdl(cl,t)thenc$(u)="not enough room here.":n=u:bo$="[156]":mc$="":goto254
  186. 186 gosub258:ifx=-1thenreturn
  187. 187 gosub274:gosub279:dl(cl,t)=c(i):dl(cl,h)=i(c(i)):i(c(i))=.
  188. 188 c$(u)=i$(c(i))+" dropped.":n=u:bo$="":printd$i$(c(i));
  189. 189 ifar=c(i)thenar=.
  190. 190 ifcu=c(i)thencu=.
  191. 191 ifwe=c(i)thenwe=.
  192. 192 gosub254:return
  193. 193 gosub263:on-(n=.)goto253:gosub274:gosub279:ar=c(i):return
  194. 194 gosub267:on-(n=.)goto253:gosub274:gosub279:cu=c(i):return
  195. 195 gosub265:on-(n=.)goto253:gosub274:gosub279:we=c(i):return
  196. 196 if(dl(cl,.)andf)=.thenc$(u)=m$(29):bo$="":mc$="[158]":n=u:goto254
  197. 197 ifi(19)=.thenc$(u)=m$(30)+i$(19)+"!":bo$="[156]":mc$="[159]":n=u:goto254
  198. 198 ifi(17)=.thenc$(u)=m$(30)+i$(17)+"!":bo$="[156]":mc$="[151]":n=u:goto254
  199. 199 on-(cl<>wl)goto201:ifi(25)=.thenc$(u)=m$(42):bo$="[156]":mc$="":n=u:goto254
  200. 200 printchr$(147):gosub323:x=u:goto134
  201. 201 dl=dl-u:cl=cl-128:a=f:d=50:j=t:gosub321:goto206
  202. 202 if(dl(cl,.)andt)=.thenc$(u)=m$(28):bo$="":mc$="[158]":n=u:goto254
  203. 203 ifi(19)=.thenc$(u)=m$(30)+i$(19)+"!":bo$="[156]":mc$="[159]":n=u:goto254
  204. 204 ifi(17)=.thenc$(u)=m$(30)+i$(17)+"!":bo$="[156]":mc$="[151]":n=u:goto254
  205. 205 dl=dl+u:cl=cl+128:a=50:d=f:j=-t:gosub321
  206. 206 ss=144:sc=148:gosub288:z$=cz$(dl):gosub61:gosub289
  207. 207 gosub271:gosub273:gosub274
  208. 208 c$(u)=m$(31+dl):bo$="[151]":mc$="":n=u:aa=u:ss=152:sc=156:gosub273
  209. 209 gosub254:return
  210. 210 printd$b$d$"[158]"i$(ar)tab(17)"hp[158]"str$(int(lf))tab(39-len(i$(cu)))i$(cu);
  211. 211 ifwethenc$(u)=i$(we):bo$="[153]":mc$="":n=u:aa=19:gosub257
  212. 212 gosub258:ifx=-uthengosub35:return
  213. 213 onigoto214,214,217,217
  214. 214 gosub274:gosub279:bo$="":c$(u)="the "+i$(c(i))+" is of"
  215. 215 c$(t)=m$(18+i(c(i)))+" workmanship.":aa=k:n=t:lm=28:sm=20-lm/t
  216. 216 gosub274:gosub255:gosub35:return
  217. 217 gosub274:gosub279:ifc(i)=16then220
  218. 218 c$(u)="you have"+str$(i(c(i)))+" "+i$(c(i))+"."
  219. 219 n=u:bo$="":gosub254:gosub35:return
  220. 220 c$(u)="unrolling parchment...":n=u:bo$="[158]":mc$="[149]":gosub256
  221. 221 x=dl*128:j=u:fora=.to127step16:c$(j)="":ford=.tog
  222. 222 c$(j)=c$(j)+sm$(dl(x+a+d,.)andg):next:c$(j+u)=c$(j):j=j+t
  223. 223 next:n=j-u:bo$="[149]":mc$=cz$(dl):gosub254:gosub35:return
  224. 224 ifcu=.thenc$(u)="you are empty handed.":n=u:bo$="[155]":mc$="":goto254
  225. 225 ifcu<21thenc$(u)="nothing happens.":n=u:bo$="[151]":mc$="[155]":goto254
  226. 226 c$(u)=m$(15+(cu-21)):n=u:bo$="[158]":mc$="[150]":gosub256
  227. 227 ifcu=21anddl(cl+d(cd),.)=kthendl(cl+d(cd),.)=u
  228. 228 j=dl(cl+d(cd),u):ifcu=22and(j=korj=9orj=13)then238
  229. 229 ifcu=23thencu=.:i(23)=.:i(24)=u
  230. 230 ifcu=24theni(25)=u:i(24)=.:cu=.
  231. 231 gosub255:return
  232. 232 ifi(18)=.thenc$(u)=m$(34):bo$="[154]":mc$="[156]":n=u:gosub254:return
  233. 233 i(18)=i(18)-u:lf=lf+10:c$(u)="your body is flooded with strength":n=u
  234. 234 bo$="[154]":mc$="":gosub254:return
  235. 235 j=abs(dl(cl+d(cd),u)):ifj=.thenc$(u)=m$(35):mc$="[158]":n=u:gosub254:return
  236. 236 ifj<5orj=7thenc$(u)="the ignorant brute is silent.":n=u:bo$="[154]":goto254
  237. 237 iflf<b*10orj>11orrnd(u)<.8then240
  238. 238 c$(u)=chr$(34)+m$(14)+chr$(34):c$(t)="murmurs the "+t$(j)+"."
  239. 239 bo$="[156]":mc$="[158]":n=t:dl(cl+d(cd),u)=-j:gosub254:return
  240. 240 x=(rnd(u)*f):c$(u)=chr$(34)+"i'll "+m$(6+x)+"!!"+chr$(34)
  241. 241 x=(rnd(u)*f):c$(t)=m$(10+x)+" the "+t$(j)+"."
  242. 242 bo$="":mc$="":n=t:gosub254:return
  243. 243 a=.:forfc=.toh:ebm=fncp(.):ifebm<.orebm>dethen246
  244. 244 if(dl(ebm,.)andb(7))=.then246
  245. 245 dl(ebm,.)=dl(ebm,.)andg:gosub251:forx=.to2000:next:gosub288:a=a+u
  246. 246 next:ifa=.thenc$(u)="no traps ahead.":n=u:bo$="":mc$="":goto254
  247. 247 c$(u)="you avoid traps.":n=u:bo$="":mc$="":goto254
  248. 248 a=.:ford=utof:ondgosub263,265,267,269:ifnthena=a+u:gosub274
  249. 249 next:ifathengosub255:return
  250. 250 c$(u)="you are carrying nothing.":bo$="[154]":mc$="":n=u:goto254
  251. 251 c$(u)=m$(36+(rnd(u)*6))+"!!":n=u:bo$="[150]":mc$="[158]":gosub256:return
  252. 252 c$(1)="yea":c$(2)="nay":n=2:aa=18:gosub257:gosub279:return
  253. 253 c$(u)="you have nothing to "+cm$(i)+"!":bo$="[156]":mc$="":n=u
  254. 254 gosub256:gosub255:return
  255. 255 jy=peek(joy):j=fnj(jy):on-(fnjf(.))goto255:waitjoy,16,16:return
  256. 256 aa=11-(n/t)
  257. 257 lm=len(c$(u))+f:sm=20-(lm/t):gosub274:return
  258. 258 n=5:forx=uton:c$(x)=m$(x):c(x)=x:next:aa=u:sm=11:lm=18:bo$="[152]":mc$="[152]"
  259. 259 gosub274:gosub279:ifi=5thenx=-u:return
  260. 260 onigosub263,265,267,269
  261. 261 ifn=.thenc$(u)="you have no "+c$(i)+".":n=u:gosub254:x=-u:return
  262. 262 x=u:return
  263. 263 n=.:forx=utok+u:ifi(x)thenn=n+u:c$(n)=i$(x):c(n)=x
  264. 264 next:aa=u:sm=t:lm=18:bo$="[149]":mc$="[150]":return
  265. 265 n=.:forx=10to14:ifi(x)thenn=n+u:c$(n)=i$(x):c(n)=x
  266. 266 next:aa=14:sm=u:lm=18:bo$="[153]":mc$="":return
  267. 267 n=.:forx=15to24:ifi(x)thenn=n+u:c$(n)=i$(x):c(n)=x
  268. 268 next:aa=u:sm=21:lm=18:bo$="[151]":mc$="[152]":return
  269. 269 n=.:forx=25to30:ifi(x)thenn=n+u:c$(n)=i$(x):c(n)=x
  270. 270 next:aa=14:sm=22:lm=17:bo$="[158]":mc$="[156]":return
  271. 271 n=14:forx=uton:c$(x)=cm$(x):c(x)=x:next:aa=t:sm=12:lm=16
  272. 272 bo$="":mc$="[154]":return
  273. 273 sys901,cem*256,cem*256+sz,ss*b(k):sys901,cc,cc+sz,sc*b(k):return
  274. 274 printchr$(19);bo$;
  275. 275 fori=utoaa:print:next:printtab(sm)left$(mb$,lm):fori=uton+t
  276. 276 printtab(sm)"*"left$(b$,lm-t)"*":next:printtab(sm)left$(mb$,lm)
  277. 277 printchr$(19);mc$"":fori=utoaa:print:next
  278. 278 fori=uton:printtab(sm+t);"[146]";c$(i)::next:return
  279. 279 jy=peek(joy):j=fnj(jy):on-(fnjf(.))goto279:printchr$(19)
  280. 280 fori=utoaa:print:next:print:i=u
  281. 281 printtab(sm+t);"";c$(i)
  282. 282 jy=peek(joy):j=fnj(jy):iffnjf(.)thengosub322:return
  283. 283 ifj<>uandj<>tthen282
  284. 284 print"[145]";tab(sm+t);mc$;c$(i)
  285. 285 if(j=t)andi<ntheni=i+u:goto281
  286. 286 ifj=uandi>uthenprint"[145][145]";:i=i-u:goto281
  287. 287 print"[145]";:goto281
  288. 288 sys901,ss*b(k),ss*b(k)+sz,cem*256:sys901,sc*b(k),sc*b(k)+sz,cc:return
  289. 289 pokev+34,lv(dl,.):pokev+35,lv(dl,1):pokev+36,lv(dl,2):z$=cz$(dl):return
  290. 290 poke56333,127:poke1,51:sys901,53248,55296,61440:sys901,53248,55296,63488
  291. 291 poke1,55:poke56333,129
  292. 292 gosub296:forx=.to7:reada:poke61440+87*8+x,a:next
  293. 293 poke56578,peek(56578)or3:poke56576,peek(56576)and252
  294. 294 poke53272,(peek(53272)and15):poke648,196:printchr$(147):poke648,192
  295. 295 poke53272,(peek(53272)and240)or12:return
  296. 296 reada:ifa=-1thenreturn
  297. 297 forx=.to7:readd:poke63488+a*8+x,d:next:goto296
  298. 298 print"[147][146]  a h o y !  m a g a z i n e  [151]presents"
  299. 299 printtab(5)"[176][195][195][195][195][174][176][195][195][195][174][176][195][195][195][195][174][176][195][195][195][174]"spc(6)"[152][169][151][167]"
  300. 300 printtab(5)"[155][173][195][174][176][195][189][194][176][195][174][194][194][176][174][176][174][194][194][176][195][174][194] [151][207][183][183][183][208][152] [151][167]"
  301. 301 printtab(7)"[152][194][194]  [194][194] [194][194][194][194][173][189][194][194][194][173][195][189][194] [151][180][215][215] [151][170][152] [151][167]"
  302. 302 printtab(7)"[152][194][194]  [194][194] [194][194][194][194]  [194][194][194][176][195][174][194] [151][180]   [170][152] [151][167]"
  303. 303 printtab(7)"[194][194]  [194][173][195][189][194][194][194]  [194][194][194][173][195][189][194] [180]   [170][152][160][151][167]"
  304. 304 printtab(7)"[173][189]  [173][195][195][195][189][173][189]  [173][189][173][195][195][195][189] [204][175][175][175][186][152][160][151][167]"
  305. 305 printtab(17)" [185] [165][185][185][146]"spc(10)"[152][223][151][167]":printtab(17)" [183] [165][162][146][190]"
  306. 306 printtab(5)"[176][174] [176][174][176][195][195][195][174][176][195][195][195][174][176][195][195][195][174][176][195][195][195][174][176][195][195][195][174]"
  307. 307 printtab(5)"[155][194][194] [194][194][194][176][195][174][194][194][176][195][174][194][194][176][195][174][194][194][176][195][174][194][194][176][195][174][194]"
  308. 308 printtab(5)"[152][194][173][195][189][194][194][194] [194][194][194][173][195][189][194][194][173][195][189][194][194][194] [194][194][194][173][195][189][194]"
  309. 309 printtab(5)"[194][176][195][174][194][194][194] [194][194][194][176][195][174][212][194][176][195][174][212][194][194] [194][194][194][176][195][174][212]"
  310. 310 printtab(5)"[151][194][194] [194][194][194][194] [194][194][194][194] [194][194][194][194] [194][194][194][194] [194][194][194][194] [194][194]"
  311. 311 printtab(5)"[194][194] [194][194][194][173][195][189][194][194][194] [194][194][194][194] [194][194][194][173][195][189][194][194][194] [194][194]"
  312. 312 printtab(5)"[173][189] [173][189][173][195][195][195][189][173][189] [173][189][173][189] [173][189][173][195][195][195][189][173][189] [173][189]"
  313. 313 printtab(4)"[149]the ultimate 3-d [149]adventure game!"
  314. 314 printtab(10)"[152]joystick [149]in port two"
  315. 315 printtab(5)"(c)1988 [152]cleveland m. blakemore"
  316. 316 printtab(6)"[154]*** special disk edition ***":return
  317. 317 gosub327:pokes+5,k:pokes+6,255:pokes+f,23:a=k:d=f:forx=uto30:pokes+u,a
  318. 318 pokes+g,d:d=d*1.01:a=a+u:next:pokes+6,g:gosub319:gosub35:return
  319. 319 gosub327:pokes+12,f:pokes+19,f:pokes+13,241
  320. 320 pokes+20,241:pokes+11,17:pokes+18,17:gosub5:return
  321. 321 forx=atodstepj:syssr,.,240,x,.,17,15:next:gosub319:return
  322. 322 syssr,.,240,34,75,17,5:gosub319:return
  323. 323 a$="251331421502421502":forx=utolen(a$)steph
  324. 324 syssr,.,240,val(mid$(a$,x,t)),.,33,10*val(mid$(a$,x+t,u)):next
  325. 325 gosub319:return
  326. 326 syssr,.,240,f,f,129,f:gosub319:return
  327. 327 pokes+24,.:forrv=.to24:pokes+rv,.:pokes+24,g:next:return
  328. 328 data32,253,174,32,138,173,32,247
  329. 329 data183,132,193,133,194,32,253,174
  330. 330 data32,138,173,32,247,183,132,195
  331. 331 data133,196,32,253,174,32,138,173
  332. 332 data32,247,183,160,,177,193,145
  333. 333 data20,165,194,197,196,208,6,165
  334. 334 data193,197,195,240,15,230,20,208
  335. 335 data2,230,21,230,193,208,2,230
  336. 336 data194,152,240,225,96,234
  337. 337 data162,25,181,217,9,128,149,217,202,16,247,96
  338. 338 data32,230,2,169,15,141,24,212,32,241,183,142,5,212,32,241,183,142
  339. 339 data6,212,32,241,183,142,1,212,32,241,183,142,,212,32,241,183,142
  340. 340 data4,212,32,241,183,134,2,162,10,160,255,136,208,253,202,208,248,198
  341. 341 data2,165,2,208,240,32,230,2,96,160,24,169,,153,24,212,136,208,250,96,0
  342. 342 data0,,,,248,240,232,216,184
  343. 343 data1,56,56,44,76,254,134,199,
  344. 344 data2,252,102,102,124,102,102,252,
  345. 345 data3,63,99,97,96,96,99,62,
  346. 346 data4,252,102,99,99,99,102,252,
  347. 347 data5,127,49,48,62,48,49,127,
  348. 348 data6,254,102,98,120,96,96,240,
  349. 349 data7,126,198,192,223,198,198,126,
  350. 350 data8,231,99,99,127,99,99,231,
  351. 351 data9,126,24,24,24,24,24,126,
  352. 352 data10,15,6,6,102,198,198,124,
  353. 353 data11,247,100,104,120,108,102,247,
  354. 354 data12,240,96,96,96,98,102,254,
  355. 355 data13,195,119,91,91,91,75,227,
  356. 356 data14,231,114,90,90,78,70,227,
  357. 357 data15,60,102,66,66,66,102,60,
  358. 358 data16,252,102,102,124,96,96,240,
  359. 359 data17,60,102,195,195,195,102,60,79
  360. 360 data18,252,102,102,124,108,102,247,
  361. 361 data19,62,98,112,60,14,70,124,
  362. 362 data20,255,153,24,24,24,24,60,
  363. 363 data21,247,98,98,98,98,98,60,
  364. 364 data22,247,98,98,98,52,52,24,
  365. 365 data23,201,201,221,221,221,110,102,
  366. 366 data24,227,98,52,24,44,70,231,
  367. 367 data25,247,98,52,24,24,24,60,
  368. 368 data26,126,70,12,24,48,98,126,
  369. 369 :
  370. 370 data28,255,165,165,165,255,165,165,255
  371. 371 data30,31,31,31,31,31,31,31,31
  372. 372 data31,248,248,248,248,248,248,248,248
  373. 373 data38,,,,31,15,23,27,29
  374. 374 data40,,128,192,224,240,248,252,254
  375. 375 data41,,1,3,7,15,31,63,127
  376. 376 data42,255,,255,255,255,255,,255
  377. 377 data43,128,64,32,16,8,4,2,1
  378. 378 data45,,,,255,255,255,255,255
  379. 379 data47,1,2,4,8,16,32,64,128
  380. 380 data60,255,254,252,248,240,224,192,128
  381. 381 data61,,,,,,,,255
  382. 382 data62,255,127,63,31,15,7,3,1,-1
  383. 383 data0,60,126,126,78,78,60,.
  384. 384 data .,,,,,,,,,,,,,,,.
  385. 385 data .,4,1,1,1,1,1,1,,1,1,,1,1,1,.
  386. 386 data .,1,,1,,1,,1,1,1,,,,,1,.
  387. 387 data .,1,,1,1,,1,,,1,1,,1,1,1,.
  388. 388 data .,1,1,1,,1,1,1,,1,,,1,,1,.
  389. 389 data .,,,1,,1,,1,,1,1,1,1,1,1,.
  390. 390 data .,1,1,1,1,1,,1,2,,1,,1,,1,.
  391. 391 data .,,,,,,,,,,,,,,,.
  392. 392 data .,,,,,,,,,,,,,,,.
  393. 393 data .,2,1,1,,1,1,1,1,1,,1,1,1,1,.
  394. 394 data .,,,1,,1,,1,,1,1,1,,,1,.
  395. 395 data .,1,1,1,,1,1,1,1,1,,1,1,1,1,.
  396. 396 data .,,,1,,1,,1,,1,,1,,1,,.
  397. 397 data .,1,1,1,1,1,,1,,1,1,1,,1,1,.
  398. 398 data .,1,,,1,,1,1,1,1,,1,,,2,.
  399. 399 data .,,,,,,,,,,,,,,,.
  400. 400 data .,,,,,,,,,,,,,,,.
  401. 401 data .,4,1,8,1,1,1,,1,,1,1,8,1,1,.
  402. 402 data .,1,,1,,,1,,1,,1,,8,,1,.
  403. 403 data .,1,,1,,,1,1,1,,8,,1,,1,.
  404. 404 data .,8,1,1,8,1,1,,1,1,1,,1,1,1,.
  405. 405 data .,1,,1,,,1,1,,1,,,1,,1,.
  406. 406 data .,1,,8,1,1,1,,,1,1,1,1,,4,.
  407. 407 data .,,,,,,,,,,,,,,,.
  408. 408 data160,194,160,152,137,110,185,110,170,170,170,129,172,150,172,160
  409. 409 datastirges,giant spider,constrictor,grave rat,drow elf,hobgoblin,fungus
  410. 410 datalich paladin,specter,revenant,wyvern,guardian naga,demon king
  411. 411 data 1,1,2,2,3,3,4,4,5,6,6,7,7,8,8,9,10,10,10,10,11,11,11,12,13
  412. 412 data 0,,5,9,11,2,5,,13,11,1,5,0
  413. 413 data 18,18,17,2,15,21,19,18,16,3,6,11,18,4,5,22,8,12,7,13,14,20,18,9,23
  414. 414 data "()","()","'","'","+,","+,","*","*","./","./","-","-"
  415. 415 data "12","12","0","0","4687","45","3","3","<=>?",":;","9","9"
  416. 416 data dagger,hand axe,lance,morning star,scimitar,broadsword
  417. 417 data war hammer,dragonslayer,excalibur,buckler,leather jerkin,chainmail
  418. 418 datairon plate,mithril plate,compass,scroll,steel hook,pints of elixir
  419. 419 data coil of rope,black cloak,mithril ring,holy symbol,lump of coal
  420. 420 data lump of iron,alchemy stone,gems,jewels,gold,silver,rare spices
  421. 421 data take,drop,left hand,right hand,armor,ascend,descend,examine,incant
  422. 422 data quaff,hail,search,inventory,exit menu
  423. 423 data 15,12,11,3,14,6,10,8,9
  424. 424 data weapon,armor,specific item,treasure,exit menu,knock you silly
  425. 425 data bash your brains in,grind you to dogmeat,tear you to ribbons
  426. 426 data growls,bellows,barks,roars,"pass by, knight errant"
  427. 427 data a spray of white light,a chorus of angelic voices
  428. 428 data it transforms in your hand!,a blast of sparks..check inventory
  429. 429 data common,good,excellent,precious,glittering,fabulous,cache,chest,crate
  430. 430 data no shaft leading down here,no shaft leading up here
  431. 431 data"you don't have the ",the catacombs,the sepulchre
  432. 432 data the barrow,you're out of healing elixir,your voice echoes emptily
  433. 433 data poison darts,tripwire,bear trap,spiked pitfall,trapdoor,snare noose
  434. 434 data you do not have the alchemy stone!,t h o u   a r t   s l a i n !
  435. 435 datathou hast conquered the tomb!
  436.