-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAKALABETH.BAS
415 lines (415 loc) · 37 KB
/
AKALABETH.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
1 REM ON ERROR GOTO 4
2 REM AKALABETH, PORT FROM GWBASIC BY NANOCHESS to AGON Light by Shawn Sijnstra 05-Jen-2024-
4 CLS
7 CLEAR:GOSUB 60000
9 LEVEL = 0: PA=0: IN=0 : PN$ = "": PX=0 : PY=0: VF=159*4: EN=0: LK=0: TA=0
10 PRINT TAB(10) " WELCOME TO AKALABETH, WORLD OF DOOM!"
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)
30 FOR X=0 TO 20:TE%(X,0)=1:TE%(0,X)=1:TE%(X,20)=1:TE%(20,X)=1:NEXT
35 PRINT TAB(23) " (PLEASE WAIT)";
40 FOR X=1 TO 19:FOR Y=1 TO 19:TE%(X,Y)=INT(RND(1)^5*4.5)
41 IF TE%(X,Y)=3 AND RND(1)>.5 THEN TE%(X,Y)=0
42 NEXT:PRINT ".";:NEXT
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
51 XX%(0)=139:YY%(0)=79
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)
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
54 PE%(0,0)=0:PE%(0,1)=279:PE%(0,2)=0:PE%(0,3)=159
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 ".";
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)
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
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
59 NEXT
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
61 FT%(X,4)=79+(YY%(X)*2+YY%(X+1))/3:FT%(X,5)=79+(YY%(X)+2*YY%(X+1))/3:NEXT
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
68 COLOR 3
70 GOSUB 100:GOTO 1000
90 FOR X=0 TO 9:FOR Y=0 TO 5:PRINT LD%(X,Y);" ";:NEXT:PRINT:NEXT:INPUT Q$
100 GOSUB 60900:FOR Y=-1 TO 1:FOR X=-1 TO 1
105 VDU 25,4,138*4;VF-75*4;25,5,142*4;VF-75*4;: VDU 25,4,140*4;VF-73*4;25,5,140*4;VF-77*4;
110 ZZ=TE%(TX+X,TY+Y):X1=65+(X+1)*50:Y1=(Y+1)*50
120 IF ZZ=2 THEN VDU 25,4,4*(X1+20);VF-4*(Y1+20);25,5,4*(X1+30);VF-4*(Y1+20);:VDU 25,5,4*(X1+30);VF-4*(Y1+30);:VDU 25,5,4*(X1+20);VF-4*(Y1+30);:VDU 25,5,4*(X1+20);VF-4*(Y1+20);
130 IF ZZ=3 THEN VDU 25,4,4*(X1+10);VF-4*(Y1+10);25,5,4*(X1+20);VF-4*(Y1+10);:VDU 25,5,4*(X1+20);VF-4*(Y1+40);:VDU 25,5,4*(X1+10);VF-4*(Y1+40);:VDU 25,5,4*(X1+10);VF-4*(Y1+30);:VDU 25,5,4*(X1+40);VF-4*(Y1+30);
135 IF ZZ=3 THEN VDU 25,5,4*(X1+40);VF-4*(Y1+40);:VDU 25,5,4*(X1+30);VF-4*(Y1+40);:VDU 25,5,4*(X1+30);VF-4*(Y1+10);:VDU 25,5,4*(X1+40);VF-4*(Y1+10);:VDU 25,5,4*(X1+40);VF-4*(Y1+20);:VDU 25,5,4*(X1+10);VF-4*(Y1+20);25,5,4*(X1+10);VF-4*(Y1+10);
140 IF ZZ=4 THEN VDU 25,4,4*(X1+20);VF-4*(Y1+20);25,5,4*(X1+30);VF-4*(Y1+30);:VDU 25,5,4*(X1+20);VF-4*(Y1+30);:VDU 25,5,4*(X1+30);VF-4*(Y1+20);
150 IF ZZ=5 THEN VDU 25,4,4*X1;VF-4*Y1;25,5,4*(X1+50);VF-4*Y1;:VDU 25,5,4*(X1+50);VF-4*(Y1+50);:VDU 25,5,4*X1;VF-4*(Y1+50);:VDU 25,5,4*X1;VF-4*Y1;:VDU 25,4,4*(X1+10);VF-4*(Y1+10);25,5,4*(X1+10);VF-4*(Y1+40);
155 IF ZZ=5 THEN VDU 25,5,4*(X1+40);VF-4*(Y1+40);:VDU 25,5,4*(X1+40);VF-4*(Y1+10);:VDU 25,5,4*(X1+10);VF-4*(Y1+10);:VDU 25,5,4*(X1+40);VF-4*(Y1+40);:VDU 25,4,4*(X1+10);VF-4*(Y1+40);25,5,4*(X1+40);VF-4*(Y1+10);
160 IF ZZ=1 THEN VDU 25,4,4*(X1+10);VF-4*(Y1+50);25,5,4*(X1+10);VF-4*(Y1+40);25,5,4*(X1+20);VF-4*(Y1+30);25,5,4*(X1+40);VF-4*(Y1+30);25,5,4*(X1+40);VF-4*(Y1+50);25,4,4*X1;VF-4*(Y1+10);25,5,4*(X1+10);VF-4*(Y1+10);
165 IF ZZ=1 THEN VDU 25,4,4*(X1+50);VF-4*(Y1+10);25,5,4*(X1+40);VF-4*(Y1+10);25,4,4*X1;VF-4*(Y1+40);25,5,4*(X1+10);VF-4*(Y1+40);:VDU 25,4,4*(X1+40);VF-4*(Y1+40);25,5,4*(X1+50);VF-4*(Y1+40);
170 IF ZZ=1 THEN VDU 25,4,4*(X1+10);VF-4*Y1;25,5,4*(X1+10);VF-4*(Y1+20);:VDU 25,5,4*(X1+20);VF-4*(Y1+20);:VDU 25,5,4*(X1+20);VF-4*(Y1+30);:VDU 25,5,4*(X1+30);VF-4*(Y1+30);:VDU 25,5,4*(X1+30);VF-4*(Y1+10);
175 IF ZZ=1 THEN VDU 25,5,4*(X1+40);VF-4*(Y1+10);:VDU 25,5,4*(X1+40);VF-4*Y1;
190 NEXT:NEXT:RETURN
200 GOSUB 60900:DI=0:COLOR 3
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)
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)
205 CE=INT(CE):LE=INT(LE):RI=INT(RI)
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)
208 IF DI=0 THEN 216
210 IF CE=1 OR CE=3 OR CE=4 THEN VDU 25,4,4*L1;VF-4*T1;25,5,4*R1;VF-4*T1;:VDU 25,5,4*R1;VF-4*B1;:VDU 25,5,4*L1;VF-4*B1;:VDU 25,5,4*L1;VF-4*T1;
212 IF CE=1 OR CE=3 THEN EN=1:GOTO 260
214 IF CE=4 THEN VDU 25,4,4*(CD%(DI,0));VF-4*(CD%(DI,3));:VDU 25,5,4*(CD%(DI,0));VF-4*(CD%(DI,2));:VDU 25,5,4*(CD%(DI,1));VF-4*(CD%(DI,2));:VDU 25,5,4*(CD%(DI,1));VF-4*(CD%(DI,3));:EN=1:GOTO 260
216 IF LE=1 OR LE=3 OR LE=4 THEN VDU 25,4,4*(L1);VF-4*(T1);:VDU 25,5,4*(L2);VF-4*(T2);:VDU 25,4,4*(L1);VF-4*(B1);:VDU 25,5,4*(L2);VF-4*(B2);
218 IF RI=1 OR RI=3 OR RI=4 THEN VDU 25,4,4*(R1);VF-4*(T1);:VDU 25,5,4*(R2);VF-4*(T2);:VDU 25,4,4*(R1);VF-4*(B1);:VDU 25,5,4*(R2);VF-4*(B2);
220 IF LE=4 AND DI>0 THEN VDU 25,4,4*(LD%(DI,0));VF-4*(LD%(DI,4));:VDU 25,5,4*(LD%(DI,0));VF-4*(LD%(DI,2));:VDU 25,5,4*(LD%(DI,1));VF-4*(LD%(DI,3));:VDU 25,5,4*(LD%(DI,1));VF-4*(LD%(DI,5));
222 IF LE=4 AND DI=0 THEN VDU 25,4,4*(0);VF-4*(LD%(DI,2)-3);:VDU 25,5,4*(LD%(DI,1));VF-4*(LD%(DI,3));:VDU 25,5,4*(LD%(DI,1));VF-4*(LD%(DI,5));
224 IF RI=4 AND DI>0 THEN VDU 25,4,4*(279-LD%(DI,0));VF-4*(LD%(DI,4));:VDU 25,5,4*(279-LD%(DI,0));VF-4*(LD%(DI,2));:VDU 25,5,4*(279-LD%(DI,1));VF-4*(LD%(DI,3));:VDU 25,5,4*(279-LD%(DI,1));VF-4*(LD%(DI,5));
226 IF RI=4 AND DI=0 THEN VDU 25,4,4*(279);VF-4*(LD%(DI,2)-3);:VDU 25,5,4*(279-LD%(DI,1));VF-4*(LD%(DI,3));:VDU 25,5,4*(279-LD%(DI,1));VF-4*(LD%(DI,5));
228 IF LE=3 OR LE=1 OR LE=4 THEN 234
230 IF DI<>0 THEN VDU 25,4,4*(L1);VF-4*(T1);:VDU 25,5,4*(L1);VF-4*(B1);
232 VDU 25,4,4*(L1);VF-4*(T2);:VDU 25,5,4*(L2);VF-4*(T2);:VDU 25,5,4*(L2);VF-4*(B2);:VDU 25,5,4*(L1);VF-4*(B2);
234 IF RI=3 OR RI=1 OR RI=4 THEN 240
236 IF DI<>0 THEN VDU 25,4,4*(R1);VF-4*(T1);:VDU 25,5,4*(R1);VF-4*(B1);
238 VDU 25,4,4*(R1);VF-4*(T2);:VDU 25,5,4*(R2);VF-4*(T2);:VDU 25,5,4*(R2);VF-4*(B2);:VDU 25,5,4*(R1);VF-4*(B2);
240 IF CE=7 OR CE=9 THEN VDU 25,4,4*(FT%(DI,0));VF-4*(FT%(DI,4));:VDU 25,5,4*(FT%(DI,2));VF-4*(FT%(DI,5));:VDU 25,5,4*(FT%(DI,3));VF-4*(FT%(DI,5));:VDU 25,5,4*(FT%(DI,1));VF-4*(FT%(DI,4));:VDU 25,5,4*(FT%(DI,0));VF-4*(FT%(DI,4));
242 IF CE=8 THEN VDU 25,4,4*(FT%(DI,0));VF-4*(158-FT%(DI,4));:VDU 25,5,4*(FT%(DI,2));VF-4*(158-FT%(DI,5));:VDU 25,5,4*(FT%(DI,3));VF-4*(158-FT%(DI,5));:VDU 25,5,4*(FT%(DI,1));VF-4*(158-FT%(DI,4));:VDU 25,5,4*(FT%(DI,0));VF-4*(158-FT%(DI,4));
244 IF CE=7 OR CE=8 THEN BA=LA%(DI,3):TP=LA%(DI,2):LX=LA%(DI,0):RX=LA%(DI,1):VDU 25,4,4*(LX);VF-4*(BA);:VDU 25,5,4*(LX);VF-4*(TP);:VDU 25,4,4*(RX);VF-4*(TP);:VDU 25,5,4*(RX);VF-4*(BA);
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:VDU 25,4,4*LX;VF-4*Y1;:VDU 25,5,4*RX;VF-4*Y1;:VDU 25,4,4*LX;VF-4*Y2;:VDU 25,5,4*RX;VF-4*Y2;
247 IF CE=7 OR CE=8 THEN VDU 25,4,4*LX;VF-4*Y3;:VDU 25,5,4*RX;VF-4*Y3;:VDU 25,4,4*LX;VF-4*Y4;:VDU 25,5,4*RX;VF-4*Y4;
248 IF DI>0 AND CE=5 THEN VDU 25,4,4*(139-10/DI);VF-4*(PE%(DI,3));:VDU 25,5,4*(139-10/DI);VF-4*(PE%(DI,3)-10/DI);:VDU 25,5,4*(139+10/DI);VF-4*(PE%(DI,3)-10/DI);:VDU 25,5,4*(139+10/DI);VF-4*(PE%(DI,3));:VDU 25,5,4*(139-10/DI);VF-4*(PE%(DI,3));
249 IF CE=5 AND DI>0 THEN COLOR 1:PRINT TAB(0,5) "CHEST!":COLOR 3
250 IF DI>0 AND CE=5 THEN VDU 25,4,4*(139-10/DI);VF-4*(PE%(DI,3)-10/DI);:VDU 25,5,4*(139-5/DI);VF-4*(PE%(DI,3)-15/DI);:VDU 25,5,4*(139+15/DI);VF-4*(PE%(DI,3)-15/DI);:VDU 25,5,4*(139+15/DI);VF-4*(PE%(DI,3)-5/DI);:VDU 25,5,4*(139+10/DI);VF-4*(PE%(DI,3));
252 IF DI>0 AND CE=5 THEN VDU 25,4,4*(139+10/DI);VF-4*(PE%(DI,3)-10/DI);:VDU 25,5,4*(139+15/DI);VF-4*(PE%(DI,3)-15/DI);
260 IF MC<1 THEN 490
265 B=79+YY%(DI):C=139
266 COLOR 1:IF MC=8 THEN PRINT TAB(0,6) "CHEST!";:GOSUB 60868:PRINT:COLOR 3:GOTO 269
267 PRINT TAB(0,6) M$(MC);:GOSUB 60868:PRINT:COLOR 3
269 IF DI=0 THEN 490
270 ON MC GOTO 300,310,320,330,340,350,360,370,380,390
280 GOTO 490
300 VDU 25,4,4*(C-23/DI);VF-4*B;25,5,4*(C-15/DI);VF-4*B;:VDU 25,5,4*(C-15/DI);VF-4*(B-15/DI);:VDU 25,5,4*(C-8/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-15/DI);:VDU 25,5,4*(C+15/DI);VF-4*B;
301 VDU 25,5,4*(C+23/DI);VF-4*B;:VDU 25,4,4*C;VF-4*(B-26/DI);25,5,4*C;VF-4*(B-65/DI);:VDU 25,4,4*(C-2/DI+.5);VF-4*(B-38/DI);25,5,4*(C+2/DI+.5);VF-4*(B-38/DI);:VDU 25,4,4*(C-3/DI+.5);VF-4*(B-45/DI);25,5,4*(C+3/DI+.5);VF-4*(B-45/DI);
302 VDU 25,4,4*(C-5/DI+.5);VF-4*(B-53/DI);25,5,4*(C+5/DI+.5);VF-4*(B-53/DI);:VDU 25,4,4*(C-23/DI);VF-4*(B-56/DI);25,5,4*(C-30/DI);VF-4*(B-53/DI);:VDU 25,5,4*(C-23/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C-23/DI);VF-4*(B-53/DI);
303 VDU 25,5,4*(C-8/DI);VF-4*(B-38/DI);:VDU 25,4,4*(C-15/DI);VF-4*(B-45/DI);25,5,4*(C-8/DI);VF-4*(B-60/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-60/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-45/DI);:VDU 25,4,4*(C+15/DI);VF-4*(B-42/DI);25,5,4*(C+15/DI);VF-4*(B-57/DI);
304 VDU 25,4,4*(C+12/DI);VF-4*(B-45/DI);25,5,4*(C+20/DI);VF-4*(B-45/DI);:VDU 25,4,4*C;VF-4*(B-75/DI);25,5,4*(C-5/DI+.5);VF-4*(B-80/DI);:VDU 25,5,4*(C-8/DI);VF-4*(B-75/DI);:VDU 25,5,4*(C-5/DI+.5);VF-4*(B-65/DI);
305 VDU 25,5,4*(C+5/DI+.5);VF-4*(B-65/DI);25,5,4*(C+5/DI+.5);VF-4*(B-68/DI);:VDU 25,5,4*(C-5/DI+.5);VF-4*(B-68/DI);:VDU 25,5,4*(C-5/DI+.5);VF-4*(B-65/DI);
306 VDU 25,5,4*(C+5/DI+.5);VF-4*(B-65/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-75/DI);:VDU 25,5,4*(C+5/DI+.5);VF-4*(B-80/DI);:VDU 25,5,4*(C-5/DI+.5);VF-4*(B-80/DI);:VDU 25,&45,4*(C-5/DI+.5);VF-4*(B-72/DI);:VDU 25,&45,4*(C+5/DI+.5);VF-4*(B-72/DI);
309 GOTO 490
310 VDU 25,4,4*C;VF-4*(B-56/DI);25,5,4*C;VF-4*(B-8/DI);:VDU 25,5,4*(C+10/DI);VF-4*B;:VDU 25,5,4*(C+30/DI);VF-4*B;:VDU 25,5,4*(C+30/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-64/DI);:VDU 25,5,4*C;VF-4*(B-56/DI);
311 VDU 25,5,4*(C-10/DI);VF-4*(B-64/DI);:VDU 25,5,4*(C-30/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C-30/DI);VF-4*B;:VDU 25,5,4*(C-10/DI);VF-4*B;:VDU 25,5,4*C;VF-4*(B-8/DI);
312 VDU 25,4,4*(C-10/DI);VF-4*(B-64/DI);25,5,4*(C-10/DI);VF-4*(B-75/DI);:VDU 25,5,4*C;VF-4*(B-83/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-75/DI);:VDU 25,5,4*C;VF-4*(B-79/DI);:VDU 25,5,4*(C-10/DI);VF-4*(B-75/DI);
313 VDU 25,5,4*C;VF-4*(B-60/DI);25,5,4*(C+10/DI);VF-4*(B-75/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-64/DI);
319 GOTO 490
320 VDU 25,4,4*(C+5/DI);VF-4*(B-30/DI);25,5,4*C;VF-4*(B-25/DI);:VDU 25,5,4*(C-5/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C-10/DI);VF-4*B;:VDU 25,5,4*(C+10/DI);VF-4*B;:VDU 25,5,4*(C+15/DI);VF-4*(B-5/DI);
321 VDU 25,5,4*(C+20/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C+10/DI);VF-4*B;:VDU 25,5,4*(C+15/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C+5/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-40/DI);
322 VDU 25,5,4*(C+3/DI+.5);VF-4*(B-35/DI);:VDU 25,5,4*(C-3/DI+.5);VF-4*(B-35/DI);:VDU 25,5,4*(C-10/DI);VF-4*(B-40/DI);:VDU 25,5,4*(C-5/DI);VF-4*(B-30/DI);
323 VDU 25,4,4*(C-5/DI);VF-4*(B-33/DI);25,5,4*(C-3/DI+.5);VF-4*(B-30/DI);:VDU 25,4,4*(C+5/DI);VF-4*(B-33/DI);25,5,4*(C+3/DI+.5);VF-4*(B-30/DI);:VDU 25,4,4*(C-5/DI);VF-4*(B-20/DI);25,5,4*(C-5/DI);VF-4*(B-15/DI);
324 VDU 25,4,4*(C+5/DI);VF-4*(B-20/DI);25,5,4*(C+5/DI);VF-4*(B-15/DI);:VDU 25,4,4*(C-7+DI);VF-4*(B-20/DI);25,5,4*(C-7/DI);VF-4*(B-15/DI);:VDU 25,4,4*(C+7/DI);VF-4*(B-20/DI);25,5,4*(C+7/DI);VF-4*(B-15/DI);
329 GOTO 490
330 VDU 25,4,4*C;VF-4*(B);25,5,4*(C-15/DI);VF-4*B;:VDU 25,5,4*(C-8/DI);VF-4*(B-8/DI);:VDU 25,5,4*(C-8/DI);VF-4*(B-15/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-23/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-15/DI);:VDU 25,5,4*(C-23/DI);VF-4*(B-23/DI);
331 VDU 25,5,4*(C-23/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-53/DI);:VDU 25,5,4*(C-8/DI);VF-4*(B-53/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-68/DI);:VDU 25,5,4*(C-8/DI);VF-4*(B-75/DI);:VDU 25,5,4*C;VF-4*(B-75/DI);
332 VDU 25,4,4*C;VF-4*(B);25,5,4*(C+15/DI);VF-4*B;:VDU 25,5,4*(C+8/DI);VF-4*(B-8/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-15/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-23/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-15/DI);:VDU 25,5,4*(C+23/DI);VF-4*(B-23/DI);
333 VDU 25,5,4*(C+23/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-53/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-53/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-68/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-75/DI);:VDU 25,5,4*C;VF-4*(B-75/DI);
334 VDU 25,4,4*(C-15/DI);VF-4*(B-68/DI);25,5,4*(C+15/DI);VF-4*(B-68/DI);:VDU 25,4,4*(C-8/DI);VF-4*(B-53/DI);25,5,4*(C+8/DI);VF-4*(B-53/DI);:VDU 25,4,4*(C-23/DI);VF-4*(B-15/DI);25,5,4*(C+8/DI);VF-4*(B-45/DI);
335 VDU 25,4,4*(C-8/DI);VF-4*(B-68/DI);25,5,4*C;VF-4*(B-60/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-68/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-60/DI);:VDU 25,5,4*(C-8/DI);VF-4*(B-60/DI);:VDU 25,5,4*(C-8/DI);VF-4*(B-68/DI);
336 VDU 25,4,4*C;VF-4*(B-38/DI);25,5,4*(C-8/DI);VF-4*(B-38/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-53/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-45/DI);:VDU 25,5,4*C;VF-4*(B-30/DI);:VDU 25,5,4*C;VF-4*(B-38/DI);
339 GOTO 490
340 VDU 25,4,4*(C-10/DI);VF-4*(B-15/DI);25,5,4*(C-10/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-20/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-15/DI);:VDU 25,5,4*(C-15/DI);VF-4*B;:VDU 25,5,4*(C+15/DI);VF-4*B;:VDU 25,5,4*(C+15/DI);VF-4*(B-15/DI);
341 VDU 25,5,4*(C-15/DI);VF-4*(B-15/DI);:VDU 25,4,4*(C-15/DI);VF-4*(B-10/DI);25,5,4*(C+15/DI);VF-4*(B-10/DI);:VDU 25,4,4*(C-15/DI);VF-4*(B-5/DI);25,5,4*(C+15/DI);VF-4*(B-5/DI);
342 VDU 25,4,4*C;VF-4*(B-15/DI);25,5,4*(C-5/DI);VF-4*(B-20/DI);:VDU 25,5,4*(C-5/DI);VF-4*(B-35/DI);:VDU 25,5,4*(C+5/DI);VF-4*(B-35/DI);:VDU 25,5,4*(C+5/DI);VF-4*(B-20/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-15/DI);
343 VDU 25,4,4*(C-5/DI);VF-4*(B-20/DI);25,5,4*(C+5/DI);VF-4*(B-20/DI);:VDU 25,4,4*(C-5/DI);VF-4*(B-25/DI);25,5,4*(C+5/DI);VF-4*(B-25/DI);:VDU 25,4,4*(C-5/DI);VF-4*(B-30/DI);25,5,4*(C+5/DI);VF-4*(B-30/DI);
344 VDU 25,4,4*(C-10/DI);VF-4*(B-35/DI);25,5,4*(C-10/DI);VF-4*(B-40/DI);:VDU 25,5,4*(C-5/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C+5/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-40/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-35/DI);
345 VDU 25,4,4*(C-10/DI);VF-4*(B-40/DI);25,5,4*C;VF-4*(B-45/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-40/DI);
346 VDU 25,4,4*(C-5/DI);VF-4*(B-40/DI);25,5,4*(C+5/DI);VF-4*(B-40/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-30/DI);:VDU 25,5,4*C;VF-4*(B-40/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C-5/DI+.5);VF-4*(B-40/DI);
349 GOTO 490
350 VDU 25,4,4*(C-20/DI);VF-4*(79-YY%(DI));25,5,4*(C-20/DI);VF-4*(B-88/DI);:VDU 25,5,4*(C-10/DI);VF-4*(B-83/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-83/DI);:VDU 25,5,4*(C+20/DI);VF-4*(B-88/DI);:VDU 25,5,4*(C+20/DI);VF-4*(79-YY%(DI));
351 VDU 25,5,4*(C-20/DI);VF-4*(79-YY%(DI));:VDU 25,4,4*(C-20/DI);VF-4*(B-88/DI);25,5,4*(C-30/DI);VF-4*(B-83/DI);:VDU 25,5,4*(C-30/DI);VF-4*(B-78/DI);:VDU 25,4,4*(C+20/DI);VF-4*(B-88/DI);25,5,4*(C+30/DI);VF-4*(B-83/DI);
352 VDU 25,5,4*(C+40/DI);VF-4*(B-83/DI);:VDU 25,4,4*(C-15/DI);VF-4*(B-86/DI);25,5,4*(C-20/DI);VF-4*(B-83/DI);:VDU 25,5,4*(C-20/DI);VF-4*(B-78/DI);:VDU 25,5,4*(C-30/DI);VF-4*(B-73/DI);:VDU 25,5,4*(C-30/DI);VF-4*(B-68/DI);
353 VDU 25,5,4*(C-20/DI);VF-4*(B-63/DI);:VDU 25,4,4*(C-10/DI);VF-4*(B-83/DI);25,5,4*(C-10/DI);VF-4*(B-58/DI);:VDU 25,5,4*C;VF-4*(B-50/DI);:VDU 25,4,4*(C+10/DI);VF-4*(B-83/DI);25,5,4*(C+10/DI);VF-4*(B-78/DI);:VDU 25,5,4*(C+20/DI);VF-4*(B-73/DI);
354 VDU 25,5,4*(C+20/DI);VF-4*(B-40/DI);:VDU 25,4,4*(C+15/DI);VF-4*(B-85/DI);25,5,4*(C+20/DI);VF-4*(B-78/DI);:VDU 25,5,4*(C+30/DI);VF-4*(B-76/DI);:VDU 25,5,4*(C+30/DI);VF-4*(B-60/DI);
355 VDU 25,4,4*C;VF-4*(B-83/DI);25,5,4*C;VF-4*(B-73/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-68/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-63/DI);:VDU 25,5,4*C;VF-4*(B-58/DI);
359 GOTO 490
360 VDU 25,4,4*(C+5/DI+.5);VF-4*(B-10/DI);25,5,4*(C-5/DI+.5);VF-4*(B-10/DI);:VDU 25,5,4*C;VF-4*(B-15/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-20/DI);:VDU 25,5,4*(C+5/DI+.5);VF-4*(B-15/DI);:VDU 25,5,4*(C+5/DI+.5);VF-4*(B-10/DI);
361 VDU 25,5,4*(C+7/DI+.5);VF-4*(B-6/DI);:VDU 25,5,4*(C+5/DI+.5);VF-4*(B-3/DI);:VDU 25,5,4*(C-5/DI+.5);VF-4*(B-3/DI);:VDU 25,5,4*(C-7/DI+.5);VF-4*(B-6/DI);:VDU 25,5,4*(C-5/DI+.5);VF-4*(B-10/DI);
362 VDU 25,4,4*(C+2/DI+.5);VF-4*(B-3/DI);25,5,4*(C+5/DI+.5);VF-4*(B);:VDU 25,5,4*(C+8/DI);VF-4*B;:VDU 25,4,4*(C-2/DI+.5);VF-4*(B-3/DI);25,5,4*(C-5/DI+.5);VF-4*(B);:VDU 25,5,4*(C-8/DI);VF-4*B;
363 VDU 25,&45,4*(C+3/DI+.5);VF-4*(B-8/DI);:VDU 25,&45,4*(C-3/DI+.5);VF-4*(B-8/DI);:VDU 25,4,4*(C+3/DI+.5);VF-4*(B-5/DI);25,5,4*(C-3/DI+.5);VF-4*(B-5/DI);
364 GOTO 490
370 VDU 25,4,4*(139-10/DI);VF-4*(PE%(DI,3));25,5,4*(139-10/DI);VF-4*(PE%(DI,3)-10/DI);:VDU 25,5,4*(139+10/DI);VF-4*(PE%(DI,3)-10/DI);:VDU 25,5,4*(139+10/DI);VF-4*(PE%(DI,3));:VDU 25,5,4*(139-10/DI);VF-4*(PE%(DI,3));
371 VDU 25,4,4*(139-10/DI);VF-4*(PE%(DI,3)-10/DI);25,5,4*(139-5/DI);VF-4*(PE%(DI,3)-15/DI);:VDU 25,5,4*(139+15/DI);VF-4*(PE%(DI,3)-15/DI);:VDU 25,5,4*(139+15/DI);VF-4*(PE%(DI,3)-5/DI);:VDU 25,5,4*(139+10/DI);VF-4*(PE%(DI,3));
372 VDU 25,4,4*(139+10/DI);VF-4*(PE%(DI,3)-10/DI);25,5,4*(139+15/DI);VF-4*(PE%(DI,3)-15/DI);
373 GOTO 490
380 VDU 25,4,4*(C-14/DI);VF-4*(B-46/DI);25,5,4*(C-12/DI);VF-4*(B-37/DI);:VDU 25,5,4*(C-20/DI);VF-4*(B-32/DI);:VDU 25,5,4*(C-30/DI);VF-4*(B-32/DI);:VDU 25,5,4*(C-22/DI);VF-4*(B-24/DI);:VDU 25,5,4*(C-40/DI);VF-4*(B-17/DI);
381 VDU 25,5,4*(C-40/DI);VF-4*(B-7/DI);:VDU 25,5,4*(C-38/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C-40/DI);VF-4*(B-3/DI);:VDU 25,5,4*(C-40/DI);VF-4*B;:VDU 25,5,4*(C-36/DI);VF-4*B;:VDU 25,5,4*(C-34/DI);VF-4*(B-2/DI);:VDU 25,5,4*(C-32/DI);VF-4*B;
382 VDU 25,5,4*(C-28/DI);VF-4*B;:VDU 25,5,4*(C-28/DI);VF-4*(B-3/DI);:VDU 25,5,4*(C-30/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C-28/DI);VF-4*(B-7/DI);:VDU 25,5,4*(C-28/DI);VF-4*(B-15/DI);:VDU 25,5,4*C;VF-4*(B-27/DI);
383 VDU 25,4,4*(C+14/DI);VF-4*(B-46/DI);25,5,4*(C+12/DI);VF-4*(B-37/DI);:VDU 25,5,4*(C+20/DI);VF-4*(B-32/DI);:VDU 25,5,4*(C+30/DI);VF-4*(B-32/DI);:VDU 25,5,4*(C+22/DI);VF-4*(B-24/DI);:VDU 25,5,4*(C+40/DI);VF-4*(B-17/DI);
383 VDU 25,5,4*(C+40/DI);VF-4*(B-7/DI);:VDU 25,5,4*(C+38/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C+40/DI);VF-4*(B-3/DI);:VDU 25,5,4*(C+40/DI);VF-4*B;:VDU 25,5,4*(C+36/DI);VF-4*B;:VDU 25,5,4*(C+34/DI);VF-4*(B-2/DI);:VDU 25,5,4*(C+32/DI);VF-4*B;
384 VDU 25,5,4*(C+28/DI);VF-4*B;:VDU 25,5,4*(C+28/DI);VF-4*(B-3/DI);:VDU 25,5,4*(C+30/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C+28/DI);VF-4*(B-7/DI);:VDU 25,5,4*(C+28/DI);VF-4*(B-15/DI);:VDU 25,5,4*C;VF-4*(B-27/DI);
385 VDU 25,4,4*(C+6/DI);VF-4*(B-48/DI);25,5,4*(C+38/DI);VF-4*(B-41/DI);:VDU 25,5,4*(C+40/DI);VF-4*(B-42/DI);:VDU 25,5,4*(C+18/DI);VF-4*(B-56/DI);:VDU 25,5,4*(C+12/DI);VF-4*(B-56/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-57/DI);
386 VDU 25,5,4*(C+8/DI);VF-4*(B-56/DI);:VDU 25,5,4*(C-8/DI);VF-4*(B-56/DI);:VDU 25,5,4*(C-10/DI);VF-4*(B-58/DI);:VDU 25,5,4*(C+14/DI);VF-4*(B-58/DI);:VDU 25,5,4*(C+16/DI);VF-4*(B-59/DI);:VDU 25,5,4*(C+8/DI);VF-4*(B-63/DI);
387 VDU 25,5,4*(C+6/DI);VF-4*(B-63/DI);:VDU 25,5,4*(C+2/DI+.5);VF-4*(B-70/DI);:VDU 25,5,4*(C+2/DI+.5);VF-4*(B-63/DI);:VDU 25,5,4*(C-2/DI+.5);VF-4*(B-63/DI);:VDU 25,5,4*(C-2/DI+.5);VF-4*(B-70/DI);:VDU 25,5,4*(C-6/DI);VF-4*(B-63/DI);
387 VDU 25,5,4*(C-8/DI);VF-4*(B-63/DI);:VDU 25,5,4*(C-16/DI);VF-4*(B-59/DI);:VDU 25,5,4*(C-14/DI);VF-4*(B-58/DI);:VDU 25,5,4*(C-10/DI);VF-4*(B-57/DI);:VDU 25,5,4*(C-12/DI);VF-4*(B-56/DI);:VDU 25,5,4*(C-18/DI);VF-4*(B-56/DI);
388 VDU 25,5,4*(C-36/DI);VF-4*(B-47/DI);
389 GOTO 3087
390 VDU 25,4,4*(C+6/DI);VF-4*(B-60/DI);25,5,4*(C+30/DI);VF-4*(B-90/DI);:VDU 25,5,4*(C+60/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C+60/DI);VF-4*(B-10/DI);:VDU 25,5,4*(C+30/DI);VF-4*(B-40/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-40/DI);
391 VDU 25,4,4*(C-6/DI);VF-4*(B-60/DI);25,5,4*(C-30/DI);VF-4*(B-90/DI);:VDU 25,5,4*(C-60/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C-60/DI);VF-4*(B-10/DI);:VDU 25,5,4*(C-30/DI);VF-4*(B-40/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-40/DI);
392 VDU 25,4,4*C;VF-4*(B-25/DI);25,5,4*(C+6/DI);VF-4*(B-25/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-20/DI);:VDU 25,5,4*(C+12/DI);VF-4*(B-10/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-6/DI);:VDU 25,5,4*(C+10/DI);VF-4*B;:VDU 25,5,4*(C+14/DI);VF-4*B;
393 VDU 25,5,4*(C+15/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C+16/DI);VF-4*B;:VDU 25,5,4*(C+20/DI);VF-4*B;
394 VDU 25,5,4*(C+20/DI);VF-4*(B-6/DI);:VDU 25,5,4*(C+18/DI);VF-4*(B-10/DI);:VDU 25,5,4*(C+18/DI);VF-4*(B-20/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C+15/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C+40/DI);VF-4*(B-60/DI);
395 VDU 25,5,4*(C+40/DI);VF-4*(B-70/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-55/DI);:VDU 25,5,4*(C+6/DI);VF-4*(B-60/DI);:VDU 25,5,4*(C+10/DI);VF-4*(B-74/DI);:VDU 25,5,4*(C+6/DI);VF-4*(B-80/DI);:VDU 25,5,4*(C+4/DI+.5);VF-4*(B-80/DI);
396 VDU 25,5,4*(C+3/DI+.5);VF-4*(B-82/DI);:VDU 25,5,4*(C+2/DI+.5);VF-4*(B-80/DI);:VDU 25,5,4*C;VF-4*(B-80/DI);:VDU 25,4,4*C;VF-4*(B-25/DI);25,5,4*(C-6/DI);VF-4*(B-25/DI);:VDU 25,5,4*(C-10/DI);VF-4*(B-20/DI);:VDU 25,5,4*(C-12/DI);VF-4*(B-10/DI);
397 VDU 25,5,4*(C-10/DI);VF-4*(B-6/DI);:VDU 25,5,4*(C-10/DI);VF-4*B;:VDU 25,5,4*(C-14/DI);VF-4*B;:VDU 25,5,4*(C-15/DI);VF-4*(B-5/DI);:VDU 25,5,4*(C-16/DI);VF-4*B;:VDU 25,5,4*(C-20/DI);VF-4*B;
398 VDU 25,5,4*(C-20/DI);VF-4*(B-6/DI);:VDU 25,5,4*(C-18/DI);VF-4*(B-10/DI);:VDU 25,5,4*(C-18/DI);VF-4*(B-20/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-30/DI);:VDU 25,5,4*(C-15/DI);VF-4*(B-45/DI);:VDU 25,5,4*(C-40/DI);VF-4*(B-60/DI);
399 VDU 25,5,4*(C-40/DI);VF-4*(B-70/DI);:VDU 25,5,4*(C-10/DI);VF-4*(B-55/DI);:VDU 25,5,4*(C-6/DI);VF-4*(B-60/DI);:VDU 25,5,4*(C-10/DI);VF-4*(B-74/DI);:VDU 25,5,4*(C-6/DI);VF-4*(B-80/DI);:VDU 25,5,4*(C-4/DI+.5);VF-4*(B-80/DI);
400 VDU 25,5,4*(C-3/DI+.5);VF-4*(B-82/DI);:VDU 25,5,4*(C-2/DI+.5);VF-4*(B-80/DI);:VDU 25,5,4*C;VF-4*(B-80/DI);:VDU 25,4,4*(C-6/DI);VF-4*(B-25/DI);25,5,4*C;VF-4*(B-6/DI);:VDU 25,5,4*(C+10/DI);VF-4*B;:VDU 25,5,4*(C+4/DI+.5);VF-4*(B-8/DI);
401 VDU 25,5,4*(C+6/DI);VF-4*(B-25/DI);:VDU 25,4,4*(C-40/DI);VF-4*(B-64/DI);25,5,4*(C-40/DI);VF-4*(B-90/DI);:VDU 25,5,4*(C-52/DI);VF-4*(B-80/DI);
402 VDU 25,5,4*(C-52/DI);VF-4*(B-40/DI);25,4,4*(C+40/DI);VF-4*(B-86/DI);25,5,4*(C+38/DI);VF-4*(B-92/DI);:VDU 25,5,4*(C+42/DI);VF-4*(B-92/DI);:VDU 25,5,4*(C+40/DI);VF-4*(B-86/DI);:VDU 25,5,4*(C+40/DI);VF-4*(B-50/DI)
403 VDU 25,4,4*(C+4/DI+.5);VF-4*(B-70/DI);25,5,4*(C+6/DI);VF-4*(B-74/DI);:VDU 25,4,4*(C-4/DI+.5);VF-4*(B-70/DI);25,5,4*(C-6/DI);VF-4*(B-74/DI);:VDU 25,4,4*C;VF-4*(B-64/DI);25,5,4*C;VF-4*(B-60/DI):GOTO 490
490 IF EN=1 THEN EN=0:RETURN
491 DI=DI+1:GOTO 202
500 REM RANDOMIZE ABS(LUCKN)-TX*10-TY*1000+IN*31.4
501 FOR X=1 TO 9:FOR Y=1 TO 9:DN%(X,Y)=0:NEXT:NEXT
510 FOR X=0 TO 10:DN%(X,0)=1:DN%(X,10)=1:DN%(0,X)=1:DN%(10,X)=1:NEXT
520 FOR X=2 TO 8 STEP 2:FOR Y=1 TO 9:DN%(X,Y)=1:DN%(Y,X)=1:NEXT:NEXT
530 FOR X=2 TO 8 STEP 2:FOR Y=1 TO 9 STEP 2
540 IF RND(1)>.95 THEN DN%(X,Y)=2
541 IF RND(1)>.95 THEN DN%(Y,X)=2
542 IF RND(1)>.6 THEN DN%(Y,X)=3
543 IF RND(1)>.6 THEN DN%(X,Y)=3
544 IF RND(1)>.6 THEN DN%(X,Y)=4
545 IF RND(1)>.6 THEN DN%(Y,X)=4
546 IF RND(1)>.97 THEN DN%(Y,X)=9
547 IF RND(1)>.97 THEN DN%(X,Y)=9
548 IF RND(1)>.94 THEN DN%(X,Y)=5
549 IF RND(1)>.94 THEN DN%(Y,X)=5
568 NEXT:NEXT
569 DN%(2,1)=0:IF IN/2=INT(IN/2) THEN DN%(7,3)=7:DN%(3,7)=8
570 IF IN/2<>INT(IN/2) THEN DN%(7,3)=8:DN%(3,7)=7
580 IF IN=1 THEN DN%(1,1)=8:DN%(7,3)=0
585 GOSUB 2000
590 RETURN
1000 GOSUB 60890:PRINT TAB(21,1) "COMMAND? ";:GOSUB 60868
1001 PRINT TAB(42,2)"MOVE=I/J/K/L";:PRINT TAB(42,3)"ENTER=ENTER WAIT=SPACE";:PRINT TAB(42,4)"ATTACK=A PAUSE=P";:PRINT TAB(30,1);
1002 X$=GET$
1003 X=ASC(X$)
1030 IF X$="I" OR X$="i" THEN ON SGN(IN)+1 GOTO 1100,1150: REM H - north
1040 IF X$="L" OR X$="l" THEN ON SGN(IN)+1 GOTO 1200,1250: REM M - east
1050 IF X$="J" OR X$="j" THEN ON SGN(IN)+1 GOTO 1300,1350: REM K - west
1060 IF X$="K" OR X$="k" THEN ON SGN(IN)+1 GOTO 1400,1450: REM P - south
1070 IF X=13 THEN ON SGN(IN)+1 GOTO 1500,1550 : REM CR - enter
1080 IF X$="A" OR X$="a" THEN ON SGN(IN)+1 GOTO 1600,1650 : REM A - attack
1081 IF X=32 THEN PRINT "PASS":GOTO 1090 : REM Space - pass
1085 IF X=83 OR X=115 THEN 1700: REM S - stats
1086 IF X=80 OR X=112 THEN IF PA=1 THEN PA=0:PRINT "PAUSE OFF":GOTO 1000
1087 IF X=80 OR X=112 THEN IF PA=0 THEN PA=1:PRINT "PAUSE ON":GOTO 1000
1089 PRINT "HUH?":GOTO 1000
1090 PW(0)=PW(0)-1+SGN(IN)*.9:IF PW(0)<0 THEN C(0)=0:PRINT:PRINT "YOU HAVE STARVED!!!!!":GOTO 1093
1091 PRINT TAB(0,2) "FOOD=";MID$(STR$(INT(PW(0)*10+.5)/10),1);:GOSUB 60868:PRINT TAB(0,3) "H.P.=";C(0);:GOSUB 60868:PRINT TAB(0,4)"GOLD=";C(5);:GOSUB 60868:PRINT TAB(0,1);
1092 PW(0)=INT(PW(0)*10)/10
1093 IF C(0)<=0 THEN 6000
1095 IF IN>0 THEN GOSUB 60890:GOSUB 60900:GOSUB 4000:IF C(0)<=0 THEN 1093
1096 PRINT TAB(0,2) "FOOD=";MID$(STR$(INT(PW(0)*10+.5)/10),1);:GOSUB 60868:PRINT TAB(0,3) "H.P.=";C(0);:GOSUB 60868:PRINT TAB(0,4)"GOLD=";C(5);:GOSUB 60868:PRINT TAB(0,1);
1097 IF IN=0 THEN GOSUB 100:GOTO 1000
1098 IF IN>0 THEN GOSUB 200:GOTO 1000
1100 PRINT "NORTH":IF TE%(TX,TY-1)=1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
1110 TY=TY-1:GOTO 1090
1150 IF DN%(PX+DX,PY+DY)<>1 AND DN%(PX+DX,PY+DY)<10 THEN PX=PX+DX:PY=PY+DY
1155 PRINT "FORWARD"
1160 IF DN%(PX,PY)=2 THEN PRINT "AAARRRGGGHHH!!! A TRAP!":C(0)=C(0)-INT(RND(1)*IN+3):MR=1:IN=IN+1:PRINT "FALLING TO LEVEL ";IN:GOSUB 500:GOSUB 60890:GOSUB 60900:GOTO 1090
1165 Z=0
1170 IF DN%(PX,PY)=5 THEN DN%(PX,PY)=0:PRINT "GOLD!!!!!":Z=INT(RND(1)*5*IN+IN):PRINT Z;"-PIECES OF EIGHT":C(5)=C(5)+Z
1175 IF Z>0 THEN Z=INT(RND(1)*6):PRINT "AND A ";W$(Z):PW(Z)=PW(Z)+1:GOTO 1090
1190 GOTO 1090
1200 PRINT "EAST":IF TE%(TX+1,TY)=1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
1210 TX=TX+1:GOTO 1090
1250 PRINT "TURN RIGHT"
1255 IF DX<>0 THEN DY=DX:DX=0:GOTO 1090
1260 DX=-DY:DY=0:GOTO 1090
1300 PRINT "WEST":IF TE%(TX-1,TY)=1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
1310 TX=TX-1:GOTO 1090
1350 PRINT "TURN LEFT"
1355 IF DX<>0 THEN DY=-DX:DX=0:GOTO 1090
1360 DX=DY:DY=0:GOTO 1090
1400 PRINT "SOUTH":IF TE%(TX,TY+1)=1 THEN PRINT "YOU CAN'T PASS THE MOUNTAINS":GOTO 1090
1410 TY=TY+1:GOTO 1090
1450 PRINT "TURN AROUND":DX=-DX:DY=-DY:GOTO 1090
1500 IF TE%(TX,TY)=3 THEN GOSUB 60080:GOSUB 60200:GOTO 1090
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
1515 IF TE%(TX,TY)=5 THEN 7000
1520 PRINT "HUH?":GOTO 1000
1550 IF DN%(PX,PY)<>7 AND DN%(PX,PY)<>9 THEN 1580
1555 PRINT "GO DOWN TO LEVEL ";IN+1
1560 IN=IN+1:GOSUB 500:MR=1:GOTO 1090
1580 IF DN%(PX,PY)<>8 THEN PRINT "HUH?":GOTO 1090
1581 IF IN=1 THEN PRINT "LEAVE DUNGEON":IN=0:GOTO 1586
1584 PRINT "GO UP TO LEVEL ";IN-1
1585 IN=IN-1:GOSUB 500:MR=1
1586 IF IN=0 THEN PRINT "THOU HAST GAINED":PRINT LK;" HIT POINTS":C(0)=C(0)+LK:LK=0
1587 GOTO 1090
1600 GOTO 1090
1650 MN=0:DA=0:PRINT TAB(30,1) "ATTACK":PRINT "WHICH WEAPON ";:Q$=GET$
1651 IF Q$="R" OR Q$="r" THEN DA=10:PRINT "RAPIER":IF PW(1)<1 THEN PRINT "NOT OWNED":GOTO 1650
1652 IF Q$="A" OR Q$="a" THEN DA=5:PRINT "AXE":IF PW(2)<1 THEN PRINT "NOT OWNED":GOTO 1650
1653 IF Q$="S" OR Q$="s" THEN DA=1:PRINT "SHIELD":IF PW(3)<1 THEN PRINT "NOT OWNED":GOTO 1650
1654 IF Q$="B" OR Q$="b" THEN DA=4:PRINT "BOW":IF PW(4)<1 THEN PRINT "NOT OWNED":GOTO 1650
1655 IF Q$="M" OR Q$="m" THEN PRINT "MAGIC AMULET":GOTO 1680
1656 IF (Q$="B" OR Q$="b") AND (PT$="M" OR PT$="m") THEN PRINT "MAGES CAN'T USE BOWS!":GOTO 1650
1657 IF (Q$="R" OR Q$="r") AND (PT$="M" OR PT$="m") THEN PRINT "MAGES CAN'T USE RAPIERS!":GOTO 1650
1659 IF DA=0 THEN PRINT "HANDS"
1660 IF DA=5 OR DA=4 THEN 1670
1661 MN=DN%(PX+DX,PY+DY)/10:MN=INT(MN)
1662 IF MN<1 OR C(2)-RND(1)*25<MN+IN THEN PRINT "YOU MISSED":GOTO 1668
1663 PRINT "HIT!!! ":DA=(RND(1)*DA+C(1)/5):MZ%(MN,1)=MZ%(MN,1)-DA
1664 PRINT:PRINT M$(MN);"'S HIT POINTS=";MZ%(MN,1)
1665 IF MZ%(MN,1)<1 THEN PRINT TAB(0,6)"THOU HAST KILLED A ";M$(MN):GOSUB 60868:PRINT "THOU SHALT RECEIVE ";:DA=INT(MN+IN):PRINT STR$(DA);" PIECES OF EIGHT":GOSUB 60868
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
1667 LK=LK+INT(MN*IN/2):IF MN=TA THEN TA=-TA
1668 IF PA=1 THEN PRINT "-CR- TO CONT. ";:Q$=GET$ ELSE GOSUB 60890
1669 GOSUB 60900:GOTO 1090
1670 IF DA=5 THEN PRINT "TO THROW OR SWING:";:Q$=GET$:IF Q$<>"T" THEN PRINT "SWING":GOTO 1661
1671 IF DA=5 THEN PRINT "THROW":PW(2)=PW(2)-1
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
1673 MN=DN%(PX+DX*Y,PY+DY*Y):MN=INT(MN/10):IF MN>0 THEN 1662
1674 NEXT:GOTO 1662
1680 IF PW(5)<1 THEN PRINT "NONE OWNED":GOTO 1650
1681 IF PT$="F" THEN Q=INT(RND(1)*4+1):GOTO 1685
1682 PRINT "1-LADDER-UP","2-LADDER-DN":PRINT "3-KILL","4-BAD??":PRINT "CHOICE ";:Q$=GET$:Q=VAL(Q$):PRINT Q:IF Q<1 OR Q>4 THEN 1682
1683 IF RND(1)>.75 THEN PRINT "LAST CHARGE ON THIS AMULET!":PW(5)=PW(5)-1
1685 ON Q GOTO 1686,1690,1691,1692
1686 PRINT "LADDER UP":DN%(PX,PY)=8:GOTO 1090
1690 PRINT "LADDER DOWN":DN%(PX,PY)=7:GOTO 1090
1691 PRINT "MAGIC ATTACK":DA=10+IN:GOTO 1672
1692 ON INT(RND(1)*3+1) GOTO 1693,1695,1697
1693 PRINT "YOU HAVE BEEN TURNED":PRINT "INTO A TOAD!"
1694 FOR Z2=1 TO 4:C(Z2)=3:NEXT Z2:GOTO 1090
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
1697 PRINT "BACKFIRE":C(0)=C(0)/2:GOTO 1090
1700 GOSUB 60080:PRINT "PRESS ENTER TO CONTINUE";:Q$=GET$:CLS:GOTO 1090
2000 NM=0:FOR X=1 TO 10
2005 MZ%(X,0)=0:MZ%(X,1)=X+3+IN
2010 IF X-2>IN OR RND(1)>.4 THEN 2090
2020 ML%(X,0)=INT(RND(1)*9+1):ML%(X,1)=INT(RND(1)*9+1)
2030 IF DN%(ML%(X,0),ML%(X,1))<>0 THEN 2020
2040 IF ML%(X,0)=PX AND ML%(X,1)=PY THEN 2020
2050 DN%(ML%(X,0),ML%(X,1))=X*10
2051 MZ%(X,0)=1
2052 NM=NM+1
2055 MZ%(X,1)=X*2+IN*4*LP
2090 NEXT:RETURN
3087 VDU 25,5,4*(C-36/DI);VF-4*(B-39/DI);:VDU 25,5,4*(C-28/DI);VF-4*(B-41/DI);:VDU 25,5,4*(C-28/DI);VF-4*(B-46/DI);:VDU 25,5,4*(C-20/DI);VF-4*(B-50/DI);:VDU 25,5,4*(C-18/DI);VF-4*(B-50/DI);:VDU 25,5,4*(C-14/DI);VF-4*(B-46/DI);
3088 VDU 25,4,4*(C-28/DI);VF-4*(B-41/DI);25,5,4*(C+30/DI);VF-4*(B-55/DI);:VDU 25,4,4*(C+28/DI);VF-4*(B-58/DI);25,5,4*(C+22/DI);VF-4*(B-56/DI);:VDU 25,5,4*(C+22/DI);VF-4*(B-53/DI);:VDU 25,5,4*(C+28/DI);VF-4*(B-52/DI);25,5,4*(C+34/DI);VF-4*(B-54/DI);
3089 VDU 25,5,4*(C+20/DI);VF-4*(B-50/DI);:VDU 25,5,4*(C+26/DI);VF-4*(B-47/DI);:VDU 25,4,4*(C+10/DI);VF-4*(B-58/DI);25,5,4*(C+10/DI);VF-4*(B-61/DI);:VDU 25,5,4*(C+4/DI);VF-4*(B-58/DI);:VDU 25,4,4*(C-10/DI);VF-4*(B-58/DI);25,5,4*(C-10/DI);VF-4*(B-61/DI);
3090 VDU 25,5,4*(C-4/DI);VF-4*(B-58/DI);:VDU 25,4,4*(C+40/DI);VF-4*(B-9/DI);25,5,4*(C+50/DI);VF-4*(B-12/DI);:VDU 25,5,4*(C+40/DI);VF-4*(B-7/DI);
3091 VDU 25,4,4*(C-8/DI);VF-4*(B-25/DI);25,5,4*(C+6/DI);VF-4*(B-7/DI);:VDU 25,5,4*(C+28/DI);VF-4*(B-7/DI);:VDU 25,5,4*(C+28/DI);VF-4*(B-9/DI);:VDU 25,5,4*(C+20/DI);VF-4*(B-9/DI);:VDU 25,5,4*(C+6/DI);VF-4*(B-25/DI);
3092 GOTO 490
4000 FOR MM=1 TO 10:IF MZ%(MM,0)=0 THEN 4999
4010 RA=SQR((PX-ML%(MM,0))^2+(PY-ML%(MM,1))^2)
4011 IF MZ%(MM,1)<IN*LP THEN 4030
4020 IF RA<1.3 THEN 4500
4025 IF MM=8 AND RA<3 THEN 4999
4030 X1=SGN(PX-ML%(MM,0)):Y1=SGN(PY-ML%(MM,1))
4031 IF MZ%(MM,1)<IN*LP THEN X1=-X1:Y1=-Y1
4035 IF Y1=0 THEN 4045
4040 D=DN%(ML%(MM,0),ML%(MM,1)+Y1):IF D=1 OR D>9 OR D=2 THEN 4045
4042 X1=0:GOTO 4050
4045 Y1=0:IF X1=0 THEN 4050
4046 D=DN%(ML%(MM,0)+X1,ML%(MM,1)):IF D=1 OR D>9 OR D=2 THEN X1=0:GOTO 4081
4050 DN%(ML%(MM,0),ML%(MM,1))=DN%(ML%(MM,0),ML%(MM,1))-10*MM
4055 IF ML%(MM,0)+X1=PX AND ML%(MM,1)+Y1=PY THEN 4999
4060 ML%(MM,0)=ML%(MM,0)+X1:ML%(MM,1)=ML%(MM,1)+Y1
4080 DN%(ML%(MM,0),ML%(MM,1))=DN%(ML%(MM,0),ML%(MM,1))+10*MM
4081 IF X1<>0 OR Y1<>0 THEN 4999
4082 IF MZ%(MM,1)<IN*LP AND RA<1.3 THEN 4500
4083 IF MZ%(MM,1)<IN*LP THEN MZ%(MM,1)=MZ%(MM,1)+MM+IN
4499 GOTO 4999
4500 IF MM=2 OR MM=7 THEN 4600
4502 PRINT TAB(0,6);: GOSUB 60868:PRINT TAB(0,7);: GOSUB 60868
4509 PRINT TAB(0,7) "YOU ARE BEING ATTACKED BY A ";M$(MM)
4510 IF RND(1)*20-SGN(PW(3))-C(3)+MM+IN<0 THEN PRINT "MISSED":GOTO 4525
4520 PRINT "HIT":C(0)=C(0)-INT(RND(1)*MM+IN)
4525 IF PA=1 THEN PRINT "-CR- TO CONT. ";:Q$=GET$ ELSE GOSUB 60890
4530 GOTO 4999
4600 IF RND(1)<.5 THEN 4509
4610 IF MM=7 THEN PW(0)=INT(PW(0)/2):PRINT "A GREMLIN STOLE SOME FOOD":GOTO 4525
4620 ZZ=INT(RND(1)*6):IF PW(ZZ)<1 THEN 4620
4630 PRINT "A THIEF STOLE A ";W$(ZZ):PW(ZZ)=PW(ZZ)-1:GOTO 4525
4999 NEXT:RETURN
6000 PRINT:PRINT:PRINT " WE MOURN THE PASSING OF"
6005 IF LEN(PN$)>22 THEN PN$=""
6010 IF PN$="" THEN PN$="THE PEASANT"
6020 PN$=PN$+" AND HIS COMPUTER"
6030 PRINT TAB(20-INT(LEN(PN$)/2))PN$
6035 PRINT " TO INVOKE A MIRACLE OF RESURRECTION"
6040 PRINT " PRESS THE R KEY";
6050 X$=GET$:IF X$="R" OR X$="r" THEN RUN
6060 GOTO 6050
7000 CLS
7010 IF PN$<>"" THEN 7500
7020 PRINT:PRINT:PRINT " WELCOME PEASANT INTO THE HALLS OF":PRINT "THE MIGHTY LORD BRITISH. HEREIN THOU MAY":PRINT "CHOOSE TO DARE BATTLE WITH THE EVIL":PRINT "CREATURES OF THE DEPTHS, FOR GREAT":PRINT "REWARD!"
7030 PRINT:PRINT "WHAT IS THY NAME PEASANT ";:INPUT PN$
7040 PRINT "DOEST THOU WISH FOR GRAND ADVENTURE ? ";:Q$=GET$:IF Q$<>"Y" THEN PRINT:PRINT "THEN LEAVE AND BEGONE!":PN$="":PRINT:PRINT " PRESS -SPACE TO CONT.";:Q$=GET$:GOTO 1090
7045 PRINT
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)
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!"
7070 PRINT:PRINT " PRESS -SPACE- TO CONT.";:Q$=GET$:FOR X=0 TO 5:C(X)=C(X)+1:NEXT:CLS:GOTO 1090
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$=GET$:CLS:GOTO 1090
7510 PRINT:PRINT:PRINT:PRINT "AAHH!!......";PN$:PRINT:PRINT "THOU HAST ACOMPLISHED THY QUEST!":IF ABS(TA)=10 THEN 7900
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$(TA)
7530 GOTO 7060
7900 CLS:PRINT:PRINT:PRINT:PN$="LORD "+PN$:PRINT " ";PN$;","
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..."
7920 IF LP=10 THEN 7950
7930 PRINT:PRINT " NOW MAYBE THOU ART FOOLHEARTY":PRINT "ENOUGH TO TRY DIFFICULTY LEVEL ";LP+1
7940 GOTO 7070
7950 PRINT:PRINT "...CALL CALIFORNIA PACIFIC COMPUTER":PRINT "AT (415)-569-9126 TO REPORT THIS":PRINT "AMAZING FEAT!"
7990 GOTO 7070
40000 REM Test Dungeon (By Shawn Sijnstra) - run after getting to main map
40010 CLS:EN=1:PRINT "GO DUNGEON":PRINT "PLEASE WAIT ":IN=1:GOSUB 500:DX=1:DY=0:PX=1:PY=1:GOTO 1090
50000 REM TEST MONSTERS (BY NANOCHESS)
50002 MC=1:DIM XX%(10),YY%(10)
50003 XX%(0)=139:YY%(0)=79
50004 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)
50005 C=160:B=120:DI=1:VF = 159*2
50010 CLS:EN=1:GOSUB 270
50020 A$=GET$
50025 MC=MC+1:IF MC<11 THEN 50005
50040 END
60000 VDU 22,4:CLS:INPUT TAB(0,5) "TYPE THY LUCKY NUMBER.....";Q$:LUCKN=VAL(Q$)
60005 CLS:INPUT TAB(0,5) "LEVEL OF PLAY(1-10)......";Q$:LP=INT(VAL(Q$))
60006 IF LP<1 OR LP>10 THEN 60005
60020 DATA "HIT POINTS.....","STRENGTH.......","DEXTERITY......","STAMINA........","WISDOM.........","GOLD..........."
60025 DIM PW(5)
60030 DIM C$(5):FOR X=0 TO 5:READ C$(X):NEXT
60040 DIM C(5)
60041 DIM M$(10),ML%(10,1),MZ%(10,1)
60042 DATA "SKELETON","THIEF","GIANT RAT","ORC","VIPER","CARRION CRAWLER","GREMLIN","MIMIC","DAEMON","BALROG"
60043 FOR X=1 TO 10:READ M$(X):NEXT
60050 FOR X=0 TO 5:C(X)=INT(SQR(RND(1))*21+4):NEXT X
60060 CLS:PRINT TAB(0,5);:FOR X=0 TO 5:PRINT C$(X);C(X):NEXT:PRINT:PRINT"SHALT THOU PLAY WITH THESE QUALITIES?";:Q$=GET$:IF Q$<>"Y" AND Q$<>"y" THEN 60050
60061 PRINT TAB(0,15):PRINT:PRINT "AND SHALT THOU BE A FIGHTER OR A MAGE?";:PT$=GET$
60062 IF PT$="M" OR PT$="F" THEN 60070
60063 GOTO 60061
60070 DATA "FOOD","RAPIER","AXE","SHIELD","BOW AND ARROWS","MAGIC AMULET"
60072 DIM W$(5):FOR X=0 TO 5:READ W$(X):NEXT
60075 GOSUB 60080:GOSUB 60200:RETURN
60080 CLS:PRINT:PRINT:PRINT " STAT'S WEAPONS":PRINT:
60081 FOR X=0 TO 5:PRINT C$(X);C(X);TAB(24);"0-";W$(X):NEXT
60082 PRINT TAB(18,11) "Q-QUIT"
60085 FOR Z=0 TO 5:PRINT TAB(25-LEN(STR$(PW(Z))),4+Z) STR$(PW(Z)):NEXT
60090 PRINT TAB(5,17) "PRICE";:PRINT TAB(15) "DAMAGE";:PRINT TAB(25) "ITEM"
60100 FOR X=0 TO 5:PRINT TAB(25,19+X);W$(X);:NEXT X
60110 PRINT TAB(5,19) "1 FOR 10";:PRINT TAB(15) "N/A":PRINT TAB(5,20)"8";:PRINT TAB(15) "1-10":PRINT TAB(5,21) "5";:PRINT TAB(15) "1-5"
60120 PRINT TAB(5,22) "6";:PRINT TAB(15) "1":PRINT TAB(5,23) "3";:PRINT TAB(15) "1-4":PRINT TAB(5,24) "15";:PRINT TAB(15) "?????";:PRINT TAB(1,1);
60130 RETURN
60200 PRINT TAB(1,13)"WELCOME TO THE ADVENTURE SHOP"
60210 GOSUB 60890:PRINT TAB(1,14) STRING$(120," "):PRINT TAB(1,14);
60211 PRINT "WHICH ITEM SHALT THOU BUY ";:Q$=GET$:IF Q$="Q" THEN PRINT:PRINT "BYE":GOSUB 60890:CLS:RETURN
60215 Z=-1
60220 IF Q$="F" THEN PRINT "FOOD":Z=0:P=1
60221 IF Q$="R" THEN PRINT "RAPIER":Z=1:P=8
60222 IF Q$="A" THEN PRINT "AXE":Z=2:P=5
60223 IF Q$="S" THEN PRINT "SHIELD":Z=3:P=6
60224 IF Q$="B" THEN PRINT "BOW":Z=4:P=3
60225 IF Q$="M" THEN PRINT "AMULET":Z=5:P=15
60226 IF Z=-1 THEN PRINT Q$:PRINT "I'M SORRY WE DON'T HAVE THAT.":GOTO 60210
60227 IF Q$="R" AND PT$="M" THEN PRINT "I'M SORRY MAGES":PRINT "CAN'T USE THAT!":GOTO 60210
60228 IF Q$="B" AND PT$="M" THEN PRINT "I'M SORRY MAGES":PRINT "CAN'T USE THAT!":GOTO 60210
60230 IF C(5)-P<0 THEN PRINT "M'LORD THOU CAN NOT AFFORD THAT ITEM.":GOTO 60210
60235 IF Z=0 THEN PW(Z)=PW(Z)+9
60236 PW(Z)=PW(Z)+1:C(5)=C(5)-P
60237 PRINT TAB(15,9) STR$(C(5));" ";
60240 PRINT TAB(25-LEN(STR$(PW(Z))),4+Z) STR$(PW(Z));
60250 GOTO 60210
60868 CY=VPOS:CX=POS:IF CX>=77 THEN RETURN ELSE PRINT STRING$(77-CX," ");:PRINT TAB(CX,CY);:RETURN
60890 X=INKEY(5):X=INKEY(50)
60893 RETURN
60900 VDU 25,&64,0;0;25,&67,319*4;159*4+48;:RETURN