100 RANDOMIZE TIMER:CLS
110 REM ** BY ANTHONY WOOD -- AMERICAN SCHOOL HAGUE **
120 PRINT TAB(24)"**BATTLESTAR GALACTICA**":PRINT 
130 INPUT "INSTRUCTIONS";A$:IF A$="N" OR A$="NO" THEN 230:PRINT 
140  PRINT TAB(25)" ORDERS"
150 PRINT "#   DESCRIPTION"
160 PRINT "1   FIRE WEAPON":PRINT "2   SHIP STATUS"
170 PRINT "3   ADVANCE  OR  RETREAT":PRINT "4   ENERGIZE SHIELDS"
180 PRINT TAB(25)"WEAPONRY:"
190 PRINT "#   DESCRIPTION          RANGE"
200 PRINT "1   PLUTONIUM BOMB       0-1000"
210 PRINT "2   LASER TORPEDOES      0-8000"
220 PRINT "3   LASER                0-20000"
230 PRINT :P=20:H=10:U=12000:U5=10000:E3=5:L=8000:Z9=3
240 H1=10000:P1=10000:P9=10000
250 K=INT(RND(1)*3000)+400:D9=9000+INT(RND(1)*1000)
260 PRINT "SCANNERS HAVE PICKED UP A CYLON DESTROYER"K"MICRONS AWAY:
270 INPUT  " ORDERS";O:ON O GOTO  300,610,500,580
290 PRINT " ORDER SEQUENCE RESTARTS DUE TO INPUT  ERROR.":GOTO 270
300 REM  ORDER 1
310 INPUT "WEAPON TO FIRE";F:IF F=3 THEN 330ELSE INPUT "AMOUNT TO FIRE";F1:GOTO  340
330 PRINT "UNITS OF ENERGY TO FIRE IN LASER";:INPUT F1
340 ON F GOTO  350,370,400:GOTO 290
350 IF K>1000 THEN 290
351 IF F1>H THEN 290
353 IF F1*1000>H1 THEN 360
354 H=H-F1:E=1000*F1:GOTO 420
360 PRINT "BOMB BAY OVER LOADED...SAFETY CIRCUIT REJECTS  ORDER.":GOTO 270
370 IF K>8000 THEN 290
371 IF F1>P THEN 290
372 IF F1*500>P1 THEN 380
375 P=P-F1:E=500*F1:GOTO 420
380 PRINT "LAUNCH TUBES OVERLOADED...SAFETY CIRCUT REJECTS  ORDER.":GOTO 270
400 IF K>20000 THEN 290
402 IF U<F1 THEN 290
404 IF F1>P9 THEN 410
406 U=U-F1:E=F1:GOTO 420
410 PRINT "LAZER OVERLOADED...SAFTEY CIRCUT REJECTS  ORDER.":GOTO 270
420 PRINT "ATTACK LAUNCHED.":Z=D5-E:IF Z<1 THEN 440
430 PRINT "BAD LUCK, YOU DIDN'T BREAK THROUGH THE CYLONS SHIELD.":D5=D5-E:GOTO 700
440 IF D5<=0 THEN 450
445 PRINT "CYLON SHIELDS NEUTRALIZEL. ";
450 Z=E-D5:D5=0:D9=D9-Z
460 IF D9<1 THEN 470ELSE PRINT "CYLON SHIP REMAINS OPPERATIONAL.":GOTO 700
470 PRINT "SENSORS INDICATE CYLON SHIP IS DYING!!!"
480 PRINT "HE HAS SUFFERED TO MANEY HITS."
490 Z9=Z9-1:IF Z9=0 THEN 1010ELSE 250
500 REM  ORDER 3
510 INPUT  "DO YOU WANT TO (1. ADVANCE  2. RETREAT)";G
520 IF  G<1 THEN 290
525 IF G>2 THEN 290
530 INPUT "WARP";G2:IF (G2>E3*2) OR (U5<G2*100) THEN 290
540 IF G2<0 THEN 290
545 U5=U5-(100*G2):IF G=2 THEN 550
547 K=K-(1000*G2):IF  K<1 then 560 ELSE 700
550 K=K+(1000*G2):IF K<1 THEN 560ELSE 700
560 PRINT  TAB(25)"**** COLLISION ****":PRINT "BOTH SHIPS VAPORIZED."
570 IF Z9=1 THEN 1010ELSE END
580 REM  ORDER#4
590 PRINT "HOW MANY UNITS OF ENERGY DO YOU WANT TO ENTER";:INPUT Q9
600 IF Q9>U THEN 290
605 U=U-Q9:D=D+Q9:PRINT "SHIELDS ENERGIZED.":GOTO 700
610 REM  ORDER#2
620 PRINT  TAB(25)"**** SHIP STATUS ****":PRINT 
630 PRINT "UNITS OF ENERGY=";U:PRINT "UNITS OF TYLIUM=";U5
640 PRINT "PLUTONIUM BOMBS=";H:PRINT "LASER TORPEDOES=";P
650 PRINT "DISTANCE FROM CYLON SHIP=";K:PRINT "ENERGY IN SHIELD=";D
660 PRINT "DAMAGE REPORT:"
670 PRINT "OPERATIONAL AREA OF:":PRINT "TORPEDOE TUBES";P1/100
680 PRINT "LASER=";P9/100:PRINT "BOMB LAUNCH TUBES";H1/100
690 PRINT "TOP SPEED=";E3*2:PRINT "HULL STRENGTH=";L/100:PRINT :GOTO 270
700 REM ENEMY FIGHTS BACK
705 IF K<20000 THEN 740
710 PRINT "SCANNERS INDICATE CYLON IS ADVANCING. HE HAS MADE A WARP"
720 S=INT(RND(1)*9)+1:PRINT S;"JUMP."
730 K=K-(S*1000):IF K<1 THEN 560ELSE 270
740 IF D5<100 THEN 850
750 IF K<1000 THEN 770
755 IF K<8000 THEN 780
760 PRINT "CYLONS FIRED LASERS AT US. ";:I=1:GOTO 790
770 PRINT "CYLONS FIRED PLUTONIUM BOMBS AT US. ";:I=1000:GOTO 790
780 PRINT "CYLONS FIRED LASER TORPEDOES AT US. ";:I=500
790 L2=INT(RND(1)*4000)+300:L3=INT(L2/I):IF L3<1 THEN 790
800 IF K>8000 THEN 810ELSE PRINT "SCANNERS INDICATE"L3"FIRED.":L3=L3*I:GOTO 820
810 PRINT "HE FIRED"L3*I"UNITS OF ENERGY."
820 IF L3<D THEN 950
823 IF D=0 THEN 830
825 PRINT "HE NEUTRALIZED OUR SHIELDS.":L3=L3-D
830 A9=INT(RND(1)*100)+1:D=0:IF A9<78 THEN 870
840 PRINT "DAMAGE IS MINIMAL.":L=L-(L3*.8):IF L<1 THEN 970ELSE 270
850 T4=INT(RND(1)*1000)+1:IF T4<40 THEN 750ELSE D5=INT(RND(1)*5000)+101
860 PRINT "CYLON SHIELDS ENERGIZED.":GOTO 270
870 A9=INT(RND(1)*100)+1:IF A9<30 THEN 880
873 IF A9<50 THEN 900
876 IF A9<80 THEN 920ELSE 940
880 PRINT "CYLONS HAVE HIT AN ENGINE... KNOCKING IT OUT.":E3=E3-1
890 IF E3<1 THEN 990ELSE L=L-L3:IF L<1 THEN 970ELSE 270
900 PRINT "CYLONS HAVE HIT OUR TORPEDOE TUBES!!":P1=P1-L3
910 IF P1>1 THEN 270ELSE P1=0:GOTO 270
920 PRINT "CYLONS HAVE HIT OUR BOMB LAUNCH TUBES!!":H1=H1-L3
930 IF H1>1 THEN 270ELSE H1=0:GOTO 270
940 PRINT "CYLONS HAVE HIT OUR LASERS!":P9=P9-L3:IF P9>1 THEN 270ELSE P9=0:GOTO 270
950 PRINT "SHIELDS REMAIN ENERGIZED WITH A LOSS OF"L3"UNITS OF ENERGY."
960 D=D-L3:GOTO 270
970 PRINT "LIFE SUPPORT SYSTEMS FADING, SOLIUM LEAKAGE DETECTED, "
980 PRINT "REACTOR HAS GONE BERSERK, THE SHIP AND ITS' CREW ARE DYING.":END
990 PRINT "ENGINES ARE KAPUT!! WE ARE DRIFTING HELPLESSLY IN"
1000 PRINT "THE VOID TO DIE!!!":END
1010 PRINT "MISSION COMPLETED, 3 CYLON SHIPS DESTROYED."
1020 END
