home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Glitch Apple Disk Collection
/
2014.glitch.apple.collection.zip
/
indexed
/
IMPERIUM.DSK
/
IMPROD.bas
< prev
next >
Wrap
BASIC Source File
|
2014-09-09
|
21KB
|
346 lines
1 REM IMPROD
2 Q = 0:Q1 = 1:Q2 = 2:Q3 = 3:Q4 = 4:Q5 = 5:Q6 = 6:Q7 = 7:Q8 = 8:Q9 = 9:B4 = 16:B5 = 32:B6 = 64:B7 = 128:B8 = 256
3 C = 20:C1 = 50:C2 = 255:C3 = 10:C4 = 14:C5 = 28:C6 = 100:C7 = 75:C8 = 74:C9 = 13:CA = 21:CB = 22:CC = 15:CD = 11
5 DIM S(7),N(9):S$ = "BFGKM"
6 U1 = 2816:U3 = 2819:U5 = 2822:U6 = 2825:U7 = 2828:U8 = 2831:U9 = 2834
7 UA = 2837:UB = 2840:UC = 2843:UD = 2846:UE = 2849:UF = 2852:UG = 2933:UH = 2855:UI = 2858:UJ = 2861:UK = 2864
8 UL = 2867:UM = 22790:UN = 2870
9 D = 16384:D1 = 17884:D2 = 18584:D3 = 19608:D4 = 21656:D5 = 21912:D6 = 21932
10 D8 = 22144:D9 = 22297:DA = 22272:DB = 768:DC = 22528
11 M = 785:M1 = 22365:M2 = 22369:M3 = 791:M4 = 22275:M5 = 796:M6 = 22366:M7 = 8:M8 = 900
20 GOTO 10000
21 HTAB H +Q1: VTAB V +Q1: RETURN
22 FOR Z = 1 TO 500: NEXT : RETURN
23 FOR K = Q5 TO C9: PRINT CHR$( PEEK(SA +K));: NEXT K: RETURN
24 PRINT "PRESS ANY KEY TO CONTINUE.";
25 POKE -16368,0
26 IF PEEK( -16384) <B7 THEN 26
27 KY = PEEK( -16384) -B7: POKE -16368,Q: RETURN
28 K = Q:K1 = D9 +W *17: IF W = Q4 THEN PRINT "INDEPENDENT WORLD";: RETURN
29 IF PEEK(K1 +K) = B5 AND PEEK(K1 +K +Q1) = B5 THEN 31
30 PRINT CHR$( PEEK(K1 +K));:K = K +Q1: IF K <17 THEN 29
31 RETURN
32 CALL U5: HTAB Q1: VTAB CA: RETURN
33 K1 = D8 +W *B5 +Q4 *S1: FOR K = Q TO Q3: PRINT CHR$( PEEK(K1 +K));: NEXT K: RETURN
43 K = Q:R1 = Q:K1 = DC +W *B5
44 TF = PEEK(K1 +K): IF TF = B5 THEN 47
45 IF TF <B5 OR EN THEN R1 = R1 + PEEK(D2 +W *B8 +TF *Q8)
46 K = K +Q1: IF K <B5 THEN 44
47 RETURN
48 IF ((Y < = PEEK(DA +CC) AND Y < >Q) OR (Y > = PEEK(DA +C9) AND Y < >19)) AND K2 = Q2 THEN K2 = Q3
49 IF ((X < = PEEK(DA +C4) AND X < >Q) OR (X > = PEEK(DA +12) AND X < >39)) AND K2 = Q2 THEN K2 = Q3
50 RETURN
64 HTAB 36: VTAB V +Q1: PRINT " ";: HTAB 36: PRINT N;: RETURN
100 K = X:K1 = Y:K2 = Q4
101 IF KY = 56 OR KY = 50 OR KY = 49 THEN K1 = K1 -Q1: IF K2 < >Q1 THEN K2 = Q2: IF K1 <Q1 THEN K2 = Q1
102 IF KY = 52 OR KY = 53 OR KY = 54 THEN K1 = K1 +Q1: IF K2 < >Q1 THEN K2 = Q2: IF K1 >18 THEN K2 = Q1
103 IF KY = 50 OR KY = 51 OR KY = 52 THEN K = K +Q1: IF K2 < >Q1 THEN K2 = Q2: IF K >38 THEN K2 = Q1
104 IF KY = 54 OR KY = 55 OR KY = 56 THEN K = K -Q1: IF K2 < >Q1 THEN K2 = Q2: IF K <Q1 THEN K2 = Q1
105 IF K2 = Q2 THEN POKE DA +Q8,X: POKE DA +Q9,Y: CALL U3:X = K:Y = K1
106 GOTO 48
108 POKE M7, PEEK(PA +Z): POKE M4,W: CALL UH:Z = PEEK(M7): RETURN
109 HTAB 34: VTAB Q1: PRINT " ";: HTAB 26
110 PRINT "IO POOL:";PP: HTAB 17: VTAB Q2: PRINT " ";: HTAB Q3: PRINT "MILITARY POOL:";DP: POKE PA +Q6,DP: RETURN
111 POKE M4 +1,MP +1: CALL UL:TU = PEEK(M) + PEEK(M +Q1) *B8: RETURN
112 FOR P = Q TO C8: GOSUB 128: IF W2 < >MP AND W1 < >MP THEN 116
113 N = PEEK(19 +PA) - PEEK(PA +Q5): IF N <Q1 THEN 116
114 K = INT(PP/Q5): IF K <N THEN N = K
115 POKE PA +Q5, PEEK(PA +Q5) +N:PP = PP -N *Q5: IF PP <Q5 THEN P = C8
116 NEXT P: RETURN
120 GOSUB 32: PRINT "WHAT PLANET NUMBER (1,2 OR X)?": GOSUB 25: IF KY = 88 THEN P = C7: GOTO 127
121 P = KY -48: IF P <Q1 OR P >Q2 THEN P = C7: GOTO 127
122 P = PEEK(SA +P) - INT( PEEK(SA +P)/B7) *B7: IF P = C7 THEN 127
123 PA = D +P *C:W2 = INT( PEEK(PA +Q9)/B5):W1 = PEEK(PA +Q9) -W2 *B5 -Q1:W2 = W2 -Q1:PE = Q
124 IF W2 = Q4 THEN PE = Q1: GOTO 127
125 IF W2 <Q THEN PE = Q2: GOTO 127
126 IF W2 < >MP THEN PE = Q3:W = MP: GOSUB 2000: IF TF = B5 THEN PE = Q2
127 RETURN
128 PA = D +P *C:W2 = INT( PEEK(PA +Q9)/B5) -Q1:W1 = C3: IF W2 = Q4 THEN W1 = PEEK(PA +B4) -Q1
129 RETURN
200 HGR : POKE DA +Q8,X: POKE DA +Q9,Y: POKE M4 +Q1,MP: POKE DA +CD,C3: CALL U1 +MT *12
201 POKE DA +Q8,X: POKE DA +Q9,Y: CALL U3
202 GOSUB 32: CALL U6:S = PEEK(DA +Q2): IF S = C1 THEN 205
204 SA = S *C4 +D1: GOSUB 23:S1 = PEEK(SA): PRINT " CLASS:"; MID$ (S$,S1,Q1);" LOOK AT": PRINT P$
205 HTAB 35: VTAB CB: PRINT "812": PRINT "TYPE 1-8 TO MOVE THE CURSOR,"
206 HTAB 35: VTAB 23: PRINT "7 3":N$ = "(T)ACTICAL": IF MT THEN N$ = "(S)TRATEGIC"
207 PRINT N$;" MAP OR (Q)UIT?";: HTAB 35: VTAB 24: PRINT "654";
208 GOSUB 25: IF (KY = 84 AND NOT MT) OR (KY = 83 AND MT) THEN MT = Q1 -MT: GOTO 200
209 GOSUB 100: ON K2 -Q1 GOTO 201,200
210 RETURN
217 GOSUB 21: PRINT N$;" ";: GOSUB 21: PRINT I$;: INVERSE : RETURN
218 I$ = STR$(DV):K = Q1: GOSUB 217: GOSUB 21: PRINT LEFT$(I$,Q1);: GOTO 220
219 GOSUB 217: PRINT " ";
220 NORMAL : GOSUB 25: IF KY = 13 THEN 229
221 ON H <29 OR K >Q1 OR V >13 GOTO 223: IF KY = 82 THEN I$ = "R": GOTO 229
222 IF KY = 83 THEN I$ = "S": GOTO 229
223 IF KY = Q8 AND K >Q1 THEN 228
224 K1 = KY -48: IF K1 <Q OR K1 >Q9 THEN 220
225 IF K > LEN(N$) THEN 218
226 IF K = Q1 THEN I$ = ""
227 K = K +Q1:I$ = I$ + STR$(K1): GOTO 219
228 ON K = Q2 GOTO 218:K = K -Q1:I$ = LEFT$(I$,K -Q1): GOTO 219
229 GOSUB 217: NORMAL : RETURN
231 IF K +K >PN THEN HTAB Q1: VTAB CA: PRINT "INSUFFICIENT ACTIVE INDUSTRY!": GOTO 234
232 K2 = CT:CT = CT *K: IF CT < = PP AND (CT < = DP OR HM = Q2) THEN 235
233 GOSUB 32: PRINT "INSUFFIENT IO'S!"
234 CT = Q: GOSUB 22: CALL U5
235 RETURN
240 IF HV > = MX THEN 258
241 DV = HV: GOSUB 218
244 N = VAL(I$):CT = N -HV: IF CT <Q THEN 240
246 IF NOT CT THEN 258
248 K = HC: ON HM GOSUB 231,232
250 IF NOT CT THEN 240
252 IF HV +K2 >MX THEN GOSUB 32: PRINT "YOU CAN'T HAVE THAT MANY!": GOSUB 234: GOTO 240
254 HV = HV +K2:PP = PP -CT: IF HM = Q1 THEN DP = DP -CT
256 GOSUB 109
258 GOSUB 21: PRINT " ";: GOSUB 21: PRINT HV;: RETURN
302 W = MP:TF = -1
303 GOSUB 2020: IF TF <B5 THEN ON ( PEEK(TA) = C2 AND S1 = C3) +Q1 GOTO 310,303
304 TF = Q
305 TA = D2 +TF *Q8 +W *B8: IF PEEK(TA +Q7) <C3 THEN TF = TF +Q1: IF TF <B5 THEN 305
306 IF TF = B5 THEN 320
308 FOR K = Q TO Q7: POKE TA +K,Q: NEXT K: POKE TA +Q4,S: POKE TA +Q5,S
310 IF S1 = C3 THEN 320
311 S2 = Q:S3 = D3 +512 *MP
312 IF PEEK(S3 +S2) THEN S2 = S2 +Q2: IF S2 <512 THEN 312
314 IF S2 <510 THEN POKE S3 +S2, PEEK(D5 +12 +MP) *B5 +25: POKE S3 +S2 +Q1,S1 *B5 +TF
320 RETURN
322 HV = ( INT( PEEK(PA +Q9)/B5) = PEEK(PA +Q9) - INT( PEEK(PA +Q9)/B5) *B5): RETURN
2000 TF = Q
2010 TA = D2 +W *B8 +TF *Q8: IF PEEK(TA +Q7) <Q9 AND PEEK(TA +Q5) = S THEN 2030
2020 TF = TF +Q1: IF TF <B5 THEN 2010
2030 RETURN
2040 EN = Q: HOME : TEXT : VTAB 15: PRINT "TASK FORCES:":TF = Q:K = Q:K1 = DC +B5 *W
2050 TA = D2 +W *B8 +TF *Q8: IF PEEK(TA +Q7) >Q9 OR PEEK(TA +Q4) < >S THEN 2090
2060 HTAB (K - INT(K/Q9) *Q9) *Q4 +Q1: VTAB INT(K/Q9) +B4
2070 POKE K +K1,TF:K = K +Q1
2080 IF PEEK(TA +Q7) = Q9 THEN INVERSE
2085 PRINT TF -B6 *(TF >B5) +Q1;: NORMAL
2090 TF = TF +Q1: IF TF <B5 THEN 2050
2100 IF K <B5 THEN POKE K +K1,B5
2110 HTAB Q1: VTAB Q1: GOSUB 28: HTAB Q1: VTAB Q3: PRINT "TYPE NUM EFF"
2113 POKE DA +96,127: POKE M4,W: FOR S1 = Q TO Q7: POKE M5,S1: CALL U9
2115 HTAB Q1: VTAB Q4 +S1: GOSUB 33: IF NOT PEEK(M1) THEN PRINT " 0 0": GOTO 2118
2116 HTAB Q6: PRINT PEEK(M1);: HTAB C3: PRINT INT(( PEEK(M6) + PEEK(M1 +Q2) *B8) *Q4/ PEEK(M1))
2118 NEXT S1: GOSUB 43: HTAB Q1: VTAB 13: PRINT "TRANSPORTS:";R1
2130 RETURN
2140 TEXT : HOME : PRINT "TASK FORCE ";TF +Q1: POKE M7,TF: POKE M4,W
2145 HTAB Q4: VTAB Q3: PRINT "POSITION:";:SA = PEEK(TA +Q4): IF SA < >C1 THEN SA = D1 +SA *C4: GOSUB 23
2150 HTAB Q1: VTAB Q4: PRINT "DESTINATION:";:SA = PEEK(TA +Q5) - INT( PEEK(TA +Q5)/B6) *B6: IF SA < >C1 THEN SA = D1 +SA *C4: GOSUB 23
2155 HTAB Q9: VTAB Q5: PRINT "ETA:";: IF SA < >C1 THEN PRINT INT( PEEK(TA +Q5)/B6)
2160 N$ = "GGRPCEMMMW": HTAB Q5: PRINT "MISSION:"; MID$ (N$, PEEK(TA +Q7) +Q1,Q1)
2165 N$ = "TRANSPORTS: ARMIES: COLONISTS:"
2170 FOR Z = Q TO Q2: HTAB 24: VTAB Q3 +Z: PRINT MID$ (N$,Z *11 +Q1,11); PEEK(TA +Z): NEXT Z
2175 N$ = "ID TYPE EFF TECH": HTAB Q1: VTAB Q8: PRINT N$;: HTAB 21: PRINT N$:S2 = Q
2180 V = Q8:H = Q:S3 = S2: CALL UD: POKE M3,S2
2185 CALL UC:S2 = PEEK(M3): IF NOT PEEK(M6) THEN S2 = -Q1: GOTO 2215
2190 GOSUB 21: PRINT S2;: HTAB H +Q5:S1 = PEEK(M5): GOSUB 33: PRINT " "; PEEK(M6) *Q4;
2191 HTAB H +15: PRINT INT( PEEK(D3 +MP *512 +S2 +S2)/B5)
2195 IF S2 = C2 THEN S2 = -Q1: GOTO 2215
2200 POKE M3,S2 +Q1:V = V +Q1: IF V <19 THEN 2185
2210 IF H = Q THEN V = Q8:H = C: GOTO 2185
2215 RETURN
2260 HTAB Q1: VTAB Q5: PRINT "TYPE PB EN MS EV AR AM SP SZ NUM"
2263 FOR S1 = Q TO Q7:S(S1) = Q: NEXT S1
2265 Z = D3 +MP *512: FOR S1 = Z TO Z +511 STEP 2: IF PEEK(S1) THEN S3 = INT( PEEK(S1 +Q1)/B5):S(S3) = S(S3) +Q1:DS = DS +Q1
2270 NEXT S1: FOR S1 = Q TO Q7: POKE M5,S1
2280 HTAB Q1: VTAB Q6 +S1: GOSUB 33:K = D4 +B6 *W +Q8 *S1
2285 FOR K1 = Q TO Q6: HTAB K1 *Q3 +Q6: PRINT PEEK(K +K1);: NEXT K1
2290 N$ = "LMS": HTAB 27: VTAB Q6 +S1: PRINT MID$ (N$, PEEK(K +Q7) +Q1,Q1);
2300 HTAB 30: PRINT S(S1)
2310 NEXT S1
2330 RETURN
3000 P = H +Q1: GOSUB 122: IF P < >C7 THEN 3030
3010 IF NOT H THEN PRINT "NO PLANETS"
3020 RETURN
3030 V = H *C3: HTAB Q1: VTAB V +Q1: PRINT "PLANET #";H +Q1
3035 IF PE = Q3 THEN PE = Q
3040 ON PE +Q1 GOTO 3060,3060,3140
3060 HTAB 15: VTAB V +Q1: PRINT "OWNER:";:W = W2: GOSUB 28: HTAB 11: VTAB V +Q2
3070 IF PE THEN 3080
3072 IF W1 < >W2 THEN W = W1: PRINT "OLD OWNER:";: GOSUB 28
3074 GOTO 3100
3080 W = PEEK(PA +B4) -Q1: IF W > = Q THEN PRINT "ALLIED TO:";: GOSUB 28
3090 HTAB Q1: VTAB V +Q4: PRINT "NEGOTIATE:";:N$ = "NO ":W = MP:Z = CC: GOSUB 108: IF Z THEN N$ = "YES "
3092 PRINT N$;:Z = 17: GOSUB 108: IF Z >Q2 THEN Z = Q2
3094 N$ = "FRIENDLYNEUTRAL HOSTILE ": PRINT MID$ (N$,Q1 +Z *Q8,Q8)
3100 HTAB Q1: VTAB V +Q5: PRINT "POP CNTRL:"; PEEK(PA +18);
3102 HTAB 27: PRINT "AG:"; PEEK(PA +Q1);: HTAB 34: PRINT "POP:"; PEEK(PA +Q3)
3110 HTAB Q1: VTAB V +Q6: PRINT "MIN CNTRL:"; PEEK(PA +19);
3112 HTAB 25: PRINT "MINE:"; PEEK(PA +Q5);
3113 HTAB 34: PRINT "WPP:"; INT(( PEEK(PA +Q1) + PEEK(PA +19) + PEEK(PA +Q7) *Q3 +Q1)/Q2)
3120 HTAB 17: VTAB V +Q8: PRINT "IND:"; PEEK(PA +Q7);: HTAB 25: PRINT "ACTV:"; PEEK(PA +Q8)
3130 HTAB Q1: VTAB V +Q9: PRINT "GUERILLAS:"; PEEK(PA +C9);: HTAB B4: PRINT "ARMY:"; PEEK(PA +12);
3132 HTAB 26: PRINT "SDF:"; PEEK(PA +C3);: HTAB 34: PRINT "PDF:"; PEEK(PA +CD)
3140 HTAB B4: VTAB V +Q5: IF PE >Q1 THEN HTAB Q6: VTAB V +Q3
3142 PRINT "ENVT:"; PEEK(PA): HTAB B4: VTAB V +Q6: IF PE >Q1 THEN HTAB Q6: VTAB V +Q4
3144 PRINT "RSRC:"; PEEK(PA +Q4): IF NOT H THEN HTAB 3: VTAB V +Q8: PRINT "IO POOL:";PP
3150 RETURN
10000 IF PEEK(DA +C6) >79 THEN 13000
10005 FOR MP = Q TO Q3: IF PEEK(D5 +B4 +MP) = Q THEN 12000
10010 IF PEEK(D5 +B4 +MP) = Q1 THEN 10920
10020 TEXT : HOME :W = MP: PRINT "ALL PLAYERS BUT ";: GOSUB 28: PRINT : PRINT " TURN AWAY.": GOSUB 24:MT = Q
10030 TEXT : HOME : PRINT "CONTROL ADJUSTMENT PHASE FOR YEAR "; PEEK(DA +C6) *Q5: GOSUB 22
10040 SA = D1 +C4 * PEEK(D5 +Q8 +MP):X = PEEK(SA +Q3) - INT( PEEK(SA +Q3)/B7) *B7:Y = PEEK(SA +Q4) - INT( PEEK(SA +Q4)/B7) *B7
10045 PP = PEEK(DA +17 +MP +MP) + PEEK(DA +18 +MP +MP) *B8
10050 P$ = "THE (P)LANETS IN THIS SYSTEM,": POKE DA +CD,C3: GOSUB 200: IF K2 = Q4 THEN K2 = Q1
10060 IF KY = 81 THEN 10290
10070 IF KY < >80 OR S1 = C1 OR PEEK(SA +MP +Q1) <B7 THEN GOSUB 208: GOTO 10060
10150 TEXT : HOME :H = Q: GOSUB 3000:H = Q1: GOSUB 3000:W = MP
10160 GOSUB 32: PRINT "ADJUST CONTROLS FOR WHICH PLANET": PRINT "(1,2,OR E(X)IT)?"
10170 GOSUB 25: IF KY = 88 THEN 10050
10174 GOSUB 121: IF P = C7 THEN 10178
10176 IF PE <Q2 THEN V = C3 *(KY = 50): GOTO 10180
10178 GOSUB 32: PRINT "YOU DO NOT CONTROL THIS PLANET.": GOSUB 24: GOTO 10160
10180 GOSUB 32: IF PE = Q THEN PRINT "ADJUST (P)OP CNTROL,(M)INING CONTROL,"
10190 IF PE THEN PRINT "(N)EGOTIATION STATUS,";: IF PEEK(PA +B4) -Q1 = MP THEN PRINT "(B)REAK AGREEMENT"
10200 PRINT "OR E(X)IT?"
10210 GOSUB 25: IF KY = 88 THEN 10160
10211 IF PE = Q OR PEEK(PA +B4) -Q1 < >MP OR KY < >66 THEN 10213
10212 POKE PA +B4,Q: POKE M4,MP: POKE M1,Q: POKE M7, PEEK(PA +CC): CALL UI: POKE PA +CC, PEEK(M7): GOTO 10150
10213 IF KY = 78 AND PE THEN 10230
10214 IF (KY < >80 AND KY < >77) OR PE THEN 10210
10220 K = C2: IF KY = 77 THEN K = PEEK(PA +Q4)
10222 ONERR GOTO 10222
10223 GOSUB 32: PRINT "SET CONTROL TO WHAT VALUE (0-";K;")";: INPUT N$: IF N$ = "" THEN 10222
10224 K1 = VAL(N$): IF K1 <Q OR K1 >K THEN 10222
10226 POKE PA +18 +(K < >C2),K1: HTAB 11: VTAB V +Q5 +(K < >C2): PRINT " ";: HTAB 11: PRINT K1: GOTO 10180
10230 POKE M7, PEEK(PA +CC): POKE M4,MP: CALL UH:K1 = Q1 - PEEK(M7): POKE M1,K1: POKE M7, PEEK(PA +CC): CALL UI
10232 POKE PA +CC, PEEK(M7):N$ = "NO ": IF K1 THEN N$ = "YES"
10234 HTAB 11: VTAB V +Q4: PRINT N$: GOTO 10180
10290 GOSUB 112: TEXT : HOME : PRINT "PRODUCTION PHASE": GOSUB 22:W = MP
10300 P$ = "(P)LANETS OR (W)ARSHIPS,(B)UILD": GOSUB 200:TK = Q
10310 IF KY = 81 THEN 12000
10325 IF S < >C1 AND PEEK(SA +MP +Q1) > = B7 THEN 10340
10330 IF NOT TK THEN GOSUB 208:TK = Q: GOTO 10310
10335 GOSUB 25: GOTO 10310
10340 IF KY = 87 THEN TK = KY: GOTO 10400
10350 IF KY = 82 AND TK THEN 10300
10360 IF KY = 66 THEN TK = KY: GOTO 10500
10370 IF KY = 84 AND TK = 87 THEN 10410
10380 IF KY < >80 THEN 10330
10390 TK = 80: TEXT : HOME :H = Q: GOSUB 3000:H = Q1: GOSUB 3000:W = MP: GOTO 10460
10400 GOSUB 2040
10405 GOSUB 32: PRINT "LOOK AT (T)ASKFORCE,";: GOTO 10470
10410 ONERR GOTO 10410
10415 GOSUB 32: PRINT "WHICH TASK FORCE (1-32)";: INPUT N$: IF N$ = "" THEN 10400
10420 TF = VAL(N$) -Q1: IF TF <Q OR TF > = B5 THEN 10410
10430 TA = D2 +MP *B8 +TF *Q8: IF PEEK(TA +Q7) = C3 THEN 10410
10440 GOSUB 2140
10444 GOSUB 32: PRINT "EXAMINE NEW (T)ASK FORCE,(M)ORE SHIPS,"
10446 PRINT "(S)CUTTLE A SHIP,OR E(X)IT?": GOSUB 25: IF KY = 88 THEN 10405
10448 IF KY = 84 THEN 10410
10449 IF KY = 83 THEN 10482
10450 IF KY < >77 THEN 10444
10455 S2 = S2 +Q1: GOSUB 2180: GOTO 10444
10460 GOSUB 32
10470 PRINT "(R)ETURN TO MAP,": PRINT "LOOK AT ";P$
10480 PRINT "OR (Q)UIT PRODUCTION?": GOSUB 25: GOTO 10310
10482 ONERR GOTO 10482
10483 GOSUB 32: PRINT "SCUTTLE WHICH SHIP (ID #)";: INPUT I$: IF I$ = "" THEN 10444
10484 S2 = VAL(I$): IF S2 <Q OR S2 > = C2 THEN 10482
10486 POKE M7,TF: POKE M4,MP: POKE M3,S2: CALL UK: IF PEEK(M7) THEN 10405
10488 S2 = S3: GOSUB 2180: GOTO 10444
10500 GOSUB 120: IF P = C7 OR PE >Q1 OR (PE = Q1 AND PEEK(PA +B4) -Q1 < >MP) THEN 10300
10510 TEXT : HOME :PN = PEEK(PA +Q8):DP = PEEK(PA +Q6):TR = PEEK(D5 +MP +MP) + PEEK(D5 +MP +MP +Q1) *B8
10520 GOSUB 111: PRINT "ACTIVE INDUSTRY:";PN: VTAB Q3: PRINT "MIN. RECOMMENDED TRADERS:";TU
10530 GOSUB 109:DS = Q:W = MP: GOSUB 2260
10540 R1 = Q: FOR TF = Q TO 31:TA = D2 +MP *B8 +TF *Q8: IF PEEK(TA +Q7) <C3 THEN R1 = R1 + PEEK(TA)
10545 NEXT TF: HTAB Q1: VTAB 15: PRINT "TRANSPORTS:";R1: PRINT " TRADERS:";TR
10550 PRINT " SDFS:"; PEEK(PA +C3): PRINT " PDFS:"; PEEK(PA +CD): PRINT " ARMIES:"; PEEK(PA +12)
10555 HTAB CA: VTAB 15: PRINT "TECH LEVEL:"; PEEK(D5 +12 +MP)
10560 HTAB 23: VTAB B4: PRINT "INDUSTRY:"; PEEK(PA +Q7): HTAB 26: VTAB 17: PRINT "MINES:"; PEEK(PA +Q5)
10565 HTAB C: VTAB 18: PRINT "AGRICULTURE:"; PEEK(PA +Q1): HTAB C: VTAB 19: PRINT "ENVIRONMENT:"; PEEK(PA)
10570 FOR S1 = Q TO Q7:H = 29:V = S1 +Q5
10572 N$ = " ":DV = S(S1): GOSUB 218: IF I$ = "S" THEN 10620
10573 IF I$ = "R" THEN 10630
10576 N = VAL(I$): IF N <S(S1) THEN 10572
10577 IF N = S(S1) THEN 10740
10578 GOSUB 32:CT = N -S(S1): IF DS +CT > = C2 THEN PRINT "TOO MANY SHIPS!": GOSUB 234: GOTO 10572
10580 S2 = D4 +B6 *MP +Q8 *S1:K = 35: IF PEEK(S2 +Q7) THEN K = 12: IF PEEK(S2 +Q7) >Q1 THEN K = Q5
10582 HM = Q1: GOSUB 231
10590 IF NOT CT THEN 10572
10600 GOSUB 302
10606 IF TF = B5 THEN PRINT "NO AVAILABLE TASK FORCES!": GOSUB 234: GOTO 10572
10616 K2 = K2 -Q1: POKE TA +Q6, PEEK(TA +Q6) +Q1: IF K2 >Q THEN GOSUB 312: GOTO 10616
10618 S(S1) = N:PP = PP -CT:DP = DP -CT: GOSUB 109: GOTO 10740
10620 GOSUB 32: PRINT "DO YOU REALLY WANT TO SCUTTLE THIS": GOTO 10635
10630 GOSUB 32: PRINT "DO YOU REALLY WANT TO REVISE THIS"
10635 PRINT "CLASS (Y OR N)?"
10638 GOSUB 25: IF KY < >89 THEN CALL U5: GOTO 10572
10640 POKE M5,S1: POKE DA +11,C: POKE M4,MP: IF I$ = "R" THEN POKE DA +11,Q2
10645 CALL UJ:N = PEEK(M7): HTAB 30: VTAB V +Q1: PRINT N;" ":HV = D4 +MP *B6 +Q8 *S1:DS = DS +N -S(S1):S(S1) = N
10650 TF = PEEK(HV +Q7): IF I$ = "R" THEN 10670
10660 GOSUB 32: PRINT "WHAT IS THE SIZE OF THE NEW": PRINT "CLASS (L,M,S)?"
10662 GOSUB 25: IF KY = 76 THEN TF = Q:N$ = "L": GOTO 10669
10664 IF KY = 77 THEN TF = Q1:N$ = "M": GOTO 10669
10666 IF KY < >83 THEN 10662
10668 TF = Q2:N$ = "S"
10669 CALL U5: HTAB 27: VTAB V +Q1: PRINT N$: POKE HV +Q7,TF
10670 N = B4: IF TF <Q2 THEN N = B5: IF TF <Q1 THEN N = B6
10675 GOSUB 64
10680 ONERR GOTO 10680
10682 GOSUB 32: PRINT "WHAT IS THE NEW NAME";: INPUT I$: IF LEN(I$) <Q1 THEN 10680
10685 IF LEN(I$) <Q4 THEN I$ = I$ +" ": GOTO 10685
10688 FOR K2 = Q1 TO Q4: POKE D8 +MP *B5 +S1 *Q4 +K2 -Q1, ASC( MID$ (I$,K2,Q1)): NEXT K2
10689 GOSUB 32: VTAB V +Q1: PRINT I$;
10690 S2 = Q:TA = TF +Q1 +(TF >Q1):TF = Q3 -TF +( NOT TF)
10700 GOSUB 64:H = Q5 +S2 *Q3:N$ = " ":DV = PEEK(HV +S2): GOSUB 218
10704 CT = VAL(I$)
10706 K2 = CT: IF S2 = Q3 THEN K2 = K2 -TA: IF K2 <Q THEN 10700
10708 IF S2 = Q3 OR S2 = Q6 THEN K2 = K2 *TF
10710 IF K2 >N THEN 10700
10720 POKE HV +S2,CT:N = N -K2:S2 = S2 +Q1: IF S2 <Q7 THEN 10700
10730 HTAB 36: VTAB V +Q1: PRINT " ";:H = 29: GOTO 10572
10740 NEXT S1:H = CD:V = C4
10750 N$ = " ":DV = R1: GOSUB 218
10754 N = VAL(I$):CT = N -R1: IF CT <Q THEN 10750
10755 IF NOT CT THEN 10810
10756 K = Q5:HM = Q1: GOSUB 231
10758 IF NOT CT THEN 10750
10760 S1 = C3: GOSUB 302
10768 IF TF = B5 THEN PRINT "NO AVAILABLE TASK FORCES!": GOSUB 21: PRINT N$;: GOSUB 21: PRINT R1;: GOSUB 234: GOTO 10750
10780 W1 = C2 - PEEK(TA): IF W1 >K2 THEN W1 = K2
10790 POKE TA, PEEK(TA) +W1:R1 = R1 +W1:K2 = K2 -W1:PP = PP -Q5 *W1:DP = DP -Q5 *W1
10800 GOSUB 109: GOSUB 21: PRINT N$;: GOSUB 21: PRINT R1;: IF K2 >Q THEN GOSUB 303: GOTO 10768
10810 H = CD:V = CC:MX = 64000:HC = Q2:HM = Q1:HV = PEEK(D5 +MP +MP) + PEEK(D5 +MP +MP +Q1) *B8
10820 GOSUB 240: POKE D5 +MP +MP +Q1, INT(HV/B8): POKE D5 +MP +MP,HV - INT(HV/B8) *B8
10830 H = CD:V = B4:MX = 30:HC = Q3:HV = PEEK(PA +C3): GOSUB 240: POKE PA +C3,HV
10840 V = 17:HV = PEEK(PA +CD): GOSUB 240: POKE PA +CD,HV
10850 GOSUB 322: IF HV THEN V = 18:HV = PEEK(PA +12):HC = Q1:MX = C2: GOSUB 240: POKE PA +12,HV
10860 H = 31:V = C4:MX = Q7:HC = 350:HM = Q2:HV = PEEK(D5 +MP +12): GOSUB 240: POKE D5 +MP +12,HV
10870 V = CC:MX = C6:HC = Q8:HV = PEEK(PA +Q7): GOSUB 240: POKE PA +Q7,HV
10880 V = B4:MX = PEEK(PA +Q4):HC = Q5:HV = PEEK(PA +Q5): GOSUB 240: POKE PA +Q5,HV
10890 V = 17:MX = PEEK(PA) -C1: IF MX >Q THEN HC = Q2:HV = PEEK(PA +Q1): GOSUB 240: POKE PA +Q1,HV
10900 IF PEEK(D5 +MP +12) >Q3 THEN MX = C6:V = 18:HC = C3:HV = PEEK(PA): GOSUB 240: POKE PA,HV
10910 GOTO 10460
10920 TEXT : HOME : PRINT "SOLITAIRE PRODUCTION":PP = PEEK(DA +17 +MP +MP) + PEEK(DA +17 +MP +MP +Q1) *B8:PN = Q
10930 GOSUB 112: POKE DA +17 +MP +MP +Q1, INT(PP/B8): POKE DA +17 +MP +MP,PP - INT(PP/B8) *B8
10940 POKE M4,MP: POKE M4 +Q1,MP +Q1: CALL UM
10950 PP = PEEK(DA +17 +MP +MP +Q1) *B8 + PEEK(DA +MP +MP +17)
10960 TR = Q: FOR S = Q TO 49:SA = D1 +S *C4: IF PEEK(SA +Q1 +MP) <B7 THEN 11990
10970 I = Q1
10980 P = PEEK(SA +I) - INT( PEEK(SA +I)/B7) *B7: IF P = C7 THEN 11990
10990 GOSUB 128: IF W2 <Q THEN 11500
11000 IF W2 <Q4 THEN 11980
11010 POKE M4,MP: CALL UH: POKE M1,Q1: POKE M7, PEEK(PA +CC): CALL UI: POKE PA +CC, PEEK(M7): GOTO 11980
11500 IF PEEK(PA) + INT(PP/C3) <55 OR TR >Q OR PEEK(D5 +12 +MP) <Q4 THEN 11980
11510 P1 = PEEK(SA +Q3 -I): IF P1 = C7 THEN 11540
11520 P1 = D +C *P1:W2 = INT( PEEK(P1 +Q9)/B5) *B5 -Q1: IF W2 = Q4 AND PEEK(P1 +B4) >Q AND PEEK(P1 +B4) < >MP +Q1 THEN 11980
11530 IF W2 > = Q AND W2 < >Q4 AND W2 < >MP THEN 11980
11540 POKE M4 +Q1,MP: POKE DA +Q2,S: POKE M7,Q: CALL UN: IF PEEK(M +C) >Q THEN 11980
11710 TR = PEEK(PA) + INT(PP/C3): IF TR >C6 THEN TR = C6
11720 PP = PP -(TR - PEEK(PA)) *C3
11730 POKE PA,TR: POKE PA +Q3,Q8: POKE PA +Q1,Q2: POKE PA +Q9,(MP +Q1) *33: POKE PA +18,Q8
11980 IF I = Q1 THEN I = Q2: GOTO 10980
11990 NEXT S
12000 POKE DA +17 +MP +MP +Q1, INT(PP/B8): POKE DA +17 +MP +MP,PP - INT(PP/B8) *B8
12005 NEXT MP: TEXT
12010 ONERR GOTO 12010
12015 POKE 22288,2: & RUN "VECTOR",44800
13000 HOME : PRINT "THIS IS THE YEAR 400. WHILE YOUR"
13010 PRINT "CIVILIZATION MARCHES TO ITS DESTINY YOU HAVE MET YOURS. FOR YOU THIS GAME OF"
13020 PRINT "POWER IS OVER.": GOSUB 24
13040 ONERR GOTO 13040
13050 POKE DA +98,10: & RUN "GSAVE"