Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 5 N0=10:N1=20:N2=N0+N1
- 10 DIM C$(12),C(10,2),N$(N2),T(N2,3),M$(1)
- 20 PRINT "
- ";TAB(9);"** B-1 BOMBER GAME **":PRINT
- 25 PRINT TAB(10);"COPYRIGHT 1980 BY":PRINT :PRINT TAB(13);"AVALON HILL"
- 27 PRINT TAB(9);"MICROCOMPUTER GAMES"
- 30 FOR I=1 TO 12:READ C$(I):NEXT
- 35 DATA AU,EC,EV,PH,NA,AL,CO,ST,RA,SE,AR,BO
- 40 FOR I=1 TO N2:READ N$(I),T(I,1),T(I,2):NEXT
- 45 N$(0)="THULE AFB":T(0,1)=0:T(0,2)=0
- 50 DATA ARKHANGELSK,8261,5922,ASTRAKHAN',8631,7947,KIYEV,7391,7467
- 55 DATA LENINGRAD,7661,6427,MOSKVA,7956,6937,MURMANSK,8056,5452
- 60 DATA SEVASTO POL,7506,8152,SVERDLOVSK,9311,6682,VOLGOGRAD,8331,7692
- 65 DATA YEREVAN,8381,8657
- 70 DATA DUBOVKA,8350,7650,KHAR'KOV,8850,7450,KONOSHA,8153,6325
- 75 DATA LIPETSK,8100,7210,OCHAMCHIRA,8060,8400,ODESSA,7230,8050
- 80 DATA ONEGA,8147,5976,PECHENGA,7976,5410,PINSK,7115,7235
- 82 DATA PODOL'SK,7900,7010,PSKOV,7475,6780,ROSTO V,7990,8010
- 84 DATA SARPA,8515,7930,SYKTYVKAR,8825,6200,TALLINN,7060,6415
- 86 DATA TBILISI,8415,8435,UKHTA,8960,5925,VINNITSA,7200,7585,VYBORG,7575,6300
- 90 DATA YARAN'SK,8575,6740
- 100 A9=25000:A0=100:C0=10:S=4500:P=6:F9=0:T=0:E=1.75
- 105 M$(0)="SAM":M$(1)="MIG"
- 109 RANDOMIZE
- 110 X=5500+RND(0)*1500:Y=3500+RND(0)*1000
- 120 FOR I=1 TO N2:T(I,3)=0:NEXT:A=INT(25000*RND(0)):A1=A:R9=0
- 130 C=INT(RND(0)*360):C1=C:T9=INT(RND(0)*N0+1):T8=0:F=18500
- 140 FOR I=1 TO 10:C(I,1)=0:NEXT:F$="":FOR I=1 TO 5
- 150 F$=F$+CHR$(INT(RND(.01)*26)+65):NEXT:L9=.3:PRINT "
- "
- 160 PRINT "YOU ARE FLYING A B1 BOMBER OUT OF"
- 161 PRINT "THULE AFB. YOU ARE IN AN ALERT STATUS"
- 162 PRINT "ORBITING OVER THE ARCTIC":PRINT :FOR I=1 TO 6000:NEXT
- 180 PRINT "***** FLASH *****":PRINT "HOT WAR HOT WAR HOT WAR"
- 190 PRINT :PRINT "YOUR PRIMARY TARGET IS ";N$(T9);"."
- 192 PRINT "YOUR FAIL SAFE CODE IS ";F$;".":PRINT
- 200 PRINT "YOUR ALTERNATES ARE:":J=0:FOR I=1 TO N0:IF I=T9 THEN 230
- 210 J=J+1:PRINT TAB(12*(J-1)+1);N$(I);:IF J<3 THEN 230
- 220 J=0:IF I<9 THEN PRINT
- 230 NEXT:PRINT :PRINT
- 240 PRINT "SOVIET DEFENSE COMPLEXES ARE:"
- 250 J=0:FOR I=N0+1 TO N2:J=J+1
- 260 PRINT TAB(12*(J-1)+1);N$(I);:IF J<3 THEN 280
- 270 J=0:PRINT
- 280 NEXT:PRINT :PRINT :PRINT "GOOD LUCK!"
- 285 PRINT CHR$(27)+CHR$(41)
- 290 PRINT CHR$(27)+CHR$(41):GOSUB 670 PRINT :INPUT"COMMAND";A$:IF LEN(A$)<2 THEN 310
- 294 PRINT CHR$(27)+CHR$(40)
- 295 CM=0
- 300 FOR I=1 TO 12:IF LEFT$(A$,2)=C$(I) THEN CM=I
- 305 NEXT:IF CM>0 THEN 350
- 310 PRINT "LEGAL COMMANDS ARE:":PRINT "CO TO CHANGE COURSE"
- 311 PRINT "AL TO CHANGE ALTITUDE":PRINT "ST TO GET A STATUS REPORT"
- 312 PRINT "RA TO GET A RADAR REPORT":PRINT "NA TO GET NAVIGATION DATA "
- 313 PRINT "SE TO SEARCH FOR A DEFENSE COMPLEX"
- 314 PRINT "AU TO HAVE AU TO PILOT FLY PLANE"
- 315 PRINT "EV TO CONDUCT EVASIVE ACTION"
- 316 PRINT "EC TO USE ECM"
- 317 PRINT "PH TO LAUNCH PHOENIX MISSILE"
- 318 PRINT "AR TO ARM BOMB"
- 319 PRINT "BO TO DROP BOMB":T0=T+3+INT(5*RND(0)):GOTO 1020
- 350 ON CM GOTO 430,970,740,820,560,360,380,700,650,610,390,470
- 360 INPUT "NEW ALTITUDE";A1:IF A1>A9 THEN A1=A9
- 361 IF A1<A0 THEN A1=A0
- 370 T0=T+13+INT(15*RND(0)):GOTO 1020
- 380 INPUT "NEW COURSE";C1:GOTO 370
- 390 IF F9=2 THEN 420
- 391 INPUT "FAIL SAFE CODE";A$:IF A$=F$ THEN F9=1
- 400 IF F9=0 THEN 410
- 401 PRINT "BOMB ARMED.":L9=10*L9:GOTO 370
- 410 PRINT "WRONG CODE.":GOTO 370
- 420 PRINT "BOMB ALREADY DROPPED.":GOTO 370
- 430 PRINT "TIME FOR AUTO PILOT (S,M,H)? ";:A$=" "
- 431 B$=INKEY$:IF B$="" THEN 431
- 432 PRINT B$;:IF ASC(B$)=13 THEN 439
- 433 IF ASC(B$)<>20 THEN A$=A$+B$:GOTO 431
- 434 IF ((ASC(B$)=20)AND(LEN(A$)>1)) THEN A$=LEFT$(A$,LEN(A$)-1)
- 435 GOTO 431
- 439 A$=A$+" ":I=0:J=0:K=0
- 440 IF A$=" " THEN 460
- 441 I=VAL(A$):GOSUB 1650:IF A$=" " THEN 460
- 450 J=VAL(A$):GOSUB 1650:IF A$=" " THEN 460
- 455 K=VAL(A$)
- 460 I=-I*(I>0):J=-J*(J>0):K=-K*(K>0):T2=T+I+60*J+3600*K:GOTO 1020
- 470 IF F9=2 THEN 420
- 471 IF F9=0 THEN 530
- 472 INPUT "TARGET";A$
- 480 IF LEN(A$)<2 THEN 540
- 481 A$=LEFT$(A$,2):GOSUB 1760:IF ((NN=-1)OR(NN>N0)) THEN 540
- 490 GOSUB 1710:IF RA>250 THEN 550
- 491 INPUT "CONFIRM DROP (Y/N)";A$
- 500 IF A$<>"Y" THEN 370
- 501 FOR I=1 TO 1500:NEXT:PRINT N$(NN);" DESTROYED."
- 510 L9=L9/15
- 520 T8=NN:S=S+250:A0=A0+50:F9=2:T0=T+3+INT(5*RND(0)):GOTO 1020
- 530 PRINT "BOMB NOT ARMED.":GOTO 370
- 540 PRINT "IMPROPER TARGET.":GOTO 370
- 550 PRINT N$(NN);"NOT IN RANGE.":GOTO 370
- 560 INPUT "WHERE TO";A$:IF LEN(A$)<2 THEN 600
- 561 A$=LEFT$(A$,2)
- 570 GOSUB 1760:IF NN=-1 THEN 600
- 580 GOSUB 1710:GOSUB 1600
- 581 PRINT N$(NN);" BEARS";INT(AN*10)/10;"T RANGE";INT(RA);"KM."
- 590 T0=T+40+INT(41*RND(0)):GOTO 1020
- 600 PRINT "NOT ON THE MAP.":GOTO 590
- 610 I=0:J=10000:FOR NN=NO+1 TO N2:GOSUB 1710:IF RA>J THEN 640
- 620 IF T(NN,3)=2 THEN 640
- 630 GOSUB 1600:IF ABS(C-AN)>45 AND ABS(C-AN)<315 THEN 640
- 631 J=RA:I=NN
- 640 NEXT:NN=I:IF NN>0 THEN 580
- 641 PRINT "NO COMPLEX FOUND.":GOTO 590
- 650 PRINT "CONTACTS:":GOSUB 670:IF J=0 THEN PRINT " NO CONTACTS."
- 660 T0=T+5+INT(RND(0)*11):GOTO 1020
- 670 J=0:FOR I=1 TO 10:IF C(I,1)=0 THEN 690
- 671 J=1
- 680 PRINT M$(-(C(I,1)>10));"-";C(I,1);"INTERCEPTS IN";C(I,2)-T;"SECONDS."
- 690 NEXT:RETURN
- 700 PRINT "COURSE";INT(C);"T SPEED";S;"KPH"
- 710 PRINT "ALTITUDE";A;"M FUEL";F;"KM"
- 720 IF F9<>2 THEN PRINT "PRIMARY TARGET: ";N$(T9)
- 730 PRINT P;"PHOENIX LEFT.":T0=T+20+INT(RND(0)*21):GOTO 1020
- 740 A1=200+INT(300*RND(0)):IF RND(0)<.5 THEN A1=-A1
- 741 A=A+A1
- 750 IF A<0 THEN 1470
- 751 A1=A:C1=60+INT(60*RND(0))
- 760 IF RND(0)>.5 THEN C1=-C1
- 761 C=C+C1:C=C+360*(C>360)-360*(C<0)
- 770 C1=C:FOR I=1 TO 10:IF C(I,1)=0 THEN 810
- 780 J=(8-2*(C(I,1)<10))/(C(I,2)-T):IF J>.95 THEN J=.95
- 790 IF RND(0)>J THEN 810
- 791 PRINT M$(-(C(I,1)>10));"-";C(I,1);"LOSES TARGET";
- 800 IF C(I,1)>10 THEN PRINT " - RETURNS TO BASE";
- 801 PRINT ".":C(I,1)=0
- 810 NEXT:T0=T+10+INT(21*RND(0)):GOTO 1020
- 820 IF P=0 THEN 870
- 821 INPUT "PHOENIX MISSILE ARMED. TARGET";A$
- 822 IF LEN(A$)>3 THEN A$=LEFT$(A$,3)
- 830 IF A$="M" OR A$="MIG" OR A$="S" OR A$="SAM" THEN 900
- 831 IF A$="N" OR A$="NONE" THEN 880
- 832 IF LEN(A$)<2 THEN 880
- 833 A$=LEFT$(A$,2):GOSUB 1760
- 840 IF NN<N0+1 THEN 880
- 841 GOSUB 1710:IF RA>200 THEN 890
- 842 PRINT "PHOENIX AWAY!"
- 850 PRINT N$(NN);" DEFENSE COMPLEX DESTROYED.":T(NN,3)=2:P=P-1
- 860 T0=T+3+INT(5*RND(0)):GOTO 1020
- 870 PRINT "NO MORE MISSILES!":GOTO 860
- 880 PRINT "INVALID TARGET.":GOTO 860
- 890 PRINT N$(NN);" OUT OF RANGE.":GOTO 860
- 900 J=10000!:K=0:FOR I=1 TO 10:IF C(I,1)=0 THEN 920
- 910 IF C(I,2)-T>J THEN 920
- 911 J=C(I,2)-T:K=I
- 920 NEXT:PRINT "PHOENIX AWAY!":P=P-1:IF K=0 THEN 960
- 930 IF J>10 THEN 960
- 931 IF C(K,1)<10 AND RND(90)>.6 THEN 960
- 941 PRINT M$ (-(C(K,1)>10));"-";C(K,1);"DESTROYED!"
- 950 C(K,1)=0:GOTO 860
- 960 PRINT "MISSED!":GOTO 860
- 970 FOR I=1 TO 10:IF C(I,1)=0 THEN 1010
- 971 J=E*(.5+5/(C(I,2)-T))
- 980 IF J>.97 THEN J=.97
- 981 IF RND(0)>J THEN 1010
- 982 PRINT M$(-(C(I,1)>10));"-";C(I,1);
- 990 IF C(I,1)>10 THEN PRINT "LOSES TARGET - RETURNS TO BASE."
- 1000 IF C(I,1)<10 THEN PRINT " SELF DESTRUCTS."
- 1001 C(I,1)=0
- 1010 NEXT:E=E*(.7+.3*RND(0)):T0=T+3+INT(5*RND(0)):GOTO 1020
- 1020 T3=T0:I9=1:IF T0>T THEN 1060
- 1021 I9=0:T3=INT(RND(0)*301)+T
- 1030 FOR I=1 TO 10:IF C(I,1)=0 THEN 1050
- 1031 IF C(I,2)<T3 THEN T3=C(I,2)
- 1040 IF T>=C(I,2)-10 THEN 1050
- 1041 IF C(I,2)-10<T3 THEN T3=C(I,2)-10
- 1050 NEXT:IF (T2<=T)OR(T3<T2) THEN 1060
- 1055 T3=T2:I9=1
- 1060 T0=T3-T:A2=A0*T0:C2=C0*T0
- 1070 IF A2>ABS(A-A1) THEN A=A1
- 1071 IF A2<=ABS(A-A1) THEN A=A+A2*SGN(A1-A)
- 1080 IF C2>ABS(-360*(ABS(C-C1)>180)-ABS(C-C1)) THEN 1100
- 1090 C=C+C2*SGN(C1-C):C=C-360*(C<0)+360*(C>360):GOTO 1110
- 1100 C=C1
- 1110 X=X+S*T0*SIN(C*3.14159/180)/3600
- 1120 F=F-INT(S*(T3-T)/3600)
- 1130 Y=Y-S*T0*COS(C*3.14159/180)/3600:T=T3
- 1140 IF F<0 THEN 1490
- 1150 DE=0:CR=0:FOR I=1 TO 10:IF (C(I,1)=0)OR(DE=1)OR(CR=1) THEN 1210
- 1151 IF C(I,2)>T THEN 1200
- 1160 PRINT "NUCLEAR AIRBURST!!!":R9=1:C(I,1)=0:I9=1
- 1170 A=A+INT(3000*RND(0))*SGN(.5-RND(0)):IF A<0 THEN CR=1
- 1180 A1=A:F=INT(F*RND(0)):S=INT(S*(.5+.5*RND(0)))
- 1190 IF RND(0)<.15 THEN DE=1
- 1191 GOTO 1210
- 1200 IF C(I,2)>T+10 THEN 1210
- 1201 PRINT M$(-(C(I,1)>10));"-";C(I,1);"IN PHOENIX RANGE.":I9=1
- 1210 NEXT:IF CR=1 THEN 1470
- 1211 IF DE=1 THEN 1480
- 1212 IF F9=2 THEN 1270
- 1220 FOR NN=1 TO N0:GOSUB 1710:IF RA>250 THEN 1240
- 1221 IF T(NN,3)<>0 THEN 1240
- 1230 PRINT N$(NN);" IN BOMB RANGE.":T(NN,3)=1:I9=1
- 1240 IF T(NN,3)<>1 THEN 1260
- 1241 IF RA<250 THEN 1260
- 1250 PRINT N$(NN);" NO LONGER IN BOMB RANGE.":T(NN,3)=0
- 1260 NEXT
- 1270 FOR NN=N0+1 TO N2:IF T(NN,3)=2 THEN 1440
- 1280 IF ABS(X-T(NN,1))>750 THEN 1440
- 1290 IF ABS(Y-T(NN,2))>750 THEN 1440
- 1291 GOSUB 1710:IF RA>750 THEN 1440
- 1300 IF RA>200 OR P=0 THEN 1320
- 1301 IF T(NN,3)=1 THEN 1320
- 1302 T(NN,3)=1
- 1310 PRINT N$(NN);" BASE IN PHOENIX RANGE.":I9=1
- 1320 IF T(NN,3)<>1 THEN 1340
- 1321 IF RA<200 THEN 1340
- 1330 PRINT N$(NN);"BASE OUT OF MISSILE RANGE."
- 1340 IF RND(0)>L9*(T0/300)*(A^.125) THEN 1440
- 1350 J=0:FOR K=1 TO 10:IF C(K,1)=0 THEN J=K
- 1351 NEXT:IF J=0 THEN 1440
- 1360 IF RND(0)>.5 THEN 1380
- 1370 C(J,1)=INT(9*RND(0)+1):M=6500:GOTO 1390
- 1380 C(J,1)=21+2*INT(RND(0)*7):M=5000
- 1390 GOSUB 1600:L=(AN-C)*3.1415/180
- 1400 L=SQR(M*M-(S*SIN(L))^2)+SGN(-ABS(L))*ABS(S*COS(L))
- 1410 GOSUB 1710:C(J,2)=T+INT((3600*RA/L)+1)
- 1420 PRINT N$(NN);" LAUNCHES A ";M$(-(C(J,1)>10));"-";C(J,1);"."
- 1430 I9=1
- 1440 NEXT:NN=0:GOSUB 1600:GOSUB 1710:L=ABS(C-AN)
- 1450 IF (L<30 OR L>330)AND RA<6500 AND T>2000 THEN 1500
- 1460 IF I9=1 THEN 290
- 1461 IF I9<>1 THEN 1020
- 1470 PRINT "B1 CRASHES IN TO HILLSIDE.":R9=2:GOTO 1510
- 1480 PRINT "B1 DESTROYED.":R9=2:GOTO 1510
- 1490 PRINT "B1 RUNS OUT OF FUEL.":GOTO 1470
- 1500 NN=0:GOSUB 1710:IF RA<F THEN 1505
- 1501 PRINT "B1 REFUELS FROM TANKER AIRCRAFT.":FOR I=1 TO 1500:NEXT
- 1505 PRINT "B1 LANDS AT THULE AFB."
- 1506 PRINT "MISSION COMPLETE."
- 1510 PRINT "MISSION SUMMARY:":IF T8=0 THEN 1540
- 1520 IF T8=T9 THEN PRINT "PRIMARY";
- 1530 IF T8<>T9 THEN PRINT "SECONDARY";
- 1535 PRINT " TARGET, ";N$(T8);" DESTROYED."
- 1540 PRINT "DEFENSE COMPLEXES DESTROYED:"
- 1550 J=0:FOR I=N0+1 TO N2:IF T(I,3)<>2 THEN 1560
- 1551 PRINT TAB(4);N$(I):J=1
- 1560 NEXT:IF J=0 THEN PRINT TAB(4);"NONE"
- 1570 IF R9=1 THEN PRINT"CREW WILL DIE FROM RADIATION EXPOSURE."
- 1580 IF R9=2 THEN PRINT "CREW DEAD."
- 1590 INPUT "GO AGAIN (Y/N)";A$:IF A$="Y" THEN 100
- 1591 END
- 1600 DX=X-T(NN,1):DY=Y-T(NN,2)
- 1610 IF DY=0 THEN AN=90-180*(DX>0):RETURN
- 1620 AN=ATN(-DX/DY)*180/3.1415-180*(DY<0)+360*(DX>0)*(DY>0):RETURN
- 1650 IF LEFT$(A$,1)="," THEN 1670
- 1660 A$=RIGHT$(A$,LEN(A$)-1):IF LEN(A$)>1 THEN 1650
- 1665 A$=" "
- 1670 A$=RIGHT$(A$,LEN(A$)-1):RETURN
- 1710 RA=SQR((X-T(NN,1))^2+(Y-T(NN,2))^2):RETURN
- 1760 NN=-1:FOR L=0 TO N2:IF A$=LEFT$(N$(L),2) THEN NN=L
- 1770 NEXT:RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement