-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path12_Crazy_Kong.bc2
349 lines (348 loc) · 8.92 KB
/
12_Crazy_Kong.bc2
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
1000 A=500:GOTO20:REM KRAZY KONG
1010 GOTO8000:REM EXPLAIN+SCENERY
1200 REM
1210 REM ** PROC FILL(HP,VP,NC) **
1220 REM
1230 HO=HP:VE=VP:GOSUB110
1240 PRINT" ";:SD(HP,VP)=NC
1250 RETURN
1300 REM
1310 REM ** PROC FILL(HP,VP,MC) **
1320 REM
1330 IFHP<0 ORHP>38 THENHP=HP-JD
1340 HO=HP:VE=VP:GOSUB110
1350 PRINTMC$;:SD(HP,VP)=MC
1360 RETURN
1400 REM
1410 REM ** PROC FILL(HP,VP,DC) **
1420 REM
1430 HO=HP:VE=VP:GOSUB110
1440 PRINTDC$;:SD(HP,VP)=DC
1450 GOSUB250:REM BELL
1460 RETURN
1500 REM
1510 REM ** PROC FILL(HP,VP,LC) **
1520 REM
1530 HO=HP:VE=VP:GOSUB110
1540 PRINTLC$;:SD(HP,VP)=LC
1550 RETURN
1600 REM
1610 REM ** REMOVE PLUG AND COUNT **
1620 REM
1630 HO=HN:VE=VN:GOSUB110
1640 PRINT" ";:SD(HN,VN)=NC
1650 GOSUB250:REM BELL
1660 C=C+1:SC=SC+100
1670 IFC>7 THEN7030
1680 RETURN
1700 IFSD(HP,VP-1)=LC THENGOSUB1530
1710 RETURN
1750 IFSD(HP,VP+1)=LC THENGOSUB1530
1760 RETURN
2000 REM
2010 REM ** MOVEMENT-MAIN-PROGRAM **
2020 REM
2030 A1=SD(HP,VP+1):REM CHR UNDER MAN
2040 GOSUB200
2050 IFIN$<>LE$ THEN2550
2500 REM
2510 REM ** MOVE LEFT **
2520 REM
2530 MD=-1:REM MOVE DIRECTION
2540 GOTO2600
2550 IFIN$<>RI$ THEN2680
2560 REM
2570 REM ** MOVE RIGHT **
2580 REM
2590 MD=1:REM MOVE DIRECTION
2600 GOSUB1230:REM ERASE MAN
2610 GOSUB1700:REM CHECK LADDER UP
2620 GOSUB1750:REM CHECK LADDER DOWN
2630 IFSD(HP,VP+1)=PC THENVN=VP+1:HN=HP:GOSUB1630
2640 HP=HP+MD:REM MAN TO NEW POSITION
2650 IFHP<0 ORHP>38 THENHP=HP-MD
2660 GOTO3550
2670 REM
2680 IFIN$<>UP$ THEN3070
3000 REM
3010 REM ** MOVE UP **
3020 REM
3030 A0=SD(HP,VP-1)
3040 IFA0<>LC THEN5030
3050 GOSUB1530:VP=VP-1
3060 GOTO3550
3070 IFIN$<>DO$ THEN3580
3500 REM
3510 REM ** MOVE DOWN **
3520 REM
3530 IFA1<>LC THEN5030
3540 GOSUB1530:VP=VP+1
3550 GOSUB1340:REM PLACE MAN
3560 IFSD(HP,VP+1)=NC THEN6510
3570 GOTO5030
3580 IFIN$<>JR$ THEN4210
4000 REM
4010 REM ** >JUMP> **
4020 REM
4030 JD=1:REM JUMP-DIRECTION
4040 GOSUB1230:REM ERASE MAN
4050 GOSUB1750:REM CHECK LADDER DOWN
4060 GOSUB1700:REM CHECK LADDER UP
4070 HP=HP+JD:VP=VP-1:GOSUB1330:REM NEW MAN UR
4080 GOSUB1230:REM ERASE MAN
4090 GOSUB1700:REM CHECK LADDER UP
4100 HP=HP+JD:GOSUB1330:REM NEW MAN URR
4110 GOSUB1230:REM ERASE MAN
4120 GOSUB1700:REM CHECK LADDER UP
4130 HP=HP+JD:VP=VP+1:GOSUB1330:REM NEW MAN RRR
4140 VN=VP+1
4150 IFSD(HP,VN)=NC THEN6510
4160 HN=HP-3*JD
4170 IFSD(HN,VN)=PC THENGOSUB1630
4180 HN=HN+JD:IFHN<>HP THEN4170
4190 GOTO5030
4200 REM
4210 IFIN$<>JL$ THEN5030
4500 REM
4510 REM ** <JUMP< **
4520 REM
4530 JD=-1:GOTO4040
5000 REM
5010 REM ** FIREBALLS MOVE **
5020 REM
5030 FORFB=1 TO4
5040 GOSUB260:BM=2*INT(3*RV)-2
5050 HO=BH(FB):VE=BV(FB):GOSUB110:PRINT" ";
5060 SD(HO,VE)=NC:HO=HO+BM
5070 IFHO>BR(FB) THENHO=HO-BM
5080 IFHO<BL(FB) THENHO=HO-BM
5090 BH(FB)=HO
5100 GOSUB110:PRINTFC$;
5110 SD(HO,VE)=FC
5120 NEXTFB
5500 REM
5510 REM ** BONUS & SCORE **
5520 REM
5530 D=D-10
5540 HO=0:VE=0:GOSUB110
5550 PRINT"bonus: ";D;TAB(16);"score: "SC;
5560 PRINTTAB(29);"level: ";LE
5600 IFD<>0 THEN6030
5610 GOSUB1430:FORI=1 TO2000:NEXTI:GOTO6620
6000 REM
6010 REM ** F/BALL KILL CHECK **
6020 REM
6030 FB=1
6040 IFABS(BH(FB)-HP)>1 THEN6060
6050 IFABS(BV(FB)-VP)<2 THEN6080
6060 FB=FB+1:IFFB<5 THEN6040
6070 GOTO2030
6080 GOSUB1430:GOTO6560
6500 REM
6510 REM ** FALL AND DEATH THROUGH HOLE **
6520 REM
6530 GOSUB1230:REM ERASE
6540 VP=VP+1:GOSUB1430:REM DEAD MAN
6550 IFSD(HP,VP+1)=NC THEN6530
6560 FORI=1 TO300:NEXTI
6570 REM
6580 REM ** MAN DEAD ACTION **
6590 REM
6600 JM=JM-1
6610 IFJM>0 THEN8460:REM NEW LIFE
6620 VE=10:HO=15:GOSUB110:PRINT"game over"
6630 HO=10:GOSUB110:PRINT"Another game? (Y/N) ";
6640 GOSUB210
6650 IFIN$="y" ORIN$="Y" THENRUN
6660 IFIN$="n" ORIN$="N" THENGOSUB100:END
6670 GOTO6640
7000 REM
7010 REM ** RAFTERS FALL! **
7020 REM
7030 HO=10:FORVE=3 TO20
7040 GOSUB110:PRINT" ----------------- ";
7041 GOSUB110:PRINT" ";
7060 NEXTVE
7070 FORVE=21 TO22
7080 FORHO=11 TO27:GOSUB110:PRINTRF$;:NEXTHO
7090 NEXTVE:HO=11:GOSUB250
7100 GOSUB110:PRINT" xoox -KONG(RIP) ";
7110 REM ** CRASH SOUND **
7120 VE=6:HO=15:GOSUB110:PRINT"You WIN!!"
7130 VE=8:GOSUB110:PRINT"You have"
7140 VE=10:HO=13:GOSUB110:PRINT"conquered kong."
7150 VE=12:HO=12:GOSUB110:PRINT"isn't true love"
7160 VE=14:HO=14:GOSUB110:PRINT"wonderful?"
7170 VE=17:HO=12:GOSUB110:PRINT"Now try again.."
7180 SC=SC+D:LE=LE+1
7190 FORI=1 TO5000:NEXTI
7200 GOTO8460
8000 GOSUB100
8010 HO=12:VE=9:GOSUB110
8020 PRINT"CONQUER KONG"
8030 HO=9:VE=15:GOSUB110
8040 PRINT"(one moment please)"
8050 REM
8060 REM ** SETUP SYSTEM VARIABLES **
8070 REM
8080 DIMSD(39,23):REM SCREEN DUPLICATE
8090 DIMBH(4),BV(4),BL(4),BR(4):REM FIREBALLS
8100 REM
8110 REM ++++++++++++++++++++++++++++++
8120 REM
8130 REM ADAPT THE FOLLOWING LINES
8140 REM TO YOUR OWN COMPUTER !
8150 REM
8160 REM ++++++++++++++++++++++++++++++
8170 REM
8190 PC$="o":REM PLUG CHARACTER
8200 FC$="*":REM FIREBALL CHARACTER
8210 RF$="-":REM RAFTER CHARACTER
8220 LC$="H":REM LADDER CHARACTER
8230 MC$="#":REM JUMPMAN CHARACTER
8240 DC$="%":REM DEADMAN CHARACTER
8250 UP$="I":REM MOVE UP
8260 DO$="M":REM MOVE DOWN
8270 RI$="K":REM MOVE RIGHT
8280 LE$="J":REM MOVE LEFT
8290 JR$="S":REM JUMP RIGHT
8300 JL$="A":REM JUMP LEFT
8310 REM
8320 REM +++++++++++++++++++++++++++++
8330 REM
8340 JM=3:REM NUMBER OF LIVES
8350 SC=0:REM SCORE+BONUSSES
8360 LE=1:REM LEVEL
8370 NC=0:REM EMPTY CODE
8380 PC=1:REM PLUG CODE
8390 FC=2:REM FIREBALL CODE
8400 RF=4:REM RAFTER CODE
8410 LC=8:REM LADDER CODE
8420 MC=16:REM JUMPMAN CODE
8430 DC=32:REM DEAD CODE
8440 D=5000:REM BONUSES
8450 REM
8460 FORHO=0 TO38:FORVE=0 TO22:SD(HO,VE)=NC:NEXTVE
8470 GOSUB110:PRINTDC$;:NEXTHO
8480 C=0:REM # OF PLUGS GONE
8500 REM
8510 REM ** EXPLANATIONS **
8520 REM
8530 GOSUB100
8540 HO=12:VE=1:GOSUB110
8550 PRINT"KRAZY KONG"
8560 PRINT:PRINT" by Tim Boone, Southampton"
8570 PRINT:PRINT
8580 PRINT" The basic idea: you are on the fourth"
8590 PRINT:PRINT"screen of the arcade game. That is,you"
8600 PRINT:PRINT"are in the attic. Knock out the plugs"
8610 PRINT:PRINT"by walking or jumping over them."
8620 PRINT:PRINT"When you have knocked out all the plugs"
8630 PRINT:PRINT"watch what happens!"
8640 PRINT:PRINT"P.S.: Make sure that the fireballs don't"
8650 PRINT" come too close!"
8660 GOSUB200:IFIN$<>"" THEN8660
8670 PRINT:PRINT" Press <space> ";
8680 GOSUB210:GOSUB100
8690 PRINT:PRINT:PRINT" Keyboard Commands:"
8700 PRINT:PRINT" ";UP$;" = UP"
8710 PRINT:PRINT" ";DO$;" = DOWN"
8720 PRINT:PRINT" ";LE$;" = LEFT"
8730 PRINT:PRINT" ";RI$;" = RIGHT"
8740 PRINT:PRINT" ";JL$;" = JUMP LEFT"
8750 PRINT:PRINT" ";JR$;" = JUMP RIGHT"
8760 PRINT:PRINT
8770 PRINT" You score 100 for each plug removed"
8780 PRINT:PRINT" and win the bonus if you conquer KONG."
8790 PRINT:PRINT
8800 PRINT" Press <space> ";
9000 GOSUB210
9010 REM
9020 REM ** SCENERY **
9030 REM
9040 GOSUB100:RESTORE
9050 REM
9060 REM ** DRAW FLOORS **
9070 REM
9080 READNF
9090 FORI0=1 TONF
9100 READVE,HO,FT
9110 GOSUB110
9120 FORI1=HO TOFT
9130 PRINTRF$;:SD(I1,VE)=RF
9140 NEXTI1
9150 NEXTI0
9160 REM
9170 REM ** DRAW LADDERS **
9180 REM
9190 READNF
9200 FORI0=1 TONF
9210 READI1,HP
9220 FORVP=I1 TOI1-5 STEP-1
9230 GOSUB1530
9240 NEXTVP
9250 NEXTI0
9260 REM
9270 REM ** DRAW PLUGS **
9280 REM
9290 READNF
9300 FORI0=1 TONF
9310 READVE,HO
9320 GOSUB110:PRINTPC$;:SD(HO,VE)=PC
9330 NEXTI0
9340 REM
9350 REM ** PLACE FIREBALLS **
9360 REM
9370 READNF
9380 FORI0=1 TONF
9390 READBV(I0),BL(I0),BH(I0),BR(I0)
9400 NEXTI0
9410 REM
9420 HP=19:VP=22:GOSUB1340:REM PLACE MAN
9430 HO=0:VE=2:GOSUB110
9440 FORQ=JM TO1 STEP-1:PRINTMC$;:NEXTQ
9450 GOTO2030
9460 REM
10000 REM
10010 REM ** DATA FOR BUILDING **
10020 REM
10030 REM ** FLOORS **
10040 REM
10050 DATA 5
10060 DATA 3,6,32,8,4,34,13,2,36,18,0,38,23,0,38
10070 REM
10080 REM ** LADDERS **
10090 REM
10100 DATA 14
10110 DATA 22,0,22,19,22,38
10120 DATA 17,2,17,12,17,26,17,36
10130 DATA 12,4,12,19,12,34
10140 DATA 7,6,7,12,7,26,7,32
10150 REM
10160 REM ** PLUGS **
10170 REM
10180 DATA 8
10190 DATA 3,10,3,28,8,10,8,28,13,10,13,28,18,10,18,28
10200 REM
10210 REM ** FIREBALLS **
10220 REM
10230 DATA 4
10240 DATA 2,6,11,32, 7,4,31,34, 12,2,9,36, 17,0,22,38
10250 REM
30000 REM
30010 REM CONQUER KONG
30020 REM
30030 REM AN ARCADE-LIKE GAME
30040 REM
30050 REM ADAPTED FOR PERSONAL COMPUTER
30060 REM BY:
30070 REM
30080 REM
30090 REM TIM BOONE
30100 REM
30110 REM SOUTHAMPTON
30120 REM
30130 REM
30140 REM REVISED FOR BASICODE-2
30150 REM BY: J. HAUBRICH
30160 REM MARCH 1 1984