home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_37_(10-1984).d64
/
supertank
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
7KB
|
173 lines
10 PRINT"[147]":RESTORE:V=53248:POKEV+32,0:POKEV+33,1:POKEV+17,PEEK(V+17)AND247
15 PRINTTAB(53)"W*E*L*C*O*M*E!":PRINTTAB(59)"TO"
17 PRINTTAB(55)"SUPERTANK!":PRINT
20 FORQ=1TO4:PRINTTAB(14)"[152][170]":NEXT
22 PRINTTAB(14)"[170][169] [223]":PRINTTAB(14)"[169] [209] [209] [209][209][209] [223][146][162][162][185][185][185][185][185][185][185][185][162][162][162]"
24 PRINTTAB(13)"[169] [209] [209] [205] [146][184][184][183][183][183][183][183][183][183][183][184][184][184]"
26 PRINTTAB(13)" [209][209][209] [209][209][209] [146]"
28 PRINT" [169] [223][146]"
30 PRINT" [169] [223][146]"
32 PRINT"[166][166][152] [146][166][166][166]"
34 PRINT"[166][166][166][152][205] [215][169] [223][146][215][169] [223][146][215][169] [223][146][215][169] [223][146][215][169] [223][146][215][169] [223][146][215][169] [223][146][215][206][166][166][166][166]"
36 PRINT"[166][166][166][166][152][205] [209] [146] [209] [146] [209] [146] [209] [146] [209] [146] [209] [146] [209] [146][206][166][166][166][166][166]"
38 PRINT"[166][166][166][166][166][152][205][223] [146][169][215][223] [146][169][215][223] [146][169][215][223] [146][169][215][223] [146][169][215][223] [146][169][215][223] [146][169][166][166][166][166][166][166]"
40 PRINT"[166][166][166][166][166][166][152][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][166][166][166][166][166][166][166]"
42 FORQ=1TO2:PRINT"[166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":NEXT
43 GOSUB800
48 S=54272:FORL=STOS+24:POKEL,0:NEXT
50 PRINT"[147]":POKEV+32,1:POKEV+33,0:PRINTTAB(120)
52 GOSUB1000
60 PRINT"[147]":PRINTTAB(90)"TANK SPECIFICATIONS"
62 PRINTTAB(49)" STRONG [146] [158] MEDIUM [146] WEAK [146]"
64 PRINTTAB(40)"1.TIGER[146] ARMOR [158]FIRE SPEED"
66 PRINTTAB(40)"[158]2.T-34[146] SPEED [158]ARMOR FIRE"
68 PRINTTAB(40)"3.SHERMAN[146] FIRE [158]SPEED ARMOR":PRINTTAB(120)
70 PRINT:INPUT" WHICH TANK DO YOU CHOOSE";TA
72 IFTA<1ORTA>3THEN80
78 PRINT" GET READY !":FORQ=1TO500STEP.5:NEXT:GOTO85
80 PRINT" YOU CAN'T DO THAT! ":GOSUB1300:GOTO70
85 V=53248:GOSUB1100
90 PRINT"[147]":POKEV+32,0:POKEV+33,1
92 PRINTTAB(7)"[152][169][223][146] [169][223][146] [169][223][146] [169][223][146] [144]SCORE"
94 PRINT" [152][169][223][146] [169] [146] [169] [223][146] [169] [223][146] [169] [223][146] [144]";SC
96 PRINT" [152][169] [223][169] [223][146] [223][146] [169] [146] [169] [223][146] [144]ARMOR"
98 PRINT"[152][169] [223][169] [223][169] [169] [223][146][144]";AR
100 FORQ=1TO17:PRINT"[166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":NEXT
110 PRINT"[152][171][195][195][195][195][195][195][195][195][195][179][169] [223][171][195][195][195][195][195][195][195][195][195][179]"
112 PRINT"[152][171][195][195][195][195][195][195][195][195][195][179] [171][195][195][195][195][195][195][195][195][195][179]"
114 GOSUB420
120 CB=1:TI$="000000"
150 POKEV+21,15:POKE2040,13:POKEV+39,0:POKEV,170:POKEV+1,150:Y=170:X=150:SH=0
151 POKE2042,193:POKEV+41,11:RF=0:UT=110:POKEV+42,0:POKE2043,195
152 POKE2041,14:POKEV+40,0:POKEV+2,X1:POKEV+3,Y1
180 S=NOTPEEK(56321)AND15:U=SAND1:D=SAND2:L=SAND4:R=SAND8:Y1=0:X1=0
182 POKEV+23,0:POKEV+29,0
185 IFUTHENX=X-M1:IFX<110THENX=X+M1
187 IFDTHENX=X+M1:IFX>180THENX=X-M1
189 IFRTHENY=Y+M1:IFY>245THENY=Y-M1
191 IFLTHENY=Y-M1:IFY<90THENY=Y+M1
200 POKEV,Y:POKEV+1,X
210 J=NOTPEEK(56321)AND16:IFJ=16THENGOSUB245
230 BO=BO+.5:GOSUB310:GOTO180
245 SH=SH+1:X1=X:MR=Y:HH=Y/2:GOSUB400
247 FORDD=DDTOHHSTEP5:POKEV+2,DD:POKEV+3,X1:GOSUB330:NEXT
250 POKE2041,15:FORDD=DDTOMRSTEP5:POKEV+2,DD:POKEV+3,X1:GOSUB330:NEXT
251 IF(PEEK(V+30)AND4)>0THENIF(PEEK(V+30)AND4)>0THENGOSUB253
252 X1=0:DD=0:Y1=0:POKEV+2,X1:POKEV+3,MR:POKE2041,14:RETURN
253 POKE2041,192:POKEV+23,2:POKEV+29,2
254 POKEV+3,X1-10:POKEV+2,DD-12:GOSUB410:GOSUB495
258 FORRE=1TO500:NEXT:POKEV+23,0:POKEV+29,0
260 X1=0:DD=0:Y1=0:POKEV+2,X1:POKEV+3,MR:POKE2041,14:RETURN
310 RF=RF+5:IFRF>215THEN350
315 POKEV+4,RF:POKEV+5,UT:RETURN
330 RF=RF+1.8:IFRF>215THENRF=0
333 IFRF=0THEN340
335 POKEV+4,RF:POKEV+5,UT:RETURN
340 RF=0:UT=110:RS=INT(RND(0)*60):UT=UT+RS:GOTO330
350 F1=RF:F2=UT:POKE2042,194:POKEV+6,F1:POKEV+7,F2:GOSUB400
355 FORQ=F2TO150STEP.4:POKEV+7,Q:NEXT:POKEV+29,8:POKEV+23,8:POKEV+6,F1-12
360 F2=150:FORQ=F2TO230STEP.6:POKEV+7,Q:NEXT:GOSUB410
390 POKEV+6,0:POKEV+7,0:POKEV+4,0:POKEV+5,0:RF=0:POKEV+23,0:POKEV+29,0
391 POKE2042,193:GOTO499
400 S=54272:FORL=STOS+24:POKEL,0:NEXT:POKES+5,9:POKES+6,16:POKES+24,15
405 POKES+4,129:POKES+1,34:POKES,75:RETURN
410 S=54272:FORL=STOS+24:POKEL,0:NEXT:POKES+5,11:POKES+6,16:POKES+24,15
415 POKES+4,129:POKES+1,54:POKES,111:RETURN
420 S=54272:FORL=STOS+24:POKEL,0:NEXT:POKES+5,11:POKES+6,56:POKES+24,15
425 POKES+4,129:POKES+1,51:POKES,97:RETURN
495 SC=SC+10:CB=0:RN=INT(RND(0)*15):CB=CB+RN:GOTO500
499 AR=AR-1
500 V=53248:PRINT"":POKEV+32,0:POKEV+33,CB
501 RF=0:UT=110:RS=INT(RND(0)*60):UT=UT+RS:RF=RF+1.5:
502 PRINTTAB(7)"[152][169][223][146] [169][223][146] [169][223][146] [169][223][146] [144]SCORE"
504 PRINT" [152][169][223][146] [169] [146] [169] [223][146] [169] [223][146] [169] [223][146] [144]";SC
506 PRINT" [152][169] [223][169] [223][146] [223][146] [169] [146] [169] [223][146] [144]ARMOR"
508 PRINT"[152][169] [223][169] [223][169] [169] [223][146][144]";AR
509 IFAR=0THEN549
510 RETURN
549 LL=18:BL=12:BB=15
550 PRINT"":POKEV+32,0:POKEV+33,1
558 FORQ=5TO7:PRINTTAB(Q)"[144][205]"SPC(10)"[205]":NEXT
560 PRINTTAB(7)"[144][206]"SPC(11)"[205]"SPC(4)"[206][205]"
561 PRINTTAB(6)"[206]"SPC(13)"[205]"SPC(2)"[206]"SPC(2)"[205]"
562 PRINTTAB(5)"[144][206]"SPC(15)"[144][205][206]"SPC(4)"[205]"
563 PRINTTAB(5)"[205]"SPC(21)"[206]"SPC(3)"[206][205]"
564 PRINTTAB(6)"[205]"SPC(6)"[206][205]"SPC(11)"[206]"SPC(3)"[206]"SPC(2)"[205]"
565 PRINTTAB(7)"[205]"SPC(4)"[206]"SPC(2)"[205]"SPC(10)"[205]"SPC(2)"[206]"SPC(4)"[205]"
566 PRINTTAB(8)"[205]"SPC(2)"[206]"SPC(4)"[205]"SPC(10)"[205][206]"SPC(6)"[205]"
567 PRINTTAB(9)"[205][206]"SPC(6)"[205]"SPC(17)"[206]"
568 PRINTTAB(18)"[205]"SPC(15)"[206]":FORLB=1TO6:PRINTTAB(LL)"[206]"SPC(14)"[206]":LL=LL-1:NEXT
570 FORQ=1TO5:PRINTTAB(BL)"[206]"SPC(BB)"[205]":BL=BL-1:BB=BB+2:NEXT
580 RESTORE:POKEV+23,0:POKEV+29,0:POKEV+21,0:GOSUB420:FORQ=1TO500STEP.1:NEXT
585 S=54272:FORL=STOS+24:POKEL,0:NEXT:GOSUB1200
588 V=53248: BO=BO/10:XX=INT(BO):SC=SC+XX:IFSC>HSTHENHS=SC
589 PRINT"[147]":POKEV+32,0:POKEV+33,1:POKE53281,1
590 PRINTTAB(85)"[149]B*O*N*U*S ";XX;SPC(3)"SHOTS FIRED";SH:PRINTTAB(45)"YOUR";
591 PRINT" SCORE";SC;SPC(3)"HIGH SCORE ";HS:PRINTTAB(49)"YOUR RANK IS [144]";B$
592 PRINTTAB(43)"[149]YOUR TOTAL SURVIVING TIME ";TI$
593 PRINTTAB(86)"WANT TO PLAY AGAIN? (Y/N)"
595 GETC$:IFC$=""THEN595
596 SC=0:B$="":IFC$="Y"THEN599
597 IFC$="N"THENSYS64738
598 C$="":GOTO595
599 SH=0:SC=0:BO=0:XX=0:POKEV+32,1:POKEV+33,0:GOTO60
800 S=54272:FORL=STOS+24:POKEL,0:NEXT:POKES+5,9:POKES+6,0:POKES+24,15
801 READHF,LF,DR:IFHF=-1THENRETURN
804 POKES+1,HF:POKES,LF:POKES+4,33:FORT=1TODR:NEXT:POKES+4,32:GOTO801
810 DATA18,209,1024,15,210,512,18,209,512,16,195,1024,14,24,512,11,48,512
811 DATA18,209,200,16,195,200,15,210,200,14,24,200,15,210,512,22,96,512
812 DATA16,195,1024,11,48,1024,15,210,512,14,24,200,12,143,200,11,48,200
813 DATA10,143,200,11,48,200,12,143,200,11,48,512,16,195,512,14,239,512
814 DATA11,48,512,15,210,200,15,210,200,14,24,200,12,143,200,11,48,200
815 DATA10,143,200,11,48,200,12,143,200,11,48,512,16,195,1024,22,96,512
816 DATA18,209,1024,15,210,512,18,209,512,16,195,1024,14,24,512,11,48,512
817 DATA18,209,200,16,195,200,15,210,200,14,24,200,15,210,512,22,96,512
818 DATA16,195,1024,11,48,1024,15,210,512,14,24,200,12,143,200,11,48,200
819 DATA10,143,200,11,48,200,12,143,200,11,48,512,16,195,512,14,239,512
820 DATA11,48,512,15,210,200,15,210,200,14,24,200,12,143,200,11,48,200
821 DATA10,143,200,11,48,200,12,143,200,11,48,512,11,48,1024,-1,0,0
900 DATA255,255,255,128,24,1,128,24,1,128,24,1,128,24,1,128,24,1,128,24,1
905 DATA128,24,1,128,36,1,128,66,1,255,129,255,128,66,1,128,36,1,128,24,1,128
910 DATA24,1,128,24,1,128,24,1,128,24,1,128,24,1,128,24,1,255,255,255
915 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,254,0,49,255,192,96,255
920 DATA240,196,127,252,206,127,255,206,127,255,196,127,252,96,255,240,49,255
925 DATA192,31,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
926 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,240,0,103,252,0,195,255
927 DATA0,219,255,192,195,255,0,103,252,0,63,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
928 DATA0,0,0,0,0,0,0,0
930 DATA0,0,2,34,128,4,0,64,2,146,128,16,0,16,10,73,32,64,0,4,17,140,96,64,0,4
935 DATA17,17,16,64,0,4,8,136,136,64,0,4,17,17,16,32,0,8,8,136,128,16,0,16,2,72
940 DATA128,4,0,64,0,0,0
945 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,64,0,0,64,0,0,64,0,0,126,0,0,255,255,0
947 DATA255,0,63,255,252,127,255,254,255,255,255,100,68,70,37,85,84,20,68,72
950 DATA15,255,240,0,0,0,0,0,0,0,0,0
955 DATA0,2,0,0,2,0,0,2,0,0,2,0,0,58,0,0,70,0,0,186,0,0,130,0,0,254,0,1,255,0
960 DATA3,255,128,7,255,192,0,124,0,15,187,224,8,186,32,15,187,224,8,130,32,15
965 DATA131,224,0,0,0,0,0,0,0,0,0
970 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,0,0,126,0,0,255,0,0,255,0,0
975 DATA126,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1000 FORA1=832TO894:READQ1:POKEA1,Q1:NEXT
1010 FORA2=896TO958:READQ2:POKEA2,Q2:NEXT
1015 FORA3=960TO1022:READQ3:POKEA3,Q3:NEXT
1020 FORA4=12288TO12350:READQ4:POKEA4,Q4:NEXT
1025 FORA5=12352TO12414:READQ5:POKEA5,Q5:NEXT
1030 FORA6=12416TO12478:READQ6:POKEA6,Q6:NEXT
1035 FORA7=12480TO12542:READQ7:POKEA7,Q7:NEXT
1090 RETURN
1100 IFTA=1THENAR=5:IFTA=1THENM1=1
1105 IFTA=2THENAR=3:IFTA=2THENM1=2
1110 IFTA=3THENAR=1:IFTA=3THENM1=3
1150 RETURN
1200 IFSC=0THENB$="TRAITOR"
1201 IFSC>0ANDSC<51THENB$="SOLDIER"
1202 IFSC>52ANDSC<101THENB$="SERGEANT"
1204 IFSC>101ANDSC<201THENB$="LIEUTENANT"
1206 IFSC>201ANDSC<401THENB$="CAPTAIN"
1208 IFSC>401ANDSC<601THENB$="MAJOR"
1210 IFSC>601ANDSC<801THENB$="COLONEL"
1212 IFSC>801ANDSC<1001THENB$="* GENERAL *"
1214 IFSC>1001THENB$="** MARSHAL **"
1216 RETURN
1232 GOTO500
1300 FORI=1TO1500:NEXT:RETURN