20 HIMEM: 35070:ADRS = 35070: CALL ADRS: POKE 232,0: POKE 233,145: DEF FN DG(H) = (H / 360 - INT (H / 360)) * 360: DEF FN D(H) = FN DG( FN DG(H + 360)): DEF FN RD(X) = INT (X + .5): DEF FN RN(X) = INT ( RND (1) * X + 1):VA$ = CHR$ (129):VN$ = CHR$ (142):VI$ = CHR$ (137):VP$ = CHR$ (144):VY$ = CHR$ (153):VV$ = CHR$ (150):VW$ = CHR$ (151):VK$ = CHR$ (139):VL$ = CHR$ (140) 40 DEF FN RF(X) = ((3700 - X) / 3700) ^ 2.86: SCALE= 1: ROT= 0: VTAB (2): PRINT VA$0VN$VK$:K$(1) = "DETAS":K$(2) = "MILAS":K$(3) = "KAMAS": DEF FN RF(X) = ((3700 - X) / 3700) ^ .285 # HS is amount of damage dealt to USS Ranger shield N : FOR I = 1 TO 4:HS(I) = 0: NEXT I # clear screen, jump into main loop : GOSUB 25000: GOSUB 15000 # bail : PRINT VA$0VN$VK$: PRINT CHR$ (4);"BLOAD CHAIN,A520": CALL 520"DAMAGE": STOP ### main loop: for each enemy ship 15000 REM 15010 FOR SH = 1 TO 3:T9 = 0: IF K(SH) = 0 THEN 15900 # set VH to zero -- this indicates amount of damage inflicted to enemy this turn 15015 VH(SH) = 0 # T1 = number of torps being fired at this target 15120 T2 = 0:T1 = 0: FOR I = 1 TO 6: IF F(I + 3) = SH THEN T1 = T1 + 1 # T2 = number of positrons being fired at this target 15150 IF I < 5 AND F(I) = SH THEN T2 = T2 + 1 15160 NEXT I:T9 = 0: IF T1 = 0 AND T2 = 0 THEN 15500 # we're firing weapons at this ship; draw grid, and set T9 so we don't redraw grid later 15180 T9 = 1:T3 = 1:T8 = 0:T7 = 0: GOSUB 36000: GOSUB 40000 # compute torpedo damage; T7 means at least one hit, T8 means target destroyed : GOSUB 27000 # draw torpedo animation : GOSUB 22000: IF T7 THEN GOSUB 23500 # if T8 set, vegan ship destroyed 15230 IF T8 THEN GOSUB 23600: GOTO 15900 # assess positron damage; note 27500 does not set T8 (calls "destroyed" anim at 23600 directly) # (which means an enemy destroyed by positrons will continue until the check on K(SH) on line 15500) 15240 T7 = 0:T8 = 0: GOSUB 27500: IF T8 THEN 15900 # (can't get here with T8 set; 15270 is probably vestigial) 15270 IF T8 THEN GOSUB 23600: GOTO 15900 # enemy turn; (B1 and CB = 6) means we bluffed and they bought it # also, no attack if ship destroyed or all enemy crew is dead after our attack 15500 IF (B1 AND CB = 6) OR KC(SH) < = 0 OR K(SH) = 0 THEN 15900 # if energy allocated to shield facing the enemy is zero AND our speed is zero AND 50% chance AND not firing weapons AND nav is manual # they we have successfully played "possum" 15510 IF AL(XS(SH)) = 0 AND FS = 0 AND RND (1) < .5 AND F(1) = 0 AND F(2) = 0 AND F(3) = 0 AND F(4) = 0 AND F(0) = 0 AND EP = 0 THEN 15900 # fire enemy torpedos; T7 set to number of hits 15770 T3 = - 1:T7 = 0:T8 = 0:T6 = 0: GOSUB 28000: GOSUB 22000: IF T7 THEN GOSUB 24000 # if Ranger dead, branch 15810 IF T8 THEN 29000 # fire positrons; note we don't check if ship was destroyed (28500 goes directly to "destroyed" animation at 29000) 15840 T7 = 0:T8 = 0:T6 = 0: GOSUB 28500 15900 NEXT SH: RETURN 20540 CALL 520"BYE" ### draw torpedo animation # T3=1 for outbound torps, T3=-1 for inbound (enemy) torps 22000 REM 22200 PRINT VA$1VK$VN$;:Y = 60: IF T1 = 0 THEN 22299 22208 IF T3 = 1 THEN VTAB (5): HTAB (1): PRINT VA$1VL$;"FIRING";: VTAB (6): HTAB (1): PRINT "TORPEDOES AWAY" 22209 PRINT VK$;: IF T3 = 1 THEN FOR I = 4 TO 17 STEP 2.7 22215 IF T3 = - 1 THEN FOR I = 17 TO 4 STEP - 2.7 22220 HCOLOR= 6:Z$ = "Y": IF T1 > 4 THEN GOSUB 22900 22230 IF T1 > 2 THEN GOSUB 22910 22235 GOSUB 22920: IF T1 > 1 THEN GOSUB 22930 22245 IF T1 > 3 THEN GOSUB 22940 22250 IF T1 = 6 THEN GOSUB 22950 22255 POKE 2048,I * 11: POKE 2049,25: CALL 2050: HCOLOR= 0:Z$ = " ": IF T1 > 4 THEN GOSUB 22900 22270 IF T1 > 2 THEN GOSUB 22910 22273 GOSUB 22920: IF T1 > 1 THEN GOSUB 22930 22278 IF T1 > 3 THEN GOSUB 22940 22280 IF T1 = 6 THEN GOSUB 22950 22290 NEXT I 22299 RETURN # draw erase/torps 22900 VTAB (10): HTAB (I): PRINT Z$;: RETURN 22910 VTAB (19 - (I / 2)): HTAB (I): PRINT Z$;: RETURN 22920 VTAB (19 - (I / 2.3)): HTAB (I / 2 + 10): PRINT Z$;: RETURN 22930 VTAB (19 - (I / 2.3)): HTAB (40 - (I / 2 + 10)): PRINT Z$;: RETURN 22940 VTAB (19 - (I / 2.0)): HTAB (40 - I): PRINT Z$;: RETURN 22950 VTAB (10): HTAB (40 - I): PRINT Z$;: RETURN ### show positron animation # T3=1 for Ranger firing, -1 for enemy firing 23000 REM 23002 IF T3 = 1 THEN VTAB (5): HTAB (1): PRINT VA$1VL$;"CHARGING" 23005 FOR X = 210 TO 200 STEP - .5: POKE 2048,X: POKE 2049,3: CALL 2050: NEXT X: IF T3 = 1 THEN FOR X = 200 TO 30 STEP - 7 23009 IF T3 = - 1 THEN FOR X = 30 TO 200 STEP 7 23010 POKE 2048,X: POKE 2049,3: CALL 2050: NEXT X: IF T3 = 1 THEN VTAB (6): PRINT VA$(1)"POSITRONS FIRING" 23040 HCOLOR= 1: IF T3 = 1 THEN HCOLOR= 2 23050 GOSUB 23100: HCOLOR= 4: GOSUB 23100: RETURN 23100 IF T3 = 1 THEN X3 = 8:X4 = 10 23102 IF T3 = - 1 THEN X3 = 135:X4 = 0 23105 IF T3 = 1 THEN FOR I = 140 TO 80 STEP - 10 23107 IF T3 = - 1 THEN FOR I = 90 TO 140 STEP 10 23110 X1 = (152 - I) * 1.73 + 8:X2 = (I - 72) / 7.6: HPLOT X3,I + 10 * T3 TO X1,I: HPLOT X3 + X4,I + 10 * T3 TO X1 + X2,I: HPLOT 280 - X3,I + 10 * T3 TO 280 - X1,I: HPLOT 280 - X3 - X4,I + 10 * T3 TO 280 - X1 - X2,I: POKE 2048,80: POKE 2049,3: CALL 2050:X3 = X1:X4 = X2: NEXT I: RETURN ### show "target hit" animation 23500 REM 23510 VTAB (10): PRINT VA$1VN$VK$;: FOR X = 1 TO 30: HTAB (19): PRINT VI$" ";: HTAB (19): PRINT VN$;"Q";: POKE 2048, FN RN(50) + 100: POKE 2049,5: CALL 2050: NEXT X: PRINT VA$4;: RETURN ### Vegan ship destroyed # if all destroyed, jumps to victory instead of returning 23600 REM 23610 CALL 2115: CALL 2115: CALL 2115: GOSUB 35000: PRINT VI$VP$;: FOR X1 = 1 TO 15: POKE 2048, FN RN(50) + 150: POKE 2049,10: CALL 2050: NEXT X1: PRINT VN$VP$;: CALL 2115: GOSUB 36000: PRINT VA$4;VN$;: VTAB (10): HTAB (10): PRINT K$(SH);" IS DESTROYED.":K(SH) = 0: FOR X = 1 TO 1000: NEXT X: IF K(1) = 0 AND K(2) = 0 AND K(3) = 0 THEN FOR X = 1 TO 1000: NEXT X: GOTO 29500 23690 RETURN ### invert hi-res screen 10x 24000 REM 24010 FOR I = 1 TO 10: CALL 2115: NEXT I: RETURN # clear screen 25000 REM 25010 POKE 2072,170: POKE 2073,213: CALL 2074: GOSUB 36000: GOSUB 38000: RETURN ### compute torpedo damage to enemy ship SH; set T7 if at least one hit # sets T8=1 if ship destroyed 27000 REM 27010 X = 0:X7 = 0 # X from 0 to 5 27020 IF F(4 + X) < > SH THEN X = X + 1: GOTO 27105 # X0 is spread for this tube, X5 is index into arrays 27025 X0 = SP(X):X5 = 4 + X:X1 = 0 # increment X1 for each ship that is targeting ship SH and has the same spread # (firing 3 with spread 3, then 3 with spread 3, is equivalent to 6 with spread 3) 27030 IF X5 < 10 THEN IF F(X5) = SH AND SP(X5 - 4) = X0 THEN X5 = X5 + 1:X1 = X1 + 1: GOTO 27030 # advance X so we don't fire the same tube more than once 27040 X = X + X1 # for each tube, check for hit, adding 20% to chance if tube was locked :X3 = 0: FOR X4 = 1 TO X1:X9 = 0: IF LW(3 + X - X1 + X4) THEN X9 = .2 # X3 gets the number of torps that hit 27070 IF RND (1) < PW(SH,3 + X0) + X9 THEN X3 = X3 + 1 27080 NEXT X4 # cap to max hit : IF X3 > MH(SH,X0 + 3) THEN X3 = MH(SH,X0 + 3) # overwrite X7 with X3 (bug -- should add to X7?) 27100 X7 = X3 27105 IF X < 6 THEN 27020 # (end of X loop) # damage in X8 is equal to 50 pts for each torp that hit (X7) # automatically kill 1-N crew 27110 X8 = X7 * 50:KC(SH) = KC(SH) - FN RN(X7 * 2): IF KC(SH) < 0 THEN KC(SH) = 0:SD(SH) = 1 27140 IF X7 > 0 THEN T7 = 1 # adjust enemy shield energy by damage 27150 KP(SH,YS(SH)) = KP(SH,YS(SH)) - X8: IF KP(SH,YS(SH)) < 0 THEN K(SH) = 0:T8 = 1 # update damage inflicted 27155 VH(SH) = VH(SH) + X8 27190 RETURN ### assess positron damage to enemy ship SH 27500 REM 27510 X6 = 0 # loop X6 from 1 to 4 27520 X7 = 0: IF F(X6) < > SH THEN X6 = X6 + 1: GOTO 27655 # boost chance of hit by 20% if positron was locked 27530 IF LW(X6) THEN PW(SH,X6) = PW(SH,X6) + .2 # if hit, compute damage and store in X7 # random damage is computed 4x, then the average is taken (to reduce variability?) 27540 IF RND (1) < = PW(SH,X6) THEN X5 = 0: FOR X2 = 1 TO 4:X0 = RND (1):X5 = X5 + MH(SH,X6) * X0 + FN RN((1 - X0) * 1000) / 1000 * MH(SH,X6): NEXT X2:X7 = FN RD(X5 / 4) # update damage inflicted 27545 VH(SH) = VH(SH) + X7 # reduce specified shield by X7 27550 KP(SH,YS(SH)) = KP(SH,YS(SH)) - X7 # show positron animation; if damage was done, show hit animation : GOSUB 23000: IF X7 THEN GOSUB 23500 # if shield went negative, ship is destroyed 27580 IF KP(SH,YS(SH)) < 0 THEN GOSUB 23600:K(SH) = 0: GOTO 27690 # otherwise, reduce enemy crew based on damage dealt 27590 KC(SH) = KC(SH) - FN RD( FN RN(X7 / 12)): IF KC(SH) < = 0 THEN KC(SH) = 0:SD(SH) = 1 27650 X6 = X6 + 1 27655 IF X6 < 4 THEN 27520 # (end of X6 loop) 27690 RETURN ### determine if enemy ship fires torpedos, compute damage # T9 means Ranger already attacked, so don't redraw UI # sets T1 to number of torps fired # sets T6 to 1 if weapons fired? # sets T7 to number of torpedos that hit # sets T8 to 1 if Ranger destroyed # uses value in X8? 28000 REM 28001 PRINT VA$1VK$;:X1 = 0:W2 = 0:W3 = 0:W8 = 0: IF KP(SH,5) < 25 THEN 28290 # max torps limited by weapon power and ship class 28020 X = INT (KP(SH,5) / 25): IF X > 3 + KT(SH) THEN X = 3 + KT(SH) 28040 X = X - K2(SH): IF X < 1 OR DK(SH) > 5000 THEN 28290 # small chance of not firing if total damage received exceeds power to the # facing shield... simulating damage? 28043 IF RND (1) < .1 AND KP(SH,YS(SH)) - VH(SH) < - 180 THEN 28290 # close range, fire 3-6 torps 28045 IF DK(SH) < 1500 THEN W2 = FN RN(4) + 2 # long range, fire 0-3 torps 28048 IF DK(SH) > = 1500 THEN W2 = FN RN(4) - 1 28049 IF W2 = 0 THEN 28290 # fire torps 28050 IF W2 > X THEN W2 = X # cap count, or boost to max, at close range 28070 IF W2 > X OR DK(SH) < 500 THEN W2 = X # set X1 to 1 or, if the target shield energy is low, X8 (bug - whence X8??) 28080 X1 = 1: IF EN(XS(SH)) < 50 THEN X1 = X8 # small chance of firing purely random number of torps with random X1 28190 IF RND (1) < .09 THEN W2 = FN RN(X):X1 = FN RN(W2) # compute X8 based on X1 and distance 28200 T7 = 0:X8 = 7 - INT (6 / (7 - X1) + 1 / ((DK(SH) + 1) * 250)): IF X8 < 1 THEN X8 = 1 # set W2 to min(X,X8,W2), possibly reducing it based on this other factor 28230 IF X8 > X THEN X8 = X 28235 IF W2 > X8 THEN W2 = X8 # set X2 to odds of torpedo hit; EV is evasive action; OF(W2) appears to be a spread modifier # (RS(SH) is a predicted distance value set by INFO2) 28240 X2 = SQR ((5400 - DK(SH)) / 5000 * FN RF(RS(SH)) * .8 * (1 - EV)) * OF(W2):T6 = 1: IF T9 = 0 THEN GOSUB 36000: GOSUB 40000 # set T7 to number of torpedos that hit 28250 FOR X = 1 TO W2: IF RND (1) < = X2 THEN T7 = T7 + 1 28270 NEXT X # if hit, update HS(); if HS() exceeds current *or allocated* shield energy, Ranger dies :HS(XS(SH)) = HS(XS(SH)) + T7 * 50: IF HS(XS(SH)) > EN(XS(SH)) OR HS(XS(SH)) > AL(XS(SH)) THEN T8 = 1 # set K2 to number of torps fired, reduce KP(n,5) by 20 per torp fired 28290 K2(SH) = W2:KP(SH,5) = KP(SH,5) - W2 * 20:T1 = W2: RETURN ### determine if enemy ship fires positrons, compute damage # T9 means Ranger already attacked, so don't redraw UI # sets T8 to 1 if Ranger destroyed # sets T6 to 1 if weapons fired 28500 REM # if (15% chance AND shield power is less than damage dealt this turn), or there's not enough power, or this is a destroyer # (which apparently doesn't have a rear-firing positron), or we're more than 1500 away, don't fire 28505 T5 = 1: IF ( RND (1) < .15 AND KP(SH,YS(SH)) - VH(SH) < - 180) OR KP(SH,5) < 20 OR (KT(SH) = 1 AND YS(SH) = 4) OR DK(SH) > 1500 THEN 28790 # T5 is number of positrons firing; for shield 1, number of positrons that can fire is equal to ship class 28520 IF YS(SH) = 1 AND KP(SH,5) > = 20 * KT(SH) THEN T5 = KT(SH) # compute positron damage (Y3), based on shield strength # compute chance to hit (T4), based on distance and evasive # if chance to hit is low, or damage dealt is low on a strong shield, don't bother 28530 Y3 = 180 - KP(SH,YS(SH)) / 10:T4 = SQR ((1700 - DK(SH)) * .001) * FN RF(RS(SH)) * .8 * (1 - EV): IF (T4 < .6 AND RND (1) < T4 / 2) OR (Y3 < 30 AND EN(XS(SH)) > 100) THEN 28790 # draw grid if not already on screen 28540 IF T9 = 0 THEN GOSUB 36000: GOSUB 40000 # adjust weapon system power 28560 T6 = 1:KP(SH,5) = KP(SH,5) - T5 * 20 # fire T5 positrons, cutting damage in half for each positron after the first (only shield 1 allows multiple shots, so this is pos 2/3) : FOR T0 = 1 TO T5: IF T0 = 2 THEN Y3 = Y3 / 2 # show animation 28580 GOSUB 23000 # if hit, update HS(); if HS() exceeds current *or allocated* shield energy, Ranger dies : IF RND (1) < = T4 THEN HS(XS(SH)) = HS(XS(SH)) + Y3: GOSUB 24000: IF HS(XS(SH)) > EN(XS(SH)) OR HS(XS(SH)) > AL(XS(SH)) THEN T8 = 1: GOTO 29000 28590 NEXT T0 28790 RETURN ### USS Ranger is destroyed 29000 REM 29005 FOR I = 1 TO 2: POKE 2072,255: POKE 2073,255: CALL 2074: POKE 2072,170: POKE 2073,213: CALL 2074: NEXT I: PRINT VY$;VA$4;: VTAB (12): HTAB (6): PRINT VK$VI$;" THE USS RANGER IS DESTROYED! "; 29007 EG = - 1 29010 PRINT VA$0VN$VK$: PRINT CHR$ (4)"BLOAD CHAIN,A520" 29020 CALL 520"BYE" 29090 GOTO 29090 ### victory 29500 REM 29510 PRINT VN$VA$4VK$;: GOSUB 36000: VTAB (10): HTAB (3): PRINT "ALL VEGAN SHIPS ARE DESTROYED!" 29520 PRINT VA$0VN$VK$ 29525 EG = 2 29530 GOTO 29010 ### set window to (2,2) - (39,19) 35000 PRINT VN$;: PRINT VY$;: VTAB (19): HTAB (39): PRINT VW$;: VTAB (2): HTAB (2): PRINT VV$;: RETURN ### set window to (2,2) - (39,19), and clear it 36000 GOSUB 35000: PRINT VP$;: RETURN ### set window to (2,21) - (39,23) 37000 PRINT VN$VY$;: VTAB (23): HTAB (39): PRINT VW$;: VTAB (21): HTAB (2): PRINT VV$;: RETURN ### set window to (2,21) - (39,23), and clear it 38000 GOSUB 37000: PRINT VI$VP$;: RETURN ### scanning, tracking, targeting # "scanning" reads grid positions from DATA statements, converts them to positions based on facing of enemy ship 40000 X2 = 10:X9 = 270:X3 = 12:X0 = 149: RESTORE :T0 = 0: VTAB (2): HTAB (1): PRINT VA$1VL$VN$"SCANNING ";VK$"EEEEEEEEEEE";:X4 = 63:DR = 3.1459 / 180:Z7 = 215:Z8 = 70:Z9 = 215:W9 = Z7 / 1.5:Y4 = 113:Y8 = Z9 / 2:T9 = 1: VTAB (19): HTAB (1): PRINT VL$"DISTANCE: ";DK(SH);: GOSUB 45000: PRINT VK$; 40090 Y0 = - 135: FOR Z = 1 TO X4: READ W6,Y7,Y1:GX(Z) = W9 + W6 / 10 * Z7:GY(Z) = Y4 + Y1 / 10 * Z8:GZ(Z) = Y4 + Y7 / 10 * Z9: NEXT Z:X8 = FN D(XA(SH) - 180):X8 = X8 * DR: GOSUB 50000: GOSUB 40790 # adjust GX/GY/GZ values by W9/Y4/Y8 40095 FOR Z = 1 TO X4: GOSUB 50000:Z1 = GX(Z) - W9:Z4 = GY(Z) - Y4:Z6 = GZ(Z) - Y8: GOSUB 40740:GX(Z) = W0:GY(Z) = Y5:GZ(Z) = Y9: NEXT Z # do "tracking" and "targeting" : HCOLOR= 6: GOSUB 40370: GOSUB 35000: RETURN ### "tracking" draws grid 40370 REM 40385 VTAB (3): HTAB (1): PRINT VL$;"TRACKING";:X1 = 1:X5 = 0: GOSUB 40560:X5 = 1: FOR X1 = 2 TO 22: GOSUB 40560: NEXT X1:X1 = 23:X5 = 0: GOSUB 40560:X5 = 1: FOR X1 = 24 TO 44: GOSUB 40560: NEXT X1:X5 = 0:X1 = 45: GOSUB 40560 # "targeting" draws enemy ship, then white central rectangle on grid :X5 = 1: VTAB (4): HTAB (1): PRINT "TARGETING"; 40450 HCOLOR= 5: FOR X1 = 46 TO 49: GOSUB 40560: NEXT X1 :X5 = 0:X1 = 50: GOSUB 40560:X5 = 1:X1 = 51: GOSUB 40560:X1 = 52: GOSUB 40560:X1 = 53: GOSUB 40560:X5 = 0:X1 = 54: GOSUB 40560:X5 = 1: HCOLOR= 7: FOR X1 = 55 TO 58: GOSUB 40560: NEXT X1:X5 = 0:X1 = 59: GOSUB 40560:X5 = 1: FOR X1 = 60 TO 63: GOSUB 40560: NEXT X1: RETURN ### draw part of the grid, identified by X1 (set X5 to 1 to draw central bit in white) 40560 REM 40570 Z1 = GX(X1) - 150:Z4 = GY(X1) - 120:Z5 = GZ(X1) - Y0:X6 = SQR (Z1 * Z1 + Z4 * Z4 + Z5 * Z5):W2 = Z1 / X6:W3 = Z4 / X6:W1 = Z5 / X6:X7 = X6 * ( - Y0) / Z5:W7 = 140 + W2 * X7:Y2 = 77 + W3 * X7: IF X5 = 1 THEN 40710 40680 IF (W7 > X2 AND W7 < X9) AND (Y2 > X3 AND Y2 < X0) THEN HPLOT W7,Y2 40690 W8 = W7:Y3 = Y2: GOTO 40730 # 40710 CO = 0: IF X1 = 3 OR X1 = 15 OR X1 = 19 OR X1 = 23 OR X1 = 24 OR X1 = 28 OR X1 = 32 OR X1 = 36 THEN HCOLOR= 7:CO = 1 40715 HPLOT W7,Y2 TO W8,Y3: HPLOT W7 + 1,Y2 + 1 TO W8 + 1,Y3 + 1:: POKE 2048,40: POKE 2049,10: CALL 2050 40720 IF CO THEN HCOLOR= 6 40725 Y3 = Y2:W8 = W7 40730 RETURN ### compute W0, Y5, Y9 from C(n,m) and various 40740 REM 40750 W0 = W9 + Z1 * C(1,1) + Z4 * C(2,1) + Z6 * C(3,1):Y5 = Y4 + Z1 * C(1,2) + Z4 * C(2,2) + Z6 * C(3,2):Y9 = Y8 + Z1 * C(1,3) + Z4 * C(2,3) + Z6 * C(3,3): RETURN ### assign C(1-3,1-3) from angle in X8 40790 REM 40800 W4 = COS (X8):W5 = SIN (X8):C(1,1) = W4:C(1,2) = 0:C(1,3) = - W5:C(2,1) = 0:C(2,2) = 1:C(2,3) = 0:C(3,1) = W5:C(3,2) = 0:C(3,3) = W4: RETURN 40910 DATA -5,-5,-5,-5,5,-5,5,5,-5: DATA 5,-5,-5,-5,-5,-5,-5,-3,-5: DATA 5,-3,-5,5,-1,-5,-5,-1,-5: DATA -5,1,-5,5,1,-5,5,3,-5: DATA -5,3,-5: DATA -5,5,-5,-3,5,-5,-3,-5,-5: DATA -1,-5,-5,-1,5,-5,1,5,-5: DATA 1,-5,-5,3,-5,-5,3,5,-5 40990 DATA 3,5,5,5,5,5,5,-5,5: DATA -5,-5,5,-5,5,5,3,5,5: DATA 3,-5,5,1,-5,5,1,5,5: DATA -1,5,5,-1,-5,5,-3,-5,5: DATA -3,5,5,-5,5,5,-5,3,5: DATA 5,3,5,5,1,5,-5,1,5: DATA -5,-1,5,5,-1,5,5,-3,5: DATA -5,-3,5 41070 DATA -.5,-1,1.5,0,1,1.5: DATA .5,-1,1.5,0,-1,0,-.5,-1,1.5: DATA 0,-1,0,0,1,1.5: DATA 0,-1,-1.5,0,-1,0: DATA 1,-1,5,-1,-1,5,-1,1,5,1,1,5,1,-1,5: DATA 1,-1,-5,-1,-1,-5,-1,1,-5,1,1,-5,1,-1,-5 ### print basic ship info (id, shield facings) 45000 REM 45005 GOSUB 37000: VTAB (21): HTAB (2): PRINT VI$VA$4VK$;"SHIP ";VN$" ";VI$;: HTAB (18): PRINT "FACING SHIELD ";VN$" "VI$;: VTAB (23): HTAB (10): PRINT "TARGET'S SHIELD ";VN$;" ";: VTAB (21): HTAB (8): PRINT VA$1VL$K$(SH);: HTAB (33): PRINT XS(SH);: VTAB (23): HTAB (27): PRINT YS(SH);: RETURN ### animation during "scanning" 50000 VTAB (2): HTAB (T0 + 11): PRINT "E";:T0 = T0 + 1: IF T0 > 10 THEN T0 = 0 50020 VTAB (2): HTAB (T0 + 11): PRINT "F";: POKE 2048,T0 * 20: POKE 2049,5: CALL 2050: RETURN