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) 30 POKE 2072,85: POKE 2073,42: CALL 2074: VTAB (2): HTAB (5): PRINT VA$4VK$VN$;" STARSHIP COMMANDER EVALUATION " 130 GOSUB 39000: PRINT VP$; # read ranks 600 FOR Z = 1 TO 12: READ W$(Z): NEXT Z # D holds score; compute basic enemy stuff 1000 D = 0: GOSUB 20000 # end-of-game requested -or- everybody on all ships is dead : IF EG = 1 THEN D = 1000 + D: GOSUB 21000 # all Vegan ships destroyed 1020 IF EG = 2 OR EG = 4 THEN D = 3000 + D: GOSUB 21000 # Vegan commander surrenders 1030 IF EG = 3 THEN D = 8000 + D: GOSUB 21000 # we surrendered -- replace score with points for surviving crew 1040 IF EG = - 2 THEN D = CM(0,0) * 10 # ??? EG = 4 not used? DA is number of turns 1043 IF EG = 4 THEN D = D + DA * 40 # add 2000 pts if we were victorious and had more than 30 crewmembers 1045 IF EG > 0 AND CM(0,0) > 30 THEN D = D + 2000 # Y4 is rank, Y3 is class 1050 Y4 = (D - 2000) / 3000:Y3 = 3 - INT ((Y4 - INT (Y4)) * 3):Y4 = INT (Y4) 1080 IF Y4 < 1 THEN Y4 = 1:Y3 = 3 1090 IF Y4 > 12 THEN Y4 = 12:Y3 = 1 1094 HCOLOR= 0 1095 ON Y4 GOSUB 25100,25200,25300,25400,25500,25600,25700,25800,25900,26000,26100,26200 1100 VTAB (10): HTAB (4): PRINT VA$4VI$VK$"YOUR RANK IS ";W$(Y4): PRINT TAB( 17);"CLASS ";Y3: VTAB (15): HTAB (4): PRINT "YOUR SCORE IS " INT (D)" POINTS" 1110 VTAB (20): HTAB (6): PRINT "PRESS BUTTON FOR A NEW GAME":Y = 5:Z = 1:Z(1) = 20: GOSUB 41000 1120 PRINT VA$0VK$VN$: PRINT CHR$ (4)"RUN INTRO" 9999 GOTO 9999 ### score our kills # if we unsuccessfully attempted surrender, F1 will be 1... bug? # loop over all ships, add (ship size)*1500 + 7000 for each kill 20000 FOR Z = 1 TO F1: IF K(Z) = 0 AND VR(Z) = 0 THEN D = D + KT(Z) * 1500 + 7000: GOTO 20050 # add power drained from live enemy ships 20030 D = D + (MK(Z,0) - KP(Z,0)) / 2.5 + (200 - KC(Z)) * 5 # add (ship size)*500 for each out-of-range ship 20040 IF VR(Z) = 1 THEN D = D + KT(Z) * 500 20050 NEXT Z: RETURN ### add points for energy/crew in Ranger # add points for energy in undamaged systems 21000 FOR Z = 1 TO 15:D = D + EN(Z) / 3: IF Z < 13 AND D(Z) = 0 THEN D = D + 40 21030 NEXT Z # add points for surviving crew 21035 IF CM(0,0) = 0 THEN 21090 21040 FOR Z = 1 TO 4 21050 FOR Z1 = 1 TO 3 21060 D = D + CE(Z,Z1) * 7 * CM(Z,Z1) + CO(Z,Z1) * 2 21070 NEXT Z1 21080 NEXT Z 21090 RETURN 25100 HPLOT 135,40 TO 155,40 TO 155,50 TO 135,50 TO 135,40: RETURN 25200 X = 125: GOSUB 26300: RETURN 25300 X = 108: GOSUB 26300:X = 142: GOSUB 26300: RETURN 25400 X = 110: GOSUB 26300:X = 140: GOSUB 26300: HPLOT 125,45 TO 155,45: RETURN 25500 GOSUB 25400: HPLOT 125,45 TO 140,30 TO 155,45: RETURN 25600 GOSUB 25500: HPLOT 111,65 TO 169,65 TO 169,68 TO 111,68 TO 111,65: RETURN 25700 X = 133: GOSUB 26400: RETURN 25800 X = 120: GOSUB 26400:X = 143: GOSUB 26400: RETURN 25900 X = 115: GOSUB 26400:X = 133: GOSUB 26400:X = 151: GOSUB 26400: RETURN 26000 X = 105: GOSUB 26400:X = 121: GOSUB 26400:X = 139: GOSUB 26400:X = 157: GOSUB 26400: RETURN 26100 X = 133: GOSUB 26400: HPLOT 130,38 TO 130,25 TO 110,38 TO 130,38: HPLOT 150,38 TO 150,25 TO 170,38 TO 150,38: RETURN 26200 X = 134: GOSUB 26400: HPLOT 140,35 TO 150,64 TO 130,64 TO 140,35: HPLOT 120,45 TO 130,64 TO 130,60 TO 120,45: HPLOT 150,60 TO 160,45 TO 150,64 TO 150,60: RETURN 26300 HPLOT X,60 TO X + 15,45 TO X + 30,60 TO X,60: RETURN 26400 HPLOT X,38 TO X + 7,25 TO X + 13,38 TO X - 2,30 TO X + 16,30 TO X,38: RETURN 37000 PRINT VY$: VTAB (22): HTAB (39): PRINT VW$;: VTAB (4): HTAB (2): PRINT VV$;VA$4VI$: RETURN 38000 PRINT VY$: VTAB (23): HTAB (39): PRINT VW$;: VTAB (4): HTAB (2): PRINT VV$;: RETURN 39000 GOSUB 38000: PRINT VA$4VI$VK$;VP$;: RETURN 41000 REM 41006 PRINT VY$VA$1VK$VI$;:Z1$ = "J":Y3 = - 1: FOR Z2 = 1 TO Z: IF Z(Z2) > 0 AND Y3 > 0 THEN X1 = Z2: GOTO 41030 41016 IF Z(Z2) > 0 THEN Y3 = Z2 41020 NEXT Z2:X1 = Y3 41030 Z1 = 250 / Z: FOR Z2 = 1 TO Z: HTAB (Y + 1): VTAB ( ABS (Z(Z2))): PRINT "E";: NEXT Z2 41079 X = INT ( PDL (0) / Z1 + .5): IF X > Z THEN X = Z 41080 IF X < 1 THEN X = 1 41081 IF Z2 > 20 THEN HTAB (Y): VTAB ( ABS (Z(X1))): PRINT " ";: POKE 2048,X1 * 5 + 50: POKE 2049,15: CALL 2050:Z2 = 0: HTAB (Y): PRINT "L"; 41082 Z2 = Z2 + 1: IF X < 1 THEN X = 1 41085 IF PEEK ( - 16287) > 127 THEN 41180 41090 IF Z(X) < 1 THEN GOTO 41079 41100 IF X1 < > X THEN HTAB (Y): VTAB (Z(X1)): PRINT " "; 41105 X1 = X: HTAB (Y): VTAB (Z(X)): PRINT "L";: GOTO 41079 41180 IF X1 < 1 THEN 41185 41183 HTAB (Y): VTAB (Z(X1)): PRINT " F"; 41185 GOSUB 45000:X = X1: RETURN 43005 X2 = X2 + 1: IF X2 > 15 THEN VTAB (20): HTAB (6): PRINT VA$1VK$"L";: HTAB (34): PRINT "M":X2 = 0: POKE 2048,100: POKE 2049,30: CALL 2050 43010 IF X2 = 7 THEN VTAB (20): HTAB (6): PRINT " ";: HTAB (34): PRINT " "; 43020 IF PEEK ( - 16287) < 128 THEN 43005 43030 GOSUB 45000: PRINT VA$4VK$VI$;: RETURN 45000 POKE 2048,30: POKE 2049,30: CALL 2050: POKE 2048,80: POKE 2049,50: CALL 2050: RETURN 50000 DATA CREWPERSON , ENSIGN , LIEUTENANT , LIEUTENANT COMMANDER , COMMANDER , CAPTAIN , COMMODORE , REAR ADMIRAL ,VICE ADMIRAL , ADMIRAL , SECTOR ADMIRAL , FLEET ADMIRAL