home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpmug
/
cpmug013.ark
/
KINGDOM.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-04-29
|
7KB
|
222 lines
10 FOR I=1 TO 10:PRINT:NEXT I
20 PRINT TAB(20);"*** KINGDOM ***":FOR I=1 TO 10:PRINT:NEXT I
30 N5=8:N4=8
380 PRINT "YOUR GOAL: TO COMPLETE YOUR ";N4;" YEAR TERM."
390 PRINT "GOOD LUCK"
400 M=INT(70000+(RND*1000)-(RND*1000))
410 P=INT(500 +(RND*10)-(RND*10))
420 L=2000
430 W=0:X2=0:E0=0:X1=0:E1=0:S9=0:S0=0:M5=0:S1=0
440 D1=INT(P/3)
450 L1=INT((RND*5)+10)
460 L0=INT(RND*10+95)
470 GOSUB 2220
480 PRINT "YOU HAVE ";M;" RALLODS, ";
490 PRINT P;" COUNTRYMEN,";
500 IF W=0 THEN 520
510 PRINT W;" FOREIGN WORKERS,";
520 PRINT " AND ";L;" SQ. MILES OF LAND."
530 PRINT "THIS YEAR INDUSTRY WILL BUY LAND FOR ";L0;" RALLODS/SQ. MILE"
540 PRINT "LAND CURRENTLY COSTS ";L1;" RALLODS/SQ. MILE TO PLANT"
550 IF S1=0 THEN 570
560 PRINT "POLLUTION LEVEL IS ";S1;" UNITS."
570 GOSUB 2220
580 INPUT"HOW MANY SQ. MILES TO SELL TO INDUSTRY ";L2
600 IF L2<0 THEN 580
610 IF L2<(L-1000) THEN 680
620 PRINT " THINK AGAIN. YOU'VE ONLY ";L-1000;" SQ. MILES OF FARM LAND"
630 IF X<>1 THEN 580
640 PRINT "(FOREIGN INDUSTRY NOT INTERESTED IN FOREST LAND BECAUSE"
650 PRINT "OF GREATER DEVELOPMENT COST)"
660 X1=1
670 GOTO 580
680 M=INT(M+L2*L0)
690 L=INT(L-L2)
700 X9=INT(44*(2000-L))
710 M2=0
720 M3=0
730 M4=0
740 INPUT"HOW MANY RALLODS TO DISTRIBUTE TO YOUR COUNTRYMEN ";M1
770 IF M1<0 THEN 740
780 IF M1<=M THEN 810
790 GOSUB 2250
800 GOTO 740
810 M=INT(M-M1)
820 IF M=0 THEN 1170
830 INPUT"HOW MANY SQ. MILES TO PLANT ";L3
850 IF L3<0 THEN 830
860 IF L3<=P*2 THEN 890
870 PRINT "EACH COUNTRYMAN CAN ONLY PLANT 2 SQ. MILES":GOTO 950
890 IF L3<=L-1000 THEN 920
900 PRINT "ONLY GOT ";L-1000;" SQ. MILES OF FARM LAND."
910 GOTO 950
920 M4=INT(L3*L1)
930 IF M4<=M THEN 990
940 GOSUB 2250
950 PRINT "YOU CAN AFFORD ";INT(M/L1);
960 PRINT " AND HAVE LABOR FOR ";P*2;
970 PRINT " AND HAVE ";L-1000;" SQ. MILES":GOTO 830
990 M=INT(M-M4)
1000 IF M=0 THEN 1170
1010 INPUT"HOW MUCH TO SPEND FOR EDUCATION ";M2
1030 IF M2<0 THEN 1010
1040 IF M2<M THEN 1070
1050 GOSUB 2250
1060 GOTO 1010
1070 M=INT(M-M2)
1080 IF M=0 THEN 1170
1090 IF L=2000 THEN 1170
1100 INPUT"HOW MUCH TO SPEND TO COMBAT POLLUTION ";M3
1120 IF M3<0 THEN 1100
1130 IF M3<=M THEN 1160
1140 GOSUB 2250
1150 GOTO 1100
1160 M=INT(M-M3)
1170 GOSUB 2220
1180 D0=0
1190 E2=M2/P
1200 D2=INT(P-M1/100)
1210 IF D2<=0 THEN 1240
1220 D0=D2
1230 PRINT D2;" COUNTRYMEN DIED OF STARVATION."
1240 D3=INT((S1/100000)*(.1+.4*RND)*P)
1250 IF D3<=0 THEN 1280
1260 PRINT D3;" COUNTRYMEN DIED OF EXCESS POLLUTION."
1270 D0=D0+D3
1280 IF D0<=0THEN 1400
1290 F=D0*9
1300 PRINT "YOU WERE FORCE TO SPEND ";F;" RALLODS FOR FUNERAL EXPENSES"
1310 M=INT(M-F)
1320 IF M<=0 THEN 1400
1330 PRINT "INSUFFICIENT RESOURCES FORCED SALE OF LAND."
1340 T0=-INT((M-L0+1)/L0)
1350 L=L-T0
1360 IF L>=1000 THEN 1390
1370 PRINT "NOT ENOUGH LAND TO SELL"
1380 GOTO 2270
1390 M=M+T0*L0
1400 IF D0>200 THEN 2300
1410 P=P-D0
1420 D1=D1-D0
1430 IF D1<0 THEN 2410
1440 IF D2<=2 THEN 1460
1450 IF M>500 THEN 2520
1460 IF L2=0 THEN 1520
1470 T0=INT(L2+L2*RND*2)
1480 IF W=0 THEN 1500
1490 T0=INT(T0+.1*W)
1500 PRINT T0;" WORKERS CAME TO THE ISLAND AND"
1510 W=W+T0
1520 T0=INT(((500-P)/10-D3/3-D2/5)*.75*(1+RND))
1530 PRINT ABS(T0);" COUNTRYMEN ";
1540 IF T0<0 THEN 1570
1550 PRINT "CAME TO ";
1560 GOTO 1580
1570 PRINT "LEFT ";
1580 PRINT " THE ISLAND."
1590 P=P+T0
1600 IF P<W THEN 2480
1610 T0=0
1620 IF L=2000 THEN 1680
1630 T0=INT((S1/100000)*L3)
1640 IF T0<=L3 THEN 1660
1650 T0=L3
1660 IF T0=0 THEN 1680
1670 PRINT "OF ";L3;" SQ. MILES PLANTED, ";
1680 PRINT "YOU HARVESTED ";L3-T0;" SQ. MILES OF CROPS."
1690 IF T0=0 THEN 1760
1700 IF X2>=2 THEN 1760
1710 PRINT " (DUE TO ";
1720 IF X2=0 THEN 1740
1730 PRINT "INCREASED ";
1740 PRINT "POLLUTION LEVEL)"
1750 X2=X2+1
1760 T1=INT((39+RND*20)*(1+.25*(E0+E1)/20))
1770 PRINT " MAKING ";INT(T1*(L3-T0));" RALLODS."
1780 M=M+INT(T1*(L3-T0))
1790 E0=E1
1800 IF E2<=10 THEN 1820
1810 E2=10
1820 E1=E2
1830 T0=2000-L
1840 IF T0<2 THEN 2100
1850 IF T0<=26 THEN 1870
1860 T0=26
1870 T0=INT(T0*500*(.52+.5*RND))
1880 T1=S1/100000
1890 IF T1<=1 THEN 1910
1900 T1=1
1910 T1=T1*T0
1920 PRINT "YOU MADE ";INT(T0-T1);" RALLODS FROM TOURIST TRADE"
1930 M=M+INT(T0-T1)
1940 IF INT(T0-T1)<=M5 THEN 2080
1950 IF S1<=S9 THEN 2080
1960 PRINT " DECREASE BECAUSE ";
1970 T2=RND*10
1980 ON (T2/2)+1 GOTO 1990,2010,2030,2050,2070,2070
1990 PRINT "FISH POPULATIN HAS DWINDLED DUE TO WATER POLLUTION"
2000 GOTO 2080
2010 PRINT "AIR POLLUTION IS KILLING GAME BIRD POPULATION"
2020 GOTO 2080
2030 PRINT "MINERAL BATHS ARE BEING RUINED BY WATER POLLUTION"
2040 GOTO 2080
2050 PRINT "UNPLEASANT SMOG IS DISCOURIGING SUN BATHERS"
2060 GOTO 2080
2070 PRINT "HOTEL ARE LOOKING SHABBY DUE TO SMOG GRIT"
2080 M5=INT(T0-T1)
2090 S9=S1
2100 S2=(2000-L)^2-M3/.44
2110 PRINT "YOU RECEIVED ";X9;" RALLODS FROM TAXES ON INDUSTRY"
2120 IF S2>=0 THEN 2170
2130 S1=INT(S1+S2/2)
2140 IF S1>=S0 THEN 2160
2150 S1=S0
2160 GOTO 2190
2170 S1=INT(S1+S2)
2180 S0=INT(S0+S2/10)
2190 N5=N5-1
2200 IF N5>0 THEN 450
2210 GOTO 2570
2220 PRINT :PRINT :RETURN
2250 PRINT "ONLY GOT ";M;" RALLODS LEFT!":RETURN
2270 PRINT "YOU HAVE BEEN THROWN OUT OF OFFICE AND YOU ARE NOW"
2280 PRINT "RESIDING IN PRISON."
2290 STOP
2300 PRINT D0;" COUNTRYMEN DIED IN ONE YEAR!!!!!"
2310 PRINT "DUE TO THIS EXTREME MISMANAGEMENT YOU HAVE NOT ONLY"
2320 PRINT "BEEN IMPEACHED AND THROWN OUT OF OFFICE BUT YOU"
2330 T0=INT(RND*2.01)+1
2340 ON T0 GOTO 2350,2370,2390
2350 PRINT "ALSO HAD YOUR LEFT EYE GOUGED OUT."
2360 STOP
2370 PRINT "HAVE ALSO GAINED A VERY BAD REPUTATION."
2380 STOP
2390 PRINT "HAVE ALSO BEEN DECLARED NATIONAL FINK."
2400 STOP
2410 PRINT "OVER ONE THIRD OF THE POPULATION HAS DIED SINCE YOU"
2420 PRINT "WERE ELECTED TO OFFICE. THE PEOPLE (REMAINING)"
2430 PRINT "HATE YOUR GUTS."
2440 GOTO 2450
2450 IF RND<.25 THEN 2270
2460 PRINT "YOU HAVE BEEN ASSASINATED."
2470 STOP
2480 PRINT "THE NUMBER OF FOREIGN WORKERS HAS EXCEEDED THE NUMBER"
2490 PRINT "OF COUNTRYMEN. AS A MAJORITY THEY HAVE REVOLTED AND"
2500 PRINT "TAKEN OVER THE COUNTRY."
2510 GOTO 2450
2520 PRINT "MONEY WAS LEFT OVER IN THE TREASURY WHICH YOU DID NOT"
2530 PRINT "SPEND. AS A RESULT SOME OF YOUR COUNTRYMEN DIED OF "
2540 PRINT "STARVATION. THE PUBLIC IS ENRAGED AND YOU HAVE BEEN"
2550 PRINT "FORCED TO EITHER RESIGN OR COMMIT SUICIDE."
2560 STOP
2570 PRINT
2580 PRINT "CONGRATULATIONS"
2590 PRINT "YOU HAVE SUCCESSFULLY COMPLETED YOUR ";N4;" YEAR TERM"
2600 PRINT "OF OFFICE. YOU HAVE DONE SUCH A GOOD JOB THAT YOU MIGHT"
2610 PRINT "WANT TO RUN FOR ELECTION AGAIN THIS TIME."
2620 PRINT "TYPE 0 (ZERO) IF YOU DO";
2630 INPUT Q
2640 N5=N4
2650 IF Q=0 THEN 440
2660 STOP