' The Super Star Trek, by Antti J Ylikoski 01-07-2011 -- 05-06-2012.
'
' Adapted for the QB64 by Antti Ylikoski 05-06-2012.
' Finished corrections and bug fixes, AJY 05-11-2012.
'
' See http://[abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] for the QB64.EXE BASIC system, which is the
' best freeware BASIC that I have come across.
'
' Start the QB64.EXE, Open the file and execute CTL-F5 to run the program --
' good luck, admiral!!!
'
' Variable i7 == initial energy; changed from 5000 to 20000 to make the game easier to win
' variable l2 == 1,2,3 after short, medium, long game
' variable r5 == remaining time
' variable i5 == initial remaining time
' changed i5 to i5 = 10 * l2 to make the game winnable
' In line 18090, lowered the hitpower of Klingon n [k6(n)] by 325 units
' in line 18130, lowered the hitpower of a Klingon commander n [k6(n)] by 1000 units
' In line 14090, added PRINT USING " ###";
' In lines 3130 and 3150, added PRINT USING " ###";
' Corrected PRINT statements in lines 3001 and 3010
' Corrected several points in I/O routines.
'
' Direction of space travel is in numbers 1.0--12.0 clockwise from
' 0 degrees, which is Direction 1 and is directly up ("north").
'
' The direction D: 1 <= D <= 12. 12 == 360 degrees == direction 1.
' Direction 1 is directly upwards ("north").
' Direction 3 is directly to the right ("eastwards").
' Directions are real numbers, counting clockwise from Direction 1.
' AJY 2014-07-02.
'
1 REM From: whirata@pixi.
com (Wayne R Hirata
) Newsgroups: comp.lang.basic.misc
2 REM Subject: Re: Old
1976 Star Trek in BASIC
(no graphics
) 3 REM Date: Sun
, 17 Sep
1995 08:
11:
44 GMT
5 REM *** SUPER STAR TREK
*** 6 REM INTELLEC MDS VERSION
7 REM WRITTEN IN BASIC BY RON WILLIAMS
8 REM INTEL CORP.
- 5/15/76 9 REM ADAPTED FROM A FORTRAN VERSION WRITTEN
10 REM FOR THE CDC
6600 IN
1974.
12 DIM g1$
(16), v$
(5, 5), c$
(20), g
(8, 8), d$
(12), q$
(10, 10), d4
(12), d9
(106) 13 DIM s2
(8, 8), t$
(10), s$
(10), c2$
(10), c5
(10), g1
(10), f1
(10) 14 DIM s7$
(10), c1
(10), c2
(10), b2
(10), b3
(10): q$
= "?" 16 DIM k6
(10):
REM how much the k6
(n
)'th Klingon shoots at us 19 DATA "S.R. SENSORS","L.R. SENSORS","PHASERS","PHOTON TUBES","LIFE SUPPORT" 20 DATA "WARP ENGINES","IMPULSE ENGINES","SHIELDS","SUBSPACE RADIO" 21 DATA "SHUTTLE CRAFT","COMPUTER","TRANSFER PANEL","ABANDON","CHART","COMPUTER" 22 DATA "DAMAGES","DESTRUCT","DOCK","IDLE","IMPULSE","LRSCAN","NAVIGATE","PHASERS","QUIT" 23 DATA "SHIELDS","SOS","SRSCAN","STATUS","TORPEDO","TRANSFER","VISUAL","WARP","SHORT" 24 DATA "MEDIUM","LONG","BEGINNER","NOVICE","SENIOR","EXPERT","COURSE","WCOST","ICOST" 25 DATA "PEFFECT","SCORE","END","ANTARES","SIRIUS","RIGEL","MERAK","PROCYON","CAPELLA" 26 DATA "VEGA","DENEB","CANOPUS","ALDEBARAN","ALTAIR","REGULUS","BELLATRIX","ARCTURUS" 27 DATA "POLLUX","SPICA",10.5,12,1.5,9,0,3,7.5,6,4.5 46 GOSUB 24000: s7$
(1) = "": s7$
(2) = " ": s7$
(3) = " ": s7$
(4) = "" 80 PRINT "USE AT LEAST 2 LETTERS, PLEASE.":
GOTO 75 135 INPUT "ILLEGAL COMMAND - DO YOU NEED A LIST "; b$
141 PRINT c$
(i
);
TAB(12); c$
(i
+ 1);
TAB(22); c$
(i
+ 2);
TAB(32); c$
(i
+ 3) 150 ON i
GOTO 200, 225, 250, 275, 290, 300, 325, 350, 375, 400 160 ON i
- 10 GOTO 425, 450, 475, 500, 525, 540, 550, 575, 600, 625 170 PRINT "ERROR AT 170 - SHOULD NOT BE HERE" 200 REM-ABANDON
225 REM-CHART
250 REM-COMPUTER
275 REM-DAMAGES
300 REM-DOCK
325 REM-IDLE
332 IF g
(q1
, q2
) = 1000 THEN 750 350 REM-IMPULSE
375 REM-LRSCAN
400 REM-NAVIGATE
425 REM-PHASERS
450 REM-QUIT
460 PRINT "TOO BAD...WE HATE TO LOSE GOOD ASTRONAUTS!" 475 REM-SHIELDS
480 s9 = 0
500 REM-SOS
525 REM-SRSCAN
550 REM-TORPEDOS
575 REM-TRANSFER
590 IF g
(q1
, q2
) <> 1000 THEN 70 600 REM-VISUAL
610 IF g
(q1
, q2
) <> 1000 THEN 70 625 REM-WARP
700 REM-AFTERMOVINGSTARSHIP
740 IF g
(q1
, q2
) < 1000 THEN 790 900 REM-WE'RE FINISHED
940 REM-BEGINSUBROUTINES
1000 REM-ATTACK
1040 p2 = 1 / i8
1050 j5 = 0
1070 IF c5$
= "DOCKED" THEN 1780 1080 h2 = 0: h3 = 0: c6 = 1
1100 a3 = 0
1130 a3 = 1
1140 d6
= 0.8 + 0.05 * RND(1) 1150 h4 = k6(l) * d6 ^ k8(l)
1170 p3
= 0.1:
IF p2
* s3
> p3
THEN p3
= p2
* s3
1180 h5 = p3 * c6 * h4 + 1
1195 s3 = s3 - h5
1200 h4 = h4 - h5
1210 IF (p3
> 0.1) AND (h4
< 5.000000E-03 * e1
) THEN 1540 1230 j5 = 1
1240 PRINT FNR
(h4
);
"UNIT HIT ON THE "; s5$;
" FROM ";
1250 j6 = k4(l): j7 = k5(l)
1300 h3 = h3 + h4
1310 IF h4
< (275 - 25 * s8
) * (1 + 0.5 * RND(1)) THEN 1530 1320 n4
= 1 + INT(h4
/ (500 + 100 * RND(1))) 1330 PRINT "***CRITICAL HIT--";
1340 k9 = 1
1360 j9
= INT(12 * RND(1)) + 1 1370 c5(w4) = j9
1380 e3
= (h4
* d5
) / (n4
* (75 + 25 * RND(1))) 1390 IF j9
= 6 THEN e3
= e3
/ 3 1395 d4(j9) = d4(j9) + e3
1430 IF j9
= c5
(v
- 1) THEN 1480 1450 k9 = k9 + 1
1520 s4 = 0
1530 e1 = e1 - h4
1570 p4 = 100 * p2 * s3 + 0.5
1590 PRINT "KLINGONS ATTACK--SHIELD STRENGTH REDUCED TO ";
1610 PRINT "ENERGY LEFT:"; FNS
(e1
);
" SHIELDS ";
1670 j8
= INT(h3
* RND(1) * 0.015) 1700 PRINT "MCCOY - 'SICKBAY TO BRIDGE. WE SUFFERED ";
1710 PRINT j8;
"CASUALTIES" 1720 PRINT " IN THAT LAST ATTACK'" 1730 c4 = c4 + j8
1750 f9 = 5
1780 PRINT "*** KLINGONS ATTACK-- STARBASE SHIELDS PROTECT ";
1810 k8(w4) = k7(w4)
2000 REM-AUTO VER
2020 PRINT "*** RED ALERT! RED ALERT!" 2030 PRINT "***THE "; s5$;
" HAS STOPPED IN A QUADRANT ";
2040 PRINT "CONTAINING A SUPERNOVA." 2050 PRINT "*** EMERGENCY AUTO -OVERRIDE ATTEMPTS TO HURL ";
2070 PRINT " SAFELY OUT OF THE QUADRANT." 2080 s2(q1, q2) = 1
2120 PRINT "WARP ENGINES DAMAGED." 2140 PRINT "ATTEMPTING TO ENGAGE IMPULSE ENGINES..." 2160 PRINT "IMPULSE ENGINES DAMAGED." 2165 f9 = 8
2190 p2 = 0.75 * e1
2200 d6 = 4.000000E-03 * (p2 - 50)
2210 d7
= 1.4142 + 1.2 * RND(1) 2220 d1 = d6
2240 t1 = d1 / 0.4
2260 j4 = 0
2300 w2 = w1 * w1
2310 p2 = 0.75 * e1
2320 d6 = p2 / (w1 * w1 * w1 * (s4 + 1))
2330 d7
= 1.4142 + 2 * RND(1) 2340 d1 = d6
2360 t1 = 10 * d1 / w2
2380 j4 = 0
2410 f9 = 8
2450 f9 = 1
3000 REM-CHART
3010 PRINT " --- --- --- --- --- --- --- ---" 3060 ON SGN(s2
(i
, j
)) + 2 GOTO 3070, 3090, 3110 3110 IF s2
(i
, j
) > 1000 THEN 3150 3190 PRINT "THE "; s5$;
" IS CURRENTLY IN "; g2$;
" ("; q1;
"-"; q2;
")" 4000 REM-CHOOSE
4003 PRINT "** WELCOME TO THE WORLD OF STAR TREK **" 4070 s8 = 0: l2 = 0
4090 PRINT "HOW LONG A GAME WOULD YOU LIKE";
4130 PRINT "WOULD YOU LIKE A SHORT, MEDIUM OR LONG GAME";
4150 l2 = i
4160 PRINT "ARE YOU A BEGINNER, NOVICE, SENIOR OR EXPERT PLAYER";
4220 s8 = i
4230 INPUT "ENTER YOUR MISSION PASSWORD... "; x$
4245 PRINT "....SETTING UP THE GALAXY...." 4260 REM-INITIALIZE
4270 d5 = 0.5 * s8
4280 i2
= INT(l2
+ 1 + RND(1) * 3) 4300 r3 = i2
4310 i5 = 10 * l2
4320 r5 = i5
4340 r7
= (s8
- 2 * RND(1) + 1) * s8
* 0.1 + 0.1 4350 IF r7
< 0.2 THEN r7
= r7
+ 0.1 4360 i1
= INT(2 * r7
* i5
) 4370 r1 = i1
4380 i4
= INT(s8
+ 0.0625 * i1
* RND(1)) 4390 r2 = i4
4400 i3 = (i1 + 4 * i4) * i5
4410 r4 = i3
5000 REM-COMPUTE
5010 PRINT "LIBRARY COMPUTER DISABLED" 5030 PRINT "----LIBRARY COMPUTER ACTIVE----" 5040 INPUT "PROGRAM NAME "; b$
5080 PRINT "VALID PROGRAMS ARE:" 5090 PRINT " COURSE WCOST ICOST" 5100 PRINT " PEFFECT SCORE END" 5120 ON i
GOTO 5200, 5300, 5400, 5500, 5600, 5700 5200 REM-COURSE&DIRECTION
5210 INPUT "ENTER QUADRANT AND SECTOR - "; a3
, a4
5222 IF a3
= 0 THEN a3
= 10 * q1
+ q2
5223 a3 = a3 + 0.5
5227 c6
(1) = k: k
= INT(a3
- c6
(1) * 10) 5229 c6(2) = k: a4 = a4 + 0.5
5232 c6
(1) = c6
(1) + (k
- 1) / 10: k
= INT(a4
- k
* 100) 5234 c6(2) = c6(2) + (k - 1) / 10
5235 x = q1 + ((s6 - 1) / 10) - c6(1): y = q2 + ((s7 - 1) / 10) - c6(2)
5236 d1
= 0: d2
= 0:
IF (x
= 0) AND (y
= 0) THEN 5250 5237 d1
= SQR(x
* x
+ y
* y
) 5238 IF x
< 0 THEN z7
= SGN(y
) * (3.1416 - arctan
(ABS(y
/ x
))) 5240 IF x
> 0 THEN z7
= arctan
(y
/ x
) 5245 d2
= 12 - z7
* 1.909859:
IF d2
> 12 THEN d2
= d2
- 12 5250 PRINT "COURSE IS"; FNS
(d2
);
" FOR A DISTANCE OF";
5300 REM
-COST
FOR WARP DRIVE
5302 INPUT "ENTER DISTANCE AND WARP FACTOR "; d1
, a4
5310 c7 = d1 * a4 * a4 * a4
5315 t1 = (10 * d1) / (a4 * a4)
5320 PRINT "IT WOULD TAKE"; FNS
(t1
);
"STARDATES AND USE" 5325 PRINT FNR
(c7
);
"UNITS OF ENERGY ("; FNR
(c7
+ c7
);
" IF SHIELDS ARE UP)" 5400 REM
-COST
FOR IMPULSE POWER
5410 INPUT "ENTER DISTANCE... "; d1
5430 c7 = 250 * d1 + 50: t1 = d1 / 0.4
5440 PRINT "IT WOULD TAKE"; FNR
(t1
);
"STARDATES AND USE" 5450 PRINT c7;
"UNITS OF ENERGY" 5500 REM-PHASER EFFECTIVENESS
5510 INPUT "ENTER PHASER RANGE IN QUADRANTS "; a3
5530 a3 = a3 * 10: c7 = (0.9 ^ a3) * 100
5540 PRINT "PHASERS ARE ";
LEFT$(STR$(c7
), 5);
"% EFFECTIVE AT THAT RANGE" 5600 REM- SCORE
5990 PRINT " FOR MAT IS MN,XXYY...WHERE MN IS THE QUADRANT" 5991 PRINT "AND XXYY IS THE SECTOR...E.G. 64,0307 REFERS" 5992 PRINT "TO QUADRANT 6-4, SECTOR 3-7." 5993 PRINT "NOTE: SECTOR COORDINATES MUST BE 4 DIGITS." 6010 c3
= 0:
PRINT "***COMMANDER AT";
6030 IF (c1
(f
) = q1
) AND (c2
(f
) = q2
) THEN 6050 6050 c1(f) = c1(r2): c2(f) = c2(r2): c1(r2) = 0: c2(r2) = 0
6060 r2 = r2 - 1: f1(2) = 1.000000E+30
6080 k2 = k2 + 1
6100 PRINT "***KLINGON AT";
6110 k1 = k1 + 1
6120 PRINT a5;
"-"; a6;
"DESTROYED." 6130 q$(a5, a6) = ".": r1 = r1 - 1
6150 r5 = r4 / (r1 + 4 * r2)
6160 g(q1, q2) = g(q1, q2) - 100
6180 IF (k4
(f
) = a5
) AND (k5
(f
) = a6
) THEN 6200 6200 k3 = k3 - 1
6230 k4(g) = k4(g + 1): k5(g) = k5(g + 1): k6(g) = k6(g + 1)
6235 k7(g) = k7(g + 1): k8(g) = k7(g)
6250 k4(k3 + 1) = 0: k5(k3 + 1) = 0: k7(k3 + 1) = 0: k8(k3 + 1) = 0: k6(k3 + 1) = 0
7000 REM-DOCK
7001 IF c5$
= "DOCKED" THEN 7100 7020 PRINT s5$;
" NOT ADJACENT TO A BASE." 7040 c5$ = "DOCKED"
7050 PRINT "HELMSMAN SULU - 'DOCKING MANEUVER COMPLETED.'" 7060 e1 = i7: s3 = i8: t4 = i9: l1 = j1
7100 PRINT "MR. SULU - 'BUT CAPTAIN, WE'RE ALREAD Y DOCKED!'" 8000 REM-DREPORT
8001 j = 0
8030 PRINT " DEVICE";
spc$
(12);
"-REPAIR TIMES-" 8050 j = 1
8060 PRINT " "; d$
(i
);
TAB(23); FNS
(d4
(i
));
TAB(33); FNS
(d3
* d4
(i
)) 8080 IF j
= 0 THEN PRINT "MR. SPOCK - 'ALL DEVICES FUNCTIONAL, CAPTAIN'" 9000 REM-EVENTS
9001 m = 0: d7 = d0 + t1
9030 m = l: d7 = f1(l)
9050 x6 = d7 - d0: d0 = d7
9060 r4 = r4 - (r1 + 4 * r2) * x6
9070 r5 = r4 / (r1 + 4 * r2)
9090 f9 = 2
9120 IF (d4
(5) = 0) OR (c5$
= "DOCKED") THEN 9180 9130 IF (l1
>= x6
) OR (d4
(5) <= l1
) THEN 9160 9160 l1 = l1 - x6
9170 IF d4
(5) <= x6
THEN l1
= j1
9180 r = x6
9190 IF c5$
= "DOCKED" THEN r
= x6
/ d3
9220 d4(l) = d4(l) - r
9225 IF d4
(l
) < 0 THEN d4
(l
) = 0 9227 PRINT:
PRINT "DAMAGE CONTROL- '"; d$
(l
);
" NOW OPERATIONAL.'" 9250 t1 = t1 - x6
9260 ON m
GOTO 9270, 9290, 9340, 9350, 9470 9270 REM-SUPERNOVA
9280 x2
= 0: y2
= 0:
GOSUB 27000 9285 f1
(1) = d0
- 0.5 * i5
* LOG(RND(1)) 9290 REM-TRACTOR BEAM
9292 IF c5$
= "DOCKED" THEN 9325 9294 y6 = (c1(i) - q1) ^ 2 + (c2(i) - q2) ^ 2
9296 y6
= SQR(y6
): t1
= 0.17778 * y6
9297 PRINT:
PRINT "***"; s5$;
" CAUGHT IN LONG-RANGE TRACTOR BEAM--" 9298 q1 = c1(i): q2 = c2(i)
9299 s6 = FNB(1): s7 = FNB(1)
9300 PRINT " PULLED TO QUADRANT"; q1;
"-"; q2;
", SECTOR"; s6;
"-"; s7
9301 IF r6
<> 0 THEN PRINT "(REMAINDER OF IDLE PERIOD CANCELLED)" 9302 r6 = 0
9305 PRINT "(SHIELDS NOT CURRENTLY USABLE.)" 9315 s9 = 0
9325 f1
(2) = d0
+ t1
- 1.5 * (i5
/ r2
) * LOG(RND(1)) 9330 f1
(2) = 1.000000E+30:
GOTO 9001 9340 d9(1) = d0: d9(2) = r1: d9(3) = r2: d9(4) = r3: d9(5) = r4: d9(6) = r5
9342 d9(7) = s1: d9(8) = b1: d9(9) = k1: d9(10) = k2
9343 FOR i
= 1 TO 8:
FOR j
= 1 TO 8: d9
(i
- 1 + 8 * (j
- 1) + 11) = g
(i
, j
):
NEXT j:
NEXT i
9344 FOR i
= 75 TO 84: d9
(i
) = c1
(i
- 74):
NEXT 9345 FOR i
= 85 TO 94: d9
(i
) = c2
(i
- 84):
NEXT 9346 FOR i
= 95 TO 99: d9
(i
) = b2
(i
- 94):
NEXT 9347 FOR i
= 100 TO 104: d9
(i
) = b3
(i
- 99):
NEXT 9348 d9(105) = b4: d9(106) = b5
9349 s0
= 1: f1
(3) = d0
- 0.3 * i5
* LOG(RND(1)):
GOTO 9001 9350 REM - STARBASE ATTACK
9380 f1
(4) = d0
+ 0.5 + 3 * RND(1) 9390 f1
(5) = 1.000000E+30:
GOTO 9001 9400 f1
(4) = 1.000000E+30: f1
(5) = 1.000000E+30:
GOTO 9001 9410 b4 = b2(i): b5 = b3(i)
9430 f1
(5) = d0
+ 0.5 + 3 * RND(1) 9440 f1
(4) = f1
(5) - 0.3 * i5
* LOG(RND(1)) 9460 PRINT "LT. UHURA- 'CAPTAIN, THE STARBASE IN"; b4;
"-"; b5
9461 PRINT " REPORTS THAT IT IS UNDER ATTACK AND CAN HOLD OUT" 9462 PRINT " ONLY UNTIL STARDATE"; FNR
(f1
(5));
"'" 9467 INPUT "MR. SPOCK- 'CAPTAIN, SHALL WE CANCEL THE IDLE PERIOD"; b$
9470 REM - STARBASE DESTROYED
9475 f1
(5) = 1.000000E+30:
IF (r2
= 0) OR (r3
= 0) THEN 9001 9485 k
= INT(g
(b4
, b5
) / 100):
IF g
(b4
, b5
) - k
* 100 < 10 THEN 9001 9520 IF s2
(b4
, b5
) = -1 THEN s2
(b4
, b5
) = 0 9530 IF s2
(b4
, b5
) > 999 THEN s2
(b4
, b5
) = s2
(b4
, b5
) - 10 9540 IF (b4
<> q1
) OR (b5
<> q2
) THEN 9630 9550 FOR i
= 1 TO k3: k
= k4
(i
): l
= k5
(i
) 9560 IF q$
(k
, l
) = "C" THEN 9570 9580 q$(b6, b7) = ".": b6 = 0: b7 = 0
9600 PRINT:
PRINT "MR. SPOCK- 'CAPTAIN, I BELIEVE THE STARBASE HAS";
9610 PRINT " BEEN DESTROYED.'" 9630 IF (r3
= 1) OR (d4
(9) > 0) THEN 9680 9650 PRINT "LT. UHURA- 'CAPTAIN, STARFLEET COMMAND REPORTS THAT" 9660 PRINT " THE STARBASE IN QUADRANT"; b4;
"-"; b5;
"HAS BEEN" 9670 PRINT " DESTROYED BY A KLINGON COMMANDER.'" 9680 g(b4, b5) = g(b4, b5) - 10
9720 b2(i) = b2(r3): b3(i) = b3(r3)
9730 r3 = r3 - 1
10000 REM-FINISH
10010 ON f9
GOTO 10020, 10130, 10160, 10185, 10195, 10205, 10220, 10235 10015 ON f9
- 8 GOTO 10245, 10270, 10280 10020 REM-THE GAME HAS BEEN WON
10025 PRINT "YOU HAVE DESTROYED THE KLINGON INVASION FLEET" 10030 PRINT " ***THE FEDERATION IS SAVED***": g1
= 1 10035 IF (a1
= 0) OR (b1
<> 0) THEN 10110 10045 IF 3 * s1
+ 35 * n1
+ c4
>= 100 THEN 10110 10050 IF d0
- j2
<= 6 THEN 10070 10060 r8 = 0.1 * s8 * (s8 + 1) + 0.1
10065 IF (k1
+ k2
) / (d0
- j2
) < r8
THEN 10110 10075 PRINT "IN FACT, YOU HAVE DONE SO WELL THAT STARFLEET COMMAND" 10080 PRINT "PROMOTES YOU ONE STEP IN RANK, ";
10085 IF s8
= 1 THEN PRINT "FROM BEGINNER TO NOVICE CLASS!" 10086 IF s8
= 2 THEN PRINT "FROM NOVICE TO SENIOR CLASS!" 10087 IF s8
= 3 THEN PRINT "FROM SENIOR TO EXPERT CLASS!" 10088 PRINT " ***CONGRATULATIONS***":
GOTO 10110 10090 PRINT "PROMOTES YOU TO 'COMMODORE EMERITUS'." 10100 PRINT "NOW YOU CAN RETIRE AND WRITE YOUR OWN STAR TREK GAME!" 10130 REM-FED RESOURCES DEPLETED
10135 PRINT "YOUR TIME HAS RUN OUT, AND THE" 10136 PRINT "FEDERATION HAS BEEN CONQUERED.":
PRINT 10137 PRINT "YOUR STARSHIP IS NOW KLINGON PROPERY, AND YOU ARE PUT" 10138 PRINT "ON TRIAL AS A WAR CRIMINAL. ON THE BASIS OF YOUR RECORD," 10139 IF r1
* 3 > i1
THEN 10150 10140 PRINT "YOU ARE FOUND GUILTY AND SENTENCED TO DEATH!" 10160 REM- L.S. FAILURE
10165 PRINT "YOUR LIFE SUPPORT RESERVES HAVE RUN OUT, AND" 10170 PRINT "YOU WILL SOON DIE OF ASPHYXIATION" 10175 PRINT "YOUR STARSHIP IS A DERELICT IN SPACE." 10185 REM-ENERGY GONE
10190 PRINT "YOUR ENERGY SUPPLY IS EXHAUSTED.":
GOTO 10172 10195 REM-BATTLE DEFEAT
10200 PRINT "THE "; s5$;
" HAS BEEN DESTROYED IN BATTLE." 10220 REM-NOVA
10225 PRINT "YOUR STARSHIP HAS BEEN DESTROYED BY A NOVA." 10230 PRINT "NICE SHOT, YOU HOCKEY PUCK!":
GOTO 10300 10235 REM-SUPERNOVA
10240 PRINT "THE "; s5$;
" HAS BEEN INCINERATED BY A SUPERNOVA." 10245 REM-ABANDON(NO BASES)
10250 PRINT "YOU HAVE BEEN CAPTURED BY THE KLINGONS. IF YOU STILL" 10255 PRINT "HAD A STARBASE TO BE RETURNED TO , YOU WOULD HAVE BEEN" 10260 PRINT "REPATRIATED AND GIVEN ANOTHER CHANCE. SINCE YOU HAVE" 10265 PRINT "NO STARBASES, YOU WILL BE MERCILESSLY TORTURED TO DEATH!" 10270 REM - SELF
-DESTRUCT
10271 PRINT:
PRINT "THE "; s5$;
" IS NOW AN EXPANDING CLOUD" 10272 PRINT "OF SUB-ATOMIC PARTICLES...":
GOTO 10300 10280 REM
-NOT REMATERIALIZED
10285 PRINT "STARBASE WAS UNABLE TO RE-MATERIALIZE YOUR STARSHIP." 10315 IF LEFT$(s5$
, 1) = "E" THEN s5$
= "FAERIE QUEENE" 10316 a1 = 0
10325 g3 = r4 / i3: b8 = (r1 + 2 * r2) / (i1 + 2 * i4)
10326 a3 = g3 / b8
10330 PRINT "AS A RESULT OF YOUR ACTIONS, A TREATY WITH THE KLINGON" 10331 PRINT "EMPIRE HAS BEEN SIGNED. THE TERMS OF THE TREATY ARE" 10340 PRINT "HIGHLY UNFAVORABLE TO THE FEDERATION.":
GOTO 10350 10345 PRINT "THE FEDERATION WILL BE DESTROYED!" 10355 PRINT "SINCE YOU TOOK THE LAST KLINGON WITH YOU, YOU ARE" 10360 PRINT "A MARTYR AND A HERO. SOMEDAY MAYBE THEY'LL ERECT" 10370 PRINT "A STATUE IN YOUR MEMORY. REST IN PEACE AND TRY NOT" 10380 PRINT "TO THINK ABOUT PIGEONS!": g1
= 1: a1
= 0 11001 IF c5$
<> "DOCKED" THEN 11020 11010 PRINT "ENSIGN CHEKOV- 'BUT CAPTAIN, WE'RE ALREADY DOCKED!'" 11025 PRINT "SUBSPACE RADIO DAMAGED...CANNOT TRANSMIT.":
RETURN 11040 PRINT "LT. UHURA- 'CAPTAIN, I'M NOT GETTING ANY RESPONSE";
11050 n1
= n1
+ 1:
IF b6
= 0 THEN 11070 11070 d1 = 1.000000E+30
11080 FOR l
= 1 TO r3: x
= 10 * SQR((b2
(l
) - q1
) ^ 2 + (b3
(l
) - q2
) ^ 2) 11100 d1 = x: k = l
11120 q1
= b2
(k
): q2
= b3
(k
):
GOSUB 18000 11130 q$(s6, s7) = "."
11140 PRINT "STARBASE IN QUADRANT"; q1;
"-"; q2;
"RESPONDS --";
11145 PRINT " "; s5$;
" DEMATERIALIZES." 11146 p2 = (1 - 0.98 ^ d1) ^ 0.333333
11180 PRINT "ATTEMPT TO RE-MATERIALIZE THE "; s5$;
". . . . .";
11235 j
= b7
+ INT(3 * RND(1)) - 1 11250 IF q$
(i
, j
) = "." THEN 11270 11270 PRINT "SUCCEEDS.": s6
= i: s7
= j: q$
(i
, j
) = LEFT$(s5$
, 1) 12000 REM-HIT'EM
12001 p4 = 2: l5 = k3: n = 1
12030 d6
= 0.9 + 0.01 * RND(1): h2
= h3
(k
) * d6
^ k7
(n
) 12040 p3 = k6(n)
12050 p
= ABS(p3
):
IF p4
* h2
< p
THEN p
= p4
* h2
12060 k6
(n
) = p3
- SGN(p3
) * ABS(p
) 12070 x8 = k4(n): y8 = k5(n)
12100 PRINT FNR
(h2
);
"UNIT HIT ON ";
12110 m$ = q$(x8, y8)
12140 IF k6
(n
) <> 0 THEN 12180 12150 a5
= x8: a6
= y8: t2$
= q$
(x8
, y8
):
GOSUB 6000 12200 IF k6
(n
) > (0.4 + 0.4 * RND(1)) * p3
THEN 12240 12210 PRINT "***MR. SPOCK - 'CAPTAIN, THE VESSEL AT SECTOR";
12220 PRINT " HAS JUST LOST ITS FIREPOWER.'" 12230 k6(n) = -k6(n)
12240 n = n + 1
13001 j3 = 0
13010 IF d4
(7) <> 0 THEN 13250 13030 INPUT "ENTER COURSE AND DISTANCE "; d2
, d1
13050 p3 = 50 + 250 * d1
13080 PRINT "1ST OFFICER SPOCK- 'CAPTAIN, THE IMPULSE ENGINES" 13090 PRINT "REQUIRE 50 UNITS OF ENERGY TO ENGAGE, PLUS 250 UNITS" 13110 PRINT "QUADRANT. THEY ARE, THEREFORE, USELESS NOW.'":
RETURN 13120 PRINT "QUADRANT. WE CAN GO, THEREFORE, A MAXIMUM OF ";
13130 PRINT FNR
(4.000000E-03 * (e1
- 50) - 0.05);
"QUADRANTS.'":
RETURN 13140 t1 = d1 / 0.4
13160 PRINT "1ST OFFICER SPOCK- 'CAPTAIN, OUR SPEED UNDER IMPULSE" 13170 PRINT "POWER IS ONLY 4 SECTORS PER STARDATE. ARE YOU SURE" 13180 INPUT "WE DARE SPEND THE TIME' "; b$
13200 GOSUB 15000: j3
= 1 13220 e1 = e1 - p3
14001 n$ = " ###"
14010 IF d4
(2) <> 0 THEN 14180 14020 PRINT "L.R. SCAN FOR QUADRANT"; q1;
"-"; q2:
PRINT 14030 i = q1 - 1: j = q1 + 1: k = q2 - 1: l = q2 + 1
14070 IF d4
(11) = 0 THEN s2
(m
, n
) = 1 14160 PRINT "***WARNING*** - COMPUTER DISABLED - SCAN NOT RECORDED." 15001 a5 = (15 - d2) * 0.523599
15010 d4
= -SIN(a5
): d6
= COS(a5
) 15040 d4 = d4 / b8: d6 = d6 / b8: t5 = 0: t6 = 0
15050 IF d0
+ t1
< f1
(2) THEN 15080 15060 t5 = 1: c5$ = "RED": d1 = d1 * (f1(2) - d0) / t1 + 0.1
15070 t1 = f1(2) - d0 + 1.000000E-05
15080 q$
(s6
, s7
) = ".": x7
= s6: y7
= s7: h9
= INT(10 * d1
* b8
+ 0.5) 15102 x7
= x7
+ d4: x1
= INT(x7
+ 0.5): y7
= y7
+ d6: y1
= INT(y7
+ 0.5) 15105 IF (x1
< 1) OR (x1
> 10) THEN 15150 15106 IF (y1
< 1) OR (y1
> 10) THEN 15150 15108 IF q$
(x1
, y1
) = "O" THEN 15111 15109 IF q$
(x1
, y1
) <> "." THEN 15125 15111 d1
= 0.1 * SQR((s6
- x1
) ^ 2 + (s7
- y1
) ^ 2) 15112 s6 = x1: s7 = y1
15115 f4 = s6: f5 = s7
15116 IF q$
(x1
, y1
) <> "O" THEN 15320 15120 t2 = FNA(1): t3 = FNA(1)
15122 q1
= FNA
(1): q2
= FNA
(1): s6
= FNB
(1): s7
= FNB
(1):
PRINT 15123 PRINT "*** SPACE PORTAL ENTERED ***":
GOTO 15307 15125 t6
= 1: k
= 50 * d1
/ t1: d1
= 0.1 * SQR((s6
- x1
) ^ 2 + (s7
- y1
) ^ 2) 15127 IF (q$
(x1
, y1
) = "K") OR (q$
(x1
, y1
) = "C") THEN 15145 15132 PRINT " SECTOR"; x1;
"-"; y1;
"...." 15133 PRINT "EMERGENCY STOP REQUIRED"; FNR
(k
);
"UNITS OF ENERGY." 15135 e1 = e1 - k
15137 s6
= INT(x7
- d4
+ 0.5): f4
= s6: s7
= INT(y7
- d6
+ 0.5): f5
= s7
15145 s6
= x1: s7
= y1:
GOSUB 22000: f4
= s6: f5
= s7:
GOTO 15320 15156 f3
= SQR((x1
- k4
(l
)) ^ 2 + (y1
- k5
(l
)) ^ 2) 15158 k8
(l
) = 0.5 * (f3
+ k7
(l
)):
NEXT l
15165 x7 = 10 * (q1 - 1) + s6: y7 = 10 * (q2 - 1) + s7
15170 x1
= INT(x7
+ 10 * d1
* b8
* d4
+ 0.5) 15175 y1
= INT(y7
+ 10 * d1
* b8
* d6
+ 0.5): l6
= 0 15180 l5 = 0
15190 x1 = -x1 + 1: l5 = 1
15200 y1 = -y1 + 1: l5 = 1
15215 x1 = 161 - x1: l5 = 1
15225 y1 = 161 - y1: l5 = 1
15260 PRINT:
PRINT "*** MESSAGE FROM STARFLEET COMMAND.....STARDATE";
15262 PRINT "PERIMETER IS HEREBY DENIED.'" 15263 PRINT " 'SHUT DOWN ENGINES IMMMEDIATELY!'" 15265 PRINT "SCOTT HERE - 'ENGINES SHUT DOWN AT ";
15266 z1
= INT((x1
+ 9) / 10): z2
= INT((y1
+ 9) / 10) 15267 PRINT "QUADRANT"; z1;
"-"; z2;
", ";
15268 PRINT "SECTOR"; x1
- 10 * (z1
- 1);
"-"; y1
- 10 * (z2
- 1);
"'" 15295 q1
= INT((x1
+ 9) / 10): q2
= INT((y1
+ 9) / 10) 15296 s6 = x1 - 10 * (q1 - 1): s7 = y1 - 10 * (q2 - 1)
15310 PRINT:
PRINT "ENTERING THE "; g2$;
" QUADRANT ("; q1;
"-"; q2;
")" 15320 q$
(s6
, s7
) = LEFT$(s5$
, 1) 15340 f3
= SQR((f4
- k4
(l
)) ^ 2 + (f5
- k5
(l
)) ^ 2) 15350 k8(l) = 0.5 * (k7(l) + f3)
15360 k7(l) = f3
16000 REM-MOVECOM
16001 a = 1: b = 1
16020 c = k4(k): d = k5(k)
16030 IF q$
(c
, d
) = "C" THEN 16050 16050 n = 0: f = k6(k) + 100 * k3
16065 IF ((c5$
= "DOCKED") AND ((b4
<> q1
) OR (b5
<> q2
))) THEN n
= -s8
16080 t
= ABS(n
): p
= s6
- c: q
= s7
- d
16105 r = c: s = d: q$(c, d) = "."
16110 FOR l2
= 1 TO t: l
= r
+ p: m
= s
+ q
16130 IF q$
(l
, m
) = "." THEN 16195 16140 m = s + b
16155 IF q$
(l
, m
) = "." THEN 16195 16160 b = -b
16170 l = r + a
16185 IF q$
(l
, m
) = "." THEN 16195 16195 r = l: s = m
16205 q$(r, s) = "C"
16215 k4
(k
) = r: k5
(k
) = s: k7
(k
) = SQR((s6
- r
) ^ 2 + (s7
- s
) ^ 2) 16220 k8
(k
) = k7
(k
):
IF n
> 0 THEN PRINT "***COMMANDER ADVANCES TO ";
16240 i
= q1
+ INT((l
+ 9) / 10) - 1: j
= q2
+ INT((m
+ 9) / 10) - 1 16265 IF (c1
(l3
) = i
) AND (c2
(l3
) = j
) THEN 16350 16270 NEXT l3:
PRINT "***COMMANDER ESCAPES TO ";
16275 PRINT "QUADRANT"; i;
"-"; j;
" (AND REGAINS STRENGTH)" 16280 k4(k) = k4(k3): k5(k) = k5(k3): k7(k) = k7(k3): k8(k) = k8(k3)
16285 k6(k) = k6(k3): k3 = k3 - 1: c3 = 0
16310 g(q1, q2) = g(q1, q2) - 100: g(i, j) = g(i, j) + 100
16330 IF (c1
(l3
) = q1
) AND (c2
(l3
) = q2
) THEN 16340 16340 c1
(l3
) = i: c2
(l3
) = j:
RETURN 16350 a
= -a: b
= -b:
GOTO 16200 17001 c5$ = "GREEN"
17010 IF e1
< 1000 THEN c5$
= "YELLOW" 17020 IF g
(q1
, q2
) > 99 THEN c5$
= "RED" 18000 REM- NEW QUAD
18001 j4 = 1: b6 = 0: b7 = 0: k3 = 0: c3 = 0
18010 u = g(q1, q2)
18040 q$
(s6
, s7
) = LEFT$(s5$
, 1): u
= g
(q1
, q2
):
IF u
< 100 THEN 18150 18050 u
= u
- 100 * k3:
FOR a
= 1 TO k3
18060 s = FNB(1): k4(a) = s: t = FNB(1): k5(a) = t
18070 IF q$
(s
, t
) <> "." THEN 18060 18080 q$
(s
, t
) = "K": k7
(a
) = SQR((s6
- s
) ^ 2 + (s7
- t
) ^ 2): k8
(a
) = k7
(a
) 18115 IF (c1
(a
) = q1
) AND (c2
(a
) = q2
) THEN 18130 18130 q$
(s
, t
) = "C": k6
(k3
) = 400 * RND(1): c3
= 1 18160 u = u - 10
18170 b6
= FNB
(1): b7
= FNB
(1):
IF q$
(b6
, b7
) <> "." THEN 18170 18180 q$(b6, b7) = "B"
18210 s
= FNB
(1): t
= FNB
(1):
IF q$
(s
, t
) <> "." THEN 18210 18220 q$
(s
, t
) = "*":
NEXT a
18240 s
= FNB
(1): t
= FNB
(1):
IF q$
(s
, t
) <> "." THEN 18240 18250 q$
(s
, t
) = "O":
PRINT 18260 PRINT "MR. SPOCK - 'CAPTAIN, THE SHORT-RANGE SENSORS DETECT A" 18270 PRINT "SPACE WARP SOMEWHERE IN THIS QUADRANT.'" 18400 g4$
= "III": l
= 2:
IF q2
>= 5 THEN 18420 18410 l = 1
18420 g2$ = g1$(2 * (q1 - 1) + l): l = q2
18430 l = q2 - 4
18440 g3$
= "IV":
IF l
= 4 THEN 18460 18450 g3$
= LEFT$(g4$
, l
) 18460 g2$
= g2$
+ " " + g3$:
RETURN 19015 q$
(a5
, a6
) = ".":
PRINT "***STAR AT SECTOR"; a5;
"-"; a6;
"NOVAS." 19020 g(q1, q2) = g(q1, q2) - 1: s1 = s1 + 1
19025 b9 = 1: t6 = 1: t7 = 1: k = 0: x1 = 0: y1 = 0
19030 h4(b9, 1) = a5: h4(b9, 2) = a6
19045 j5 = h4(m, 1) + q - 2: j6 = h4(m, 2) + j - 2
19050 IF (j5
< 1) OR (j5
> 10) THEN 19260 19055 IF (j6
< 1) OR (j6
> 10) THEN 19260 19060 IF q$
(j5
, j6
) = "." THEN 19260 19065 IF q$
(j5
, j6
) = "O" THEN 19260 19070 IF q$
(j5
, j6
) <> "*" THEN 19105 19085 t7 = t7 + 1: h4(t7, 1) = j5: h4(t7, 2) = j6: g(q1, q2) = g(q1, q2) - 1
19090 s1
= s1
+ 1:
PRINT "***STAR AT SECTOR"; j5;
"-"; j6;
"NOVAS." 19105 IF q$
(j5
, j6
) <> "B" THEN 19140 19110 g
(q1
, q2
) = g
(q1
, q2
) - 10:
FOR v
= 1 TO r3
19115 IF (b2
(v
) <> q1
) OR (b3
(v
) <> q2
) THEN 19125 19120 b2(v) = b2(r3): b3(v) = b3(r3)
19125 NEXT v: r3
= r3
- 1: b6
= 0: b7
= 0: b1
= b1
+ 1:
GOSUB 17000 19130 PRINT "***STARBASE AT SECTOR"; j5;
"-"; j6;
"DESTROYED." 19140 IF (s6
<> j5
) OR (s7
<> j6
) THEN 19190 19145 PRINT "***STARSHIP BUFFETED BY NOVA.":
IF s4
<> 0 THEN 19155 19150 e1
= e1
- 1000:
GOTO 19170 19155 IF s3
>= 1000 THEN 19180 19160 d6
= 1000 - s3: e1
= e1
- d6:
GOSUB 17000: s3
= 0: s4
= 0 19165 PRINT "***STARSHIP SHIELDS KNOCKED OUT.": d4
(8) = 5.000000E-03 * d5
* RND(1) * d6
19180 s3 = s3 - 1000
19185 x1
= x1
+ s6
- h4
(m
, 1): y1
= y1
+ s7
- h4
(m
, 2): k
= k
+ 1:
GOTO 19260 19190 IF q$
(j5
, j6
) <> "C" THEN 19250 19200 IF (k4
(v
) = j5
) AND (k5
(v
) = j6
) THEN 19210 19210 k6
(v
) = k6
(v
) - 800:
IF k6
(v
) <= 0 THEN 19250 19215 n5 = j5 + j5 - h4(m, 1): n6 = j6 + j6 - h4(m, 2)
19220 PRINT "***COMMANDER AT SECTOR"; j5;
"-"; j6;
"DAMAGED";
19225 IF (n5
< 1) OR (n5
> 10) OR (n6
< 1) OR (n6
> 10) THEN 19245 19230 PRINT " AND BUFFETED TO SECTOR"; n5;
"-"; n6
19235 q$(n5, n6) = "C": k4(v) = n5: k5(v) = n6
19240 k7
(v
) = SQR((s6
- n5
) ^ 2 + (s7
- n6
) ^ 2): k8
(v
) = k7
(v
) 19241 q$(j5, j6) = "."
19250 a5
= j5: a6
= j6: t2$
= q$
(j5
, j6
):
GOSUB 6000:
GOTO 19260 19255 PRINT: q$
(j5
, j6
) = "." 19270 b9
= t6
+ 1: t6
= t7:
GOTO 19035 19290 d1 = k * 0.1
19320 i = 3 * (x1 + 1) + y1 + 2
19330 d2 = c5(i)
19360 PRINT:
PRINT "FORCE OF NOVA DISPLACES STARSHIP." 20000 REM-PHASERS
20001 p = 2: j3 = 1
20020 IF c5$
<> "DOCKED" THEN 20030 20025 PRINT "PHASERS CAN'T BE FIRED THRU BASE SHIELDS.":
GOTO 20080 20040 PRINT "PHASER BANKS DAMAGED.":
GOTO 20080 20055 PRINT "SHIELDS MUST BE DOWN TO FIRE PHASERS.":
GOTO 20080 20070 PRINT "MR. SPOCK - 'CAPTAIN, THE SHORT-RANGE SENSORS" 20075 PRINT " DETECT NO KLINGONS IN THIS QUADRANT.'" 20090 PRINT "PHASERS LOCKED ON TARGET. ENERGY AVAILABLE=";
20100 INPUT "UNITS TO FIRE "; p1:
IF p1
< e1
THEN 20120 20110 PRINT "ENERGY AVAILABLE =";:
GOTO 20095 20140 e1 = e1 - p1
20142 IF d4
(11) = 0 THEN 20147 20144 p1
= p1
* (RND(1) * 0.5 + 0.5) 20147 e
= p1:
IF k3
= 0 THEN 20310 20150 e = 0: t5 = (k3 * (k3 + 1)) / 2
20160 FOR i
= 1 TO k3: h3
(i
) = ((k3
+ 1 - i
) / t5
) * p1
20170 h5
(i
) = ABS(k6
(i
)) / (p
* 0.9 ^ k7
(i
)) 20180 IF h3
(i
) <= h5
(i
) THEN 20200 20190 e = e + (h3(i) - h5(i)): h3(i) = h5(i)
20220 FOR i
= 1 TO k3: r7
= h5
(i
) - h3
(i
) 20250 h3(i) = h5(i): e = e - r7
20270 h3(i) = h3(i) + e: e = 0
20310 PRINT FNR
(e
);
"EXPENDED ON EMPTY SPACE.": j3
= 1:
RETURN 21001 j3
= 1:
IF d4
(4) = 0 THEN 21015 21010 PRINT "PHOTON TUBES DAMAGED.":
GOTO 21035 21025 INPUT "TORPEDO COURSE "; c6
21040 INPUT "BURST OF 3 "; b$: n
= 1 21055 PRINT "NO BURST. ONLY"; t4;
"TORPEDOS LEFT.":
GOTO 21035 21060 INPUT "SPREAD ANGLE (3 - 30 DEG) "; g2
21062 IF (g2
< 3) OR (g2
> 30) THEN 21060 21063 g2 = FND(g2)
21065 n = 3
21075 IF c5$
<> "DOCKED" THEN t4
= t4
- 1 21080 z7
= z6: r
= RND(1) 21085 r
= (r
+ RND(1)) * 0.5 - 0.5 21090 IF (r
>= -0.4) AND (r
<= 0.4) THEN 21125 21095 r
= (RND(1) + 1.2) * r:
IF n
= 3 THEN 21105 21100 PRINT "***TORPEDO MISFIRES...":
GOTO 21110 21105 PRINT "***TORPEDO NUMBER"; z6;
"MISFIRES..." 21115 PRINT "***PHOTON TUBES DAMAGED BY MISFIRE." 21120 d4
(4) = d5
* (1 + 2 * RND(1)):
GOTO 21440 21125 IF (s4
<> 0) OR (c5$
= "DOCKED") THEN r
= r
+ 1.000000E-03 * s3
* r
21130 a3
= c6
+ 0.25 * r:
IF n
= 1 THEN 21140 21135 a8
= (15 - a3
+ (2 - z6
) * g2
) * 0.523599:
PRINT 21137 PRINT "TRACK FOR TORPEDO NUMBER"; z7;
"--":
GOTO 21145 21140 PRINT:
PRINT "TORPEDO TRACK --": a8
= (15 - a3
) * 0.523599 21145 x4
= -SIN(a8
): y4
= COS(a8
): b8
= ABS(x4
) 21150 x4 = x4 / b8: y4 = y4 / b8: x5 = s6: y5 = s7
21155 FOR l9
= 1 TO 15: x5
= x5
+ x4: a5
= INT(x5
+ 0.5) 21160 IF (a5
< 1) OR (a5
> 10) THEN 21430 21165 y5
= y5
+ y4: a6
= INT(y5
+ 0.5) 21170 IF (a6
< 1) OR (a6
> 10) THEN 21430 21180 PRINT FNR
(x5
);
"-"; FNR
(y5
);
", ";
21185 IF q$
(a5
, a6
) <> "." THEN 21195 21200 IF q$
(a5
, a6
) <> "C" THEN 21325 21210 PRINT "***COMMANDER AT SECTOR"; a5;
"-"; a6;
"USES ANTI-PHOTON";
21225 IF (a5
= k4
(v
)) AND (a6
= k5
(v
)) THEN 21235 21235 k
= k6
(v
): w3
= 200 + 800 * RND(1) 21245 k6
(v
) = k
- SGN(k
) * ABS(w3
):
IF k6
(v
) <> 0 THEN 21255 21250 t2$
= q$
(a5
, a6
):
GOSUB 6000:
GOTO 21435 21260 IF q$
(a5
, a6
) = "C" THEN PRINT "***COMMANDER AT";
21270 a7
= a8
+ 2.5 * (RND(1) - 0.5) 21280 x7
= -SIN(a7
) / w3: y7
= COS(a7
) / w3
21285 p
= INT(a5
+ x7
+ 0.5): q
= INT(a6
+ y7
+ 0.5) 21290 IF (p
< 1) OR (p
> 10) OR (q
< 1) OR (q
> 10) THEN 21320 21295 IF q$
(p
, q
) <> "." THEN 21320 21300 q$
(p
, q
) = q$
(a5
, a6
): q$
(a5
, a6
) = ".":
PRINT "DAMAGED--" 21305 PRINT " DISPLACED BY BLAST TO SECTOR"; p;
"-"; q
21310 k4
(v
) = p: k5
(v
) = q: k7
(v
) = SQR((s6
- p
) ^ 2 + (s7
- q
) ^ 2) 21311 k8(v) = k7(v)
21320 PRINT "DAMAGED, BUT NOT DESTROYED.":
GOTO 21435 21325 IF q$
(a5
, a6
) <> "B" THEN 21365 21330 PRINT "***STARBASE DESTROYED...CONGRATULATIONS...YOU TURKEY!" 21335 IF s2
(q1
, q2
) < 0 THEN s2
(q1
, q2
) = 0 21345 IF (b2
(w
) <> q1
) OR (b3
(w
) <> q2
) THEN 21355 21350 b2(w) = b2(r3): b3(w) = b3(r3)
21355 NEXT w: q$
(a5
, a6
) = ".": r3
= r3
- 1: b6
= 0: b7
= 0 21360 g
(q1
, q2
) = g
(q1
, q2
) - 10: b1
= b1
+ 1:
GOSUB 17000:
GOTO 21435 21365 IF q$
(a5
, a6
) <> "*" THEN 21405 21375 PRINT "***STAR AT SECTOR"; a5;
"-"; a6;
"UNAFFECTED BY PHOTON BLAST" 21385 x2
= a5: y2
= a6:
GOSUB 19000: a5
= x2: a6
= y2
21405 PRINT:
PRINT "AAAAAIIIIIIIEEEEEEEAAAAAAAUUUUUUGGGGGGGHHHHHHHHHH!!!" 21410 PRINT " HACK! HACK! COUGH! *CHOKE!*" 21415 PRINT:
PRINT "MR. SPOCK- 'FASCINATING!'": q$
(a5
, a6
) = "." 21420 t2
= 0: t3
= 0:
GOTO 21435 22020 PRINT "*** "; s5$;
" RAMS ";: w7
= 1:
IF q$
(s6
, s7
) = "C" THEN w7
= 2 22050 PRINT "SECTOR"; s6;
"-"; s7: a5
= s6: a6
= s7: t2$
= q$
(s6
, s7
) 22060 GOSUB 6000:
PRINT "***"; s5$;
" HEAVILY DAMAGED." 22070 k
= INT(5 + RND(1) * 20):
PRINT "***SICKBAY REPORTS"; k;
"CASUALTIES!" 22080 c4
= c4
+ k:
FOR l
= 1 TO 12: i
= RND(1) 22090 j
= (3.5 * w7
* (RND(1) + i
) + 1) * d5
22110 d4
(l
) = d4
(l
) + t1
+ j:
NEXT l: d4
(6) = d4
(6) - 3 22120 IF d4
(6) < 0 THEN d4
(6) = 0 23001 p
= d0
- j2:
IF (p
<> 0) AND (r1
= 0) THEN 23020 23020 n
= (k2
+ k1
) / p: k
= INT(500 * n
+ 0.5): l
= 0 23030 IF g1
<> 0 THEN l
= 100 * s8
23035 i = 0
23070 j = 10 * k1 + 50 * k2 + k + l - i - 100 * b1 - 100 * m - 35 * n1 - 3 * s1 - c4
23110 PRINT k1;
TAB(5);
"ORDINARY KLINGON(S) DESTROYED";
TAB(36);
10 * k1
23130 PRINT k2;
TAB(5);
"KLINGON COMMANDER(S) DESTROYED";
TAB(36);
50 * k2
23150 PRINT FNR
(n
);
TAB(5);
"KLINGONS PER STARDATE, AVERAGE";
23170 PRINT s1;
TAB(5);
"STAR(S) DESTROYED";
TAB(36);
-3 * s1
23190 PRINT b1;
TAB(5);
"STARBASES DESTROYED";
TAB(36);
-100 * b1
23210 PRINT n1;
TAB(5);
"SOS CALL(S) TO A STARBASE";
TAB(36);
-35 * n1
23230 PRINT c4;
TAB(5);
"CASUALTIES INCURRED";
TAB(36);
-c4
23250 PRINT m;
TAB(5);
"SHIP(S) LOST OR DESTROYED";
TAB(36);
-100 * m
23270 PRINT "PENALTY FOR GETTING YOURSELF KILLED";
TAB(36);
-200 23290 PRINT TAB(5);
"BONUS FOR WINNING "; s$
(s8
);
" GAME";
TAB(36); l
23300 PRINT TAB(5);
"-------------------------------------" 24000 REM-SETUP
24001 a2
= 0: g1
= 0:
GOSUB 4000: s5$
= "ENTERPRISE" 24010 i7 = 20000: e1 = i7: i8 = 2500: s3 = i8: s4 = 0: s9 = s4: j1 = 4: l1 = j1
24020 q1 = FNA(1): q2 = FNA(1): s6 = FNB(1): s7 = FNB(1): i9 = 10: t4 = i9
24030 w1
= 5: w2
= 25:
FOR i
= 1 TO 12: d4
(i
) = 0:
NEXT i
24040 j2
= 100 * INT(31 * RND(1) + 20): d0
= j2: k1
= 0: k2
= 0: n1
= 0: n2
= 0: r6
= 0: c4
= 0 24060 f1
(1) = d0
- 0.5 * i5
* LOG(RND(1)): f1
(5) = 1.000000E+30 24070 f1
(2) = d0
- 1.5 * (i5
/ r2
) * LOG(RND(1)): i6
= 0 24080 f1
(3) = d0
- 0.3 * i5
* LOG(RND(1)): f1
(4) = d0
- 0.3 * i5
* LOG(RND(1)) 24100 g
(i
, j
) = k:
NEXT j:
NEXT i: s1
= 0 24130 IF g
(x
, y
) >= 10 THEN 24120 24150 k
= i
- 1:
FOR j
= 1 TO k: d1
= SQR((b2
(j
) - x
) ^ 2 + (b3
(j
) - y
) ^ 2) 24180 b2
(i
) = x: b3
(i
) = y: s2
(x
, y
) = -1: g
(x
, y
) = g
(x
, y
) + 10:
NEXT i
24190 b1
= 0: k
= i1
- i4: l
= INT(0.25 * s8
* (9 - l2
) + 1) 24210 n = 100 * m
24220 x
= FNA
(1): y
= FNA
(1):
IF g
(x
, y
) + n
> 999 THEN 24220 24230 g
(x
, y
) = g
(x
, y
) + n: k
= k
- m:
IF k
<> 0 THEN 24200 24250 x
= FNA
(1): y
= FNA
(1):
IF (g
(x
, y
) < 99) AND (RND(1) < 0.75) THEN 24250 24260 IF g
(x
, y
) > 899 THEN 24250 24280 m
= i
- 1:
FOR j
= 1 TO m:
IF (c1
(j
) = x
) AND (c2
(j
) = y
) THEN 24250 24300 g
(x
, y
) = g
(x
, y
) + 100: c1
(i
) = x: c2
(i
) = y:
NEXT i
24310 t2
= FNA
(1): t3
= FNA
(1):
IF g
(t2
, t3
) < 100 THEN 24310 24330 PRINT "IT IS STARDATE"; i;
"...THE ORGANIAN PEACE TREATY BETWEEN" 24340 PRINT "THE UNITED FEDERATION OF PLANETS AND THE KLINGON EMPIRE" 24350 PRINT "HAS COLLAPSED AND THE FEDERATION IS BEING ATTACKED BY A" 24360 PRINT "DEADLY KLINGON INVASION FLEET. AS CAPTAIN OF THE" 24370 PRINT "U.S.S. ENTERPRISE, IT IS YOUR MISSION TO SEEK OUT AND" 24380 PRINT "DESTROY THIS INVASION FORCE OF"; i1;
"BATTLE CRUISERS." 24400 PRINT "STARDATES":
PRINT "TO COMPLETE YOUR MISSION." 24410 PRINT "AS THE MISSION PROCEEDS, YOU MAY BE GIVEN MORE TIME." 24440 PRINT "STARDATE.............."; i
24450 PRINT "NUMBER OF KLINGONS...."; i1
24460 PRINT "NUMBER OF STARDATES...";
INT(i5
) 24470 PRINT "NUMBER OF STARBASES..."; i2
24480 PRINT "STARBASE LOCATIONS....";
24520 PRINT "THE "; s5$;
" IS CURRENTLY IN THE "; g2$;
" QUADRANT." 25010 INPUT "WARP FACTOR "; k
25030 j = w1: w1 = k: w2 = w1 * w1
25040 IF (w1
<= j
) OR (w1
<= 6) THEN 25070 25070 PRINT "ENSIGN CHEKOV - 'WARP FACTOR"; w1;
"CAPTAIN'":
RETURN 25080 PRINT "ENGINEER SCOTT - 'AYE, BUT OUR MAXIMUM SAFE SPEED";
25110 PRINT "ENGINEER SCOTT-'AYE, CAPTAIN, BUT OUR ENGINES MAY NOT ";
25130 PRINT "ENGINEER SCOTT-'AYE, CAPTAIN, WE'LL GIVE IT A" 25140 PRINT "ENSIGN CHEKOV-'WE CAN'T GO BELOW WARP 1, CAPTAIN.'":
RETURN 25150 PRINT "ENSIGN CHEKOV-'OUR TO P SPEED IS WARP 10, CAPTAIN.'" 26001 j3
= 0:
IF d4
(8) <> 0 THEN 26600 26500 INPUT "SHIELDS ARE DOWN. DO YOU WANT THEM UP"; b$
26530 INPUT "SHIELDS ARE UP. DO YOU WANT THEM DOWN"; b$
26560 s4
= 1: s9
= 1:
IF c5$
<> "DOCKED" THEN e1
= e1
- 50 26590 s4
= 0: s9
= 1:
PRINT "SHIELDS LOWERED.": j3
= 1:
RETURN 26610 PRINT:
PRINT "SHIELDS USE UP LAST OF THE ENERGY." 27020 n
= n
- (g
(x
, y
) - INT(g
(x
, y
) / 10) * 10):
IF n
<= 0 THEN 27040 27040 IF (x
<> q1
) OR (y
<> q2
) THEN 27150 27060 n
= INT(RND(1) * (g
(x
, y
) - INT(g
(x
, y
) / 10) * 10)) + 1 27080 n
= n
- 1:
IF n
= 0 THEN 27100 27100 PRINT:
PRINT "*** RED ALERT!! RED ALERT!! ***" 27105 x3 = x2: y3 = y2
27110 PRINT "*** INCIPIENT SUPERNOVA DETECTED AT SECTOR"; x3;
"-"; y3
27120 x = q1: y = q2: k = (x2 - s6) ^ 2 + (y2 - s7) ^ 2
27140 PRINT "*** EMERGENCY AUTO -OVERRIDE JAMMED ***": a2
= 1:
GOTO 27180 27150 IF d4
(9) <> 0 THEN 27180 27160 PRINT:
PRINT "MESSAGE FROM STARFLEET COMMAND...STARDATE";
INT(d0
) 27170 PRINT "'SUPERNOVA IN QUADRANT"; x;
"-"; y;
27175 PRINT "....CAUTION ADVISED'" 27180 n
= g
(x
, y
): r
= INT(n
/ 100): q
= 0 27190 IF (x
<> q1
) OR (y
<> q2
) THEN 27210 27200 k3 = 0: c3 = 0
27220 r1
= r1
- r:
IF r2
= 0 THEN 27270 27230 FOR l
= 1 TO r2:
IF (c1
(l
) <> x
) OR (c2
(l
) <> y
) THEN 27260 27240 c1(l) = c1(r2): c2(l) = c2(r2): c1(r2) = 0: c2(r2) = 0
27250 r2
= r2
- 1: r
= r
- 1: q
= 1:
IF r2
= 0 THEN f1
(2) = 1.000000E+30 27280 FOR l
= 1 TO r3:
IF (b2
(l
) <> x
) OR (b3
(l
) <> y
) THEN 27300 27290 b2(l) = b2(r3): b3(l) = b3(r3): b2(r3) = 0: b3(r3) = 0: r3 = r3 - 1
27320 n
= g
(x
, y
) - INT(g
(x
, y
) / 100) * 100 27330 s1
= s1
+ (n
- INT(n
/ 10) * 10): b1
= b1
+ INT(n
/ 10) 27340 k1 = k1 + r: k2 = k2 + q
27350 IF (s2
(x
, y
) <> 0) AND (d4
(9) <> 0) THEN s2
(x
, y
) = 1000 + g
(x
, y
) 27360 IF (d4
(9) = 0) OR ((q1
= x
) AND (q2
= y
)) THEN s2
(x
, y
) = 1 27370 g(x, y) = 1000
27380 IF (r1
<> 0) OR ((x
= q1
) AND (y
= q2
)) THEN 27430 27390 PRINT:
PRINT "MR. SPOCK- 'CAPTAIN, A SUPERNOVA IN QUADRANT";
27400 PRINT x;
"-"; y;
"HAS JUST DESTROYED THE LAST OF THE KLINGONS.'" 28005 z4 = 0
28010 FOR o
= 1 TO k3
- 1:
IF k7
(o
) <= k7
(o
+ 1) THEN 28080 28020 k = k7(o): k7(o) = k7(o + 1): k7(o + 1) = k
28030 k = k8(o): k8(o) = k8(o + 1): k8(o + 1) = k
28040 k = k4(o): k4(o) = k4(o + 1): k4(o + 1) = k
28050 k = k5(o): k5(o) = k5(o + 1): k5(o + 1) = k
28060 k = k6(o): k6(o) = k6(o + 1): k6(o + 1) = k
28070 z4 = 1
29000 REM-SRSCAN
29001 IF d4
(1) <> 0 THEN 29230:
REM damage
? rhn
29040 ON i
GOTO 29050, 29060, 29080, 29090, 29140 29045 ON i
- 5 GOTO 29150, 29160, 29170, 29200, 29210 29050 PRINT " STARDATE "; FNR
(d0
):
GOTO 29220 29080 PRINT " POSITION "; q1;
"-"; q2;
", "; s6;
"-"; s7:
GOTO 29220 29090 PRINT " LIFE SUPPORT ";:
IF d4
(5) <> 0 THEN 29110 29110 IF c5$
<> "DOCKED" THEN 29130 29120 PRINT "DAMAGED, SUPPORTED BY STARBASE":
GOTO 29220 29130 PRINT "DAMAGED, RESERVES="; FNS
(l1
):
GOTO 29220 29140 PRINT " WARP FACTOR "; FNR
(w1
):
GOTO 29220 29170 PRINT " SHIELDS ";: b$
= "DOWN,":
IF s4
<> 0 THEN b$
= "UP," 29180 IF d4
(8) > 0 THEN b$
= "DAMAGED," 29200 PRINT " KLINGONS LEFT "; r1:
GOTO 29220 29210 PRINT " TIME LEFT "; FNS
(r5
) 30020 t1
= -0.5 * i5
* LOG(RND(1)) 30030 PRINT " FORWARD IN TIME"; FNR
(t1
);
"STARDATES." 30040 f1
(2) = f1
(2) + t1:
GOTO 30200 30050 m = d0: d0 = d9(1)
30060 PRINT "BACKWARD IN TIME"; FNR
(m
- d0
);
"STARDATES.": s0
= 0 30070 r1 = d9(2): r2 = d9(3): r3 = d9(4): r4 = d9(5): r5 = d9(6)
30080 s1 = d9(7): b1 = d9(8): k1 = d9(9): k2 = d9(10)
30090 FOR i
= 1 TO 8:
FOR j
= 1 TO 8: g
(i
, j
) = d9
(i
- 1 + 8 * (j
- 1) + 11):
NEXT j:
NEXT i
30100 FOR i
= 75 TO 84: c1
(i
- 74) = d9
(i
):
NEXT 30110 FOR i
= 85 TO 94: c2
(i
- 84) = d9
(i
):
NEXT 30120 FOR i
= 95 TO 99: b2
(i
- 94) = d9
(i
):
NEXT 30130 FOR i
= 100 TO 104: b3
(i
- 99) = d9
(i
):
NEXT: b4
= d9
(105): b5
= d9
(106) 30140 f1
(1) = d0
- 0.5 * i5
* LOG(RND(1)) 30160 f1
(3) = d0
- 0.5 * i5
* LOG(RND(1)) 30190 PRINT "SPOCK HAS RECONSTRUCTED A CORRECT STAR CHART FROM MEMORY." 31001 j3 = 0
31010 IF d4
(12) <> 0 THEN 31120 31020 INPUT "NUMBER OF UNITS TO SHIELDS "; z3
31040 IF e1
+ s3
- z3
> 0 THEN 31060 31050 PRINT "SCOTT HERE- 'WE ONLY HAVE"; FNR
(e1
+ s3
);
"UNITS LEFT.'" 31060 e1
= e1
+ s3
- z3: s3
= z3:
PRINT "--ENERGY TRANSFER COMPLETE--" 31070 PRINT "(SHIP ENERGY="; FNR
(e1
);
" SHIELD ENERGY="; FNR
(s3
);
")" 31075 j3 = 1
31080 t1
= 0.1: p5
= (k3
+ 4 * c3
) / 48:
IF p5
< 0.1 THEN p5
= 0.1 32001 INPUT "WHICH DIRECTION "; z
32014 PRINT "DIRECTIONS ARE FROM 0 TO 12 ONLY":
GOTO 32001 32020 t1
= 0.05: p
= (k3
+ 4 * c3
) / 48:
IF p
< 0.05 THEN p
= 0.05 32080 d5
= INT((z
/ 12) * 8 + 1.5):
IF d5
> 8 THEN d5
= 1 32087 v$
(3, 3) = LEFT$(s5$
, 1) 32090 ON d5
GOTO 32100, 32130, 32150, 32170, 32190, 32220, 32260, 32300 32100 i
= s6
- 2: j
= s7
- 2: v$
(1, 1) = q$:
IF (j
> 0) AND (i
> 0) THEN v$
(1, 1) = q$
(i
, j
) 32110 i
= s6
- 1: j
= s7
- 1: v$
(2, 2) = q$:
IF (i
> 0) AND (j
> 0) THEN v$
(2, 2) = q$
(i
, j
) 32120 n
= n
+ 1:
IF n
= 3 THEN 32350 32125 i
= s6
- 2: v$
(1, 2) = q$:
IF (i
> 0) AND (j
> 0) THEN v$
(1, 2) = q$
(i
, j
) 32130 i
= s6
- 2: v$
(1, 3) = q$:
IF i
> 0 THEN v$
(1, 3) = q$
(i
, s7
) 32135 i
= s6
- 1: v$
(2, 3) = q$:
IF i
> 0 THEN v$
(2, 3) = q$
(i
, s7
) 32140 n
= n
+ 1:
IF n
= 3 THEN 32350 32145 i
= s6
- 2: j
= s7
+ 1: v$
(1, 4) = q$:
IF (i
> 0) AND (j
< 11) THEN v$
(1, 4) = q$
(i
, j
) 32150 i
= s6
- 2: j
= s7
+ 2: v$
(1, 5) = q$:
IF (i
> 0) AND (j
< 11) THEN v$
(1, 5) = q$
(i
, j
) 32155 i
= s6
- 1: j
= s7
+ 1: v$
(2, 4) = q$:
IF (i
> 0) AND (j
< 11) THEN v$
(2, 4) = q$
(i
, j
) 32160 n
= n
+ 1:
IF n
= 3 THEN 32350 32165 j
= s7
+ 2: v$
(2, 5) = q$:
IF (i
> 0) AND (j
< 11) THEN v$
(2, 5) = q$
(i
, j
) 32170 j
= s7
+ 2: v$
(3, 5) = q$:
IF j
< 11 THEN v$
(3, 5) = q$
(s6
, j
) 32175 j
= s7
+ 1: v$
(3, 4) = q$:
IF j
< 11 THEN v$
(3, 4) = q$
(s6
, j
) 32180 n
= n
+ 1:
IF n
= 3 THEN 32350 32185 i
= s6
+ 1: j
= s7
+ 2: v$
(4, 5) = q$:
IF (i
< 11) AND (j
< 11) THEN v$
(4, 5) = q$
(i
, j
) 32190 i
= s6
+ 2: j
= s7
+ 2: v$
(5, 5) = q$:
IF (i
< 11) AND (j
< 11) THEN v$
(5, 5) = q$
(i
, j
) 32195 i
= s6
+ 1: j
= s7
+ 1: v$
(4, 4) = q$:
IF (i
< 11) AND (j
< 11) THEN v$
(4, 4) = q$
(i
, j
) 32200 n
= n
+ 1:
IF n
= 3 THEN 32350 32210 i
= s6
+ 2: v$
(5, 4) = q$:
IF (i
< 11) AND (j
< 11) THEN v$
(5, 4) = q$
(i
, j
) 32220 i
= s6
+ 2: v$
(5, 3) = q$:
IF i
< 11 THEN v$
(5, 3) = q$
(i
, s7
) 32230 i
= s6
+ 1: v$
(4, 3) = q$:
IF i
< 11 THEN v$
(4, 3) = q$
(i
, s7
) 32240 n
= n
+ 1:
IF n
= 3 THEN 32350 32250 i
= s6
+ 2: j
= s7
- 1: v$
(5, 2) = q$:
IF (i
< 11) AND (j
> 0) THEN v$
(5, 2) = q$
(i
, j
) 32260 i
= s6
+ 2: j
= s7
- 2: v$
(5, 1) = q$:
IF (i
< 11) AND (j
> 0) THEN v$
(5, 1) = q$
(i
, j
) 32270 i
= s6
+ 1: j
= s7
- 1: v$
(4, 2) = q$:
IF (i
< 11) AND (j
> 0) THEN v$
(4, 2) = q$
(i
, j
) 32280 n
= n
+ 1:
IF n
= 3 THEN 32350 32290 j
= s7
- 2: v$
(4, 1) = q$:
IF (i
< 11) AND (j
> 0) THEN v$
(4, 1) = q$
(i
, j
) 32300 j
= s7
- 2: v$
(3, 1) = q$:
IF j
> 0 THEN v$
(3, 1) = q$
(s6
, j
) 32310 j
= s7
- 1: v$
(3, 2) = q$:
IF j
> 0 THEN v$
(3, 2) = q$
(s6
, j
) 32320 n
= n
+ 1:
IF n
= 3 THEN 32350 32330 i
= s6
- 1: j
= s7
- 2: v$
(2, 1) = q$:
IF (i
> 0) AND (j
> 0) THEN v$
(2, 1) = q$
(i
, j
) 32360 IF (v$
(i
, 1) = " ") AND (v$
(i
, 3) = " ") AND (v$
(i
, 5) = " ") THEN 32390 33001 j3
= 0:
INPUT "HOW MANY STARDATES"; z5
33030 r6 = 1
33060 t1 = z5: z6 = z5
33080 t1
= 1 + RND(1):
IF z5
< t1
THEN t1
= z5
33090 z6 = t1
33130 z5
= z5
- z6:
GOTO 33040 34001 j3
= 0:
IF d4
(6) <> 0 THEN 34750 34010 INPUT "ENTER COURSE AND DISTANCE "; d2
, d1
34030 p
= (d1
+ 0.05) * w1
* w1
* w1
* (s4
+ 1):
IF p
< e1
THEN 34150 34040 j3
= 0:
PRINT:
PRINT "ENGINEERING TO BRIDGE--" 34050 IF (s4
= 0) OR (0.5 * p
> e1
) THEN 34080 34060 PRINT " WE HAVEN'T THE ENERGY TO GO THAT FAR WITH";
34080 w
= INT((e1
/ (d1
+ 0.05)) ^ 0.333333):
IF w
<= 0 THEN 34130 34090 PRINT " WE HAVEN'T THE ENERGY. BUT WE COULD DO IT AT WARP"; w
34130 PRINT " WE CAN'T DO IT, CAPTAIN. WE HAVEN'T GOT THE ENERGY." 34150 t1
= 10 * d1
/ w2:
IF t1
< 0.8 * r5
THEN 34500 34160 PRINT:
PRINT "MR. SPOCK - 'CAPTAIN, I COMPUTE THAT SUCH A TRIP" 34170 PRINT " WILL REQUIRE APPROXIMATELY"; FNR
(100 * t1
/ r5
);
34180 PRINT "PERCENT":
PRINT " OF OUR REMAINING TIME. ARE YOU SURE ";
34500 q4
= 0: w
= 0:
IF w1
<= 6 THEN 34660 34510 p
= d1
* (6 - w1
) ^ 2 / 66.66666:
IF p
> RND(1) THEN q4
= 1 34530 w
= 0:
IF w1
< 10 THEN 34550 34560 a
= (15 - d2
) * 0.5236: x1
= -SIN(a
): x2
= COS(a
) 34580 x1
= x1
/ b8: y1
= y1
/ b8: n
= INT(10 * d1
* b8
+ 0.5): x
= s6: y
= s7
34610 x
= x
+ x1: q
= INT(x
+ 0.5):
IF (q
< 1) OR (q
> 10) THEN 34660 34620 y
= y
+ y1: r
= INT(y
+ 0.5):
IF (r
< 1) OR (r
> 10) THEN 34660 34630 IF q$
(q
, r
) = "." THEN 34650 34640 q4 = 0: w = 0
34670 e1
= e1
- d1
* w1
* w1
* w1
* (s4
+ 1):
IF e1
> 0 THEN 34690 34715 PRINT "'WE'VE JUST BLOWN THE WARP ENGINES." 34720 PRINT " WE'LL HAVE TO SHUT 'ER DOWN HERE, CAPTAIN.'" 34725 d4
(6) = d5
* (3 * RND(1) + 1) 35001 ON SGN(d4
(10)) + 2 GOTO 35010, 35030, 35020 35010 PRINT "YE FAERIE QUEENE HAS NO SHUTTLE CRAFT.":
RETURN 35030 PRINT:
PRINT "***ABANDON SHIP! ABANDON SHIP!" 35050 PRINT "YOU AND THE BRIDGE CREW ESCAPE IN THE GALILEO." 35060 PRINT "THE REMAINDER OF THE CREW BEAMS DOWN" 35070 PRINT "TO THE NEAREST HABITABLE PLANET.":
IF r3
<> 0 THEN 35090 35090 PRINT:
PRINT "YOU ARE CAPTURED BY KLINGONS AND RELEASED TO " 35100 PRINT "THE FEDERATION IN A PRISONER-OF-WAR EXCHANGE." 35110 PRINT "STARFLEET PUTS YOU IN COMMAND OF ANOTHER SHIP," 35120 PRINT "THE FAERIE QUEENE WHICH IS ANTIQUATED, BUT" 35130 PRINT "STILL USABLE.": n
= INT(RND(1) * r3
+ 1): q1
= b2
(n
): q2
= b3
(n
) 35140 s6
= 5: s7
= 5:
GOSUB 18000: q$
(s6
, s7
) = "." 35150 IF (s6
< 1) OR (s7
> 10) THEN 35180 35160 s7
= INT(3 * RND(1) - 1 + b7
):
IF (s7
< 1) OR (s7
> 10) THEN 35180 35170 IF q$
(s6
, s7
) = "." THEN 35190 35190 s5$
= "FAERIE QUEENE": q$
(s6
, s7
) = LEFT$(s5$
, 1): c5$
= "DOCKED" 35200 FOR l
= 1 TO 12: d4
(l
) = 0:
NEXT: d4
(10) = -1: e1
= 3000: i7
= e1
35210 s3 = 1500: i8 = s3: t4 = 6: i9 = t4: l1 = 3: j1 = l1: s4 = 0: w1 = 5: w2 = 25
36001 IF d4
(11) = 0 THEN 36030 36010 PRINT "COMPUTER DAMAGED - CANNOT EXECUTE DESTRUCT SEQUENCE" 36040 PRINT "IDENTIFICATION-POSITIVE" 36050 PRINT "SELF-DESTRUCT-SEQUENCE-ACTIVATED": j
= 3 36070 PRINT "ENTER-YOUR-MISSION-PASSWORD-TO -CONTINUE" 36080 PRINT "SELF-DESTRUCT-SEQUENCE-OTHERWISE-DESTRUCT" 36090 PRINT "SEQUENCE-WILL-BE-ABORTED" 36110 PRINT "PASSWORD-ACCEPTED": j
= 10 36130 PRINT:
PRINT "*****ENTROPY OF "; s5$;
" MAXIMIZED*****" 36150 w
= 20 * e1:
FOR l
= 1 TO k3:
IF k6
(l
) * k7
(l
) > w
THEN 36170 36160 a5
= k4
(l
): a6
= k5
(l
): t2$
= q$
(a5
, a6
):
GOSUB 6000 36190 PRINT "PASSWORD-REJECTED" 40010 REM filling
spc$ with spaces
' The auxiliary functions.