home *** CD-ROM | disk | FTP | other *** search
/ Light / Light_Vol.1_August_1992_Datasphere_Publications_Disk_1_of_2_Side_A.d64 / miner (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  10KB  |  267 lines

  1. 10 poke51,52:poke52,52:poke55,52:poke56,52:g=g+1:ifg=1thenload"tn.chr",8,1
  2. 20 poke53280,0:poke53281,0:gosub2550:gosub2450
  3. 30 print"[147]";x$(1)"[199][153]     galaxy ore mining corporation    [200]";
  4. 40 print"[199][153]    supervisors report for            [200]";:printx$(2);
  5. 50 print"";x$(3):printx$(4):printx$(5):printx$(4):printx$(6):printtp$;x$(7)
  6. 60 printx$(8):printx$(9):printx$(8):printx$(9):printx$(8):printx$(10):gosub2180
  7. 70 fg=1:iftc=1andy=ethengosub2100
  8. 80 rs=int(rnd(1)*3)+1:ifrs=3thengosub1740
  9. 90 ifcr<800ands>1000thengosub1600
  10. 100 ifcr<1then1000
  11. 110 c=int(rnd(18)*9)+18:mp=c
  12. 120 x=0:pokev,18:printu$:pokeh,1:print"[154]how many mines would you like to close"
  13. 130 print"this month at"mp"credits a mineshaft":input"";x
  14. 140 x=int(x)
  15. 150 ifpeek(200)=3then120
  16. 160 ifx=0thengosub1700:goto220
  17. 170 ifx<tmthengosub1700:goto210
  18. 180 gosub1700
  19. 190 pokev,18:printu$:pokeh,1:print"[159]supervisor..you only have"tm"mines"
  20. 200 print"try closing a few less":gosub2140:gosub1700:goto120
  21. 210 tm=tm-x:cr=cr+mp*x:gosub2280:gosub2400:goto340
  22. 220 c=int(rnd(18)*9)+18:mp=c
  23. 230 x=0:pokev,18:printu$:pokeh,1:print"[154]how many new mines will you open this"
  24. 240 print"month at"mp"credits a mineshaft":input"";x
  25. 250 x=int(x)
  26. 260 ifpeek(200)=3then230
  27. 270 ifx=0thengosub1700:goto340
  28. 280 ifmp*x<=crthengosub1700:goto330
  29. 290 gosub1700:ifcr<1then1000
  30. 300 pokev,18:printu$:pokeh,1:print"[158]supervisor, there is only sufficient"
  31. 310 pokev,19:printu$:pokeh,1:print"funds to purchase";int(cr/mp);"mines"
  32. 320 gosub2140:gosub1700:goto230
  33. 330 tm=tm+x:cr=cr-mp*x:gosub2280:gosub2400
  34. 340 f=0:pokev,18:printu$:pokeh,3:print"[152]how many credits will you spend to"
  35. 350 print"feed the workforce this month":input"";f
  36. 360 f=int(f)
  37. 370 iff=0thengosub1700:goto340
  38. 380 iff<=crthengosub1700:cr=cr-f:goto430
  39. 390 gosub1700:ifcr<1then1000
  40. 400 pokev,18:printu$:pokeh,1:print"[158]such generosity but you only have"cr
  41. 410 pokev,19:printu$:pokeh,1:print"credits available supervisor"
  42. 420 gosub2140:gosub1700:goto340
  43. 430 gosub2400
  44. 440 d=wf-int(f/10):i=0:ifd>0then460
  45. 450 i=-d/2:d=0
  46. 460 mw=0:pokev,18:printu$:pokeh,3:print"[159]how many mines will be worked this"
  47. 470 print"month supervisor ?":input"";mw
  48. 480 mw=int(mw)
  49. 490 ifmw=0then460
  50. 500 ifmw<=tmthen540
  51. 510 gosub1700
  52. 520 pokev,18:printu$:pokeh,1:print"[159]imaginative thinking sir but we only"
  53. 530 print"have"tm"mineshafts":gosub2140:gosub1700:goto460
  54. 540 ifint(mw/2)<=crthen650
  55. 550 gosub1700
  56. 560 pokev,17:printu$:pokeh,2:print"[152]credits have been deducted to be able"
  57. 570 ch=int(rnd(1)*3)+1:onchgoto580,590,600
  58. 580 print"to purchase some new mine equipment.":goto610
  59. 590 print"to improve the mine safety equipment.":goto610
  60. 600 print"to make repairs to mine equipment."
  61. 610 sb=int(cr/3):sb=int(sb)
  62. 620 ifsb>1thenprint"only[158]"sb"[152]mines can be worked":goto640
  63. 630 ifsb=1thenprint"only[158] 1 [152]mine can be worked"
  64. 640 mw=sb:cr=cr-sb-10:gosub2400:gosub2140:gosub1700:goto700
  65. 650 ifmw<=10*wfthen700
  66. 660 gosub1700
  67. 670 pokev,18:printu$:pokeh,1:print"[159]supervisor,one worker can only operate"
  68. 680 print"ten mines. we can operate a maximum of":mw=10*wf:printmw"mines"
  69. 690 gosub2430:gosub1700:goto460
  70. 700 c=int(rnd(1)*5)+1:m=mw*c:bn=int(rnd(1)*70)+1:ifbn>60thengosub1390
  71. 710 ifbn>50andbn<60ands>2000thengosub1470
  72. 720 q=rnd(1)*3+1
  73. 730 ifint(q/2)<>q/2then750
  74. 740 k=int(s/q)
  75. 750 s=s-k+m:gosub2360:ifs>99000thengoto1280
  76. 760 i=int(c*(20*tm+s)/wf/100+1):gosub2320:wf=wf+i
  77. 770 q=int(f/10):dp=int(rnd(1)*3)+1
  78. 780 ifwf<qthend=dp:goto850
  79. 790 d=wf-q:gosub2380:cp=cp+d:ifd>.5*wfthen880
  80. 800 ifd>.35*wfthen830
  81. 810 ifd>.2*wfthen1360
  82. 820 iflc=4then880
  83. 830 wf=q
  84. 840 ifcr>400*wfthen1090
  85. 850 e=e+3:ife=37thenyr=yr+1:e=1:lc=0
  86. 860 ife<37thengosub1700
  87. 870 gosub2340:gosub2250:mt=mt+1:goto70
  88. 880 print"[147][150]"cp"people have died of malnutrition":k$="month"
  89. 890 print"and other related diseases since you":ifmt<>1thenk$=k$+"s"
  90. 900 print"took over here"mt;k$;" ago."
  91. 910 ifsl>0thenprint""sl"workers have been lost to slavery."
  92. 920 forw=1to1000:next:print,,"[157][157][157][157][157]_  _  _":forw=1to1000:next
  93. 930 print"you have been assasinated by a member"
  94. 940 print"of the workforce because of your poor"
  95. 950 print"leadership qualities."
  96. 960 print"try again with a fresh supervisor (y/n)":gosub2140
  97. 970 ifa$="n"thensys64738
  98. 980 ifa$="y"thengosub2440:goto30
  99. 990 ifa$<>"n"ora$<>"y"then880
  100. 1000 print"[147][153]you are stoney broke !!! you had"
  101. 1010 print"the means to further your career"
  102. 1020 print"with the company and you blew it."
  103. 1030 print"it might be best if you were on"
  104. 1040 print"the next ship out of here."
  105. 1050 print"try again with a fresh supervisor (y/n)":gosub2140
  106. 1060 ifa$="n"thensys64738
  107. 1070 ifa$="y"thengosub2440:goto30
  108. 1080 ifa$<>"n"ora$<>"y"then1000
  109. 1090 print"[147][154]you have decided to take the soft"
  110. 1100 print"option and leg it off the planet"
  111. 1110 print"with the company safe amongst your"
  112. 1120 print"luggage.":print"the safe contains a total of"cr
  113. 1130 print"credits and some gold and silver"
  114. 1140 print"which you 'creamed' off for just"
  115. 1150 print"such an occasion."
  116. 1160 print"try again with a fresh supervisor (y/n)":gosub2140
  117. 1170 ifa$="n"thensys64738
  118. 1180 ifa$="y"thengosub2440:goto30
  119. 1190 ifa$<>"n"ora$<>"y"then1090
  120. 1200 print"[147][155]i don't know how you did it but you"
  121. 1210 print"have managed to close down the entire"
  122. 1220 print"operation all by your self."
  123. 1230 print"move over and let someone else have ago."
  124. 1240 print"[152]try again with a fresh supervisor (y/n)":gosub2140
  125. 1250 ifa$="n"thensys64738
  126. 1260 ifa$="y"thengosub2440:goto30
  127. 1270 ifa$<>"n"ora$<>"y"then1200
  128. 1280 print"[147][159]there isn't room to store any more"
  129. 1290 print"ore. the markets have stopped buying"
  130. 1300 print"because of a glut."
  131. 1310 print"go on vacation until things improve."
  132. 1320 print"[152]try again with a fresh supervisor (y/n)":gosub2140
  133. 1330 ifa$="n"thensys64738
  134. 1340 ifa$="y"thengosub2440:goto30
  135. 1350 ifa$<>"n"ora$<>"y"then1280
  136. 1360 lc=lc+1:gosub1700
  137. 1370 pokev,18:printu$:pokeh,1:print"[150]be warned !! the workers are hungry"
  138. 1380 print"and there is talk of rebellion.":gosub2430:gosub1700:goto830
  139. 1390 x=int(rnd(1)*4)+1:bc=mw*x+300:gosub1700
  140. 1400 ifx=1thenbn$="tin":goto1440
  141. 1410 ifx=2thenbn$="copper":goto1440
  142. 1420 ifx=3thenbn$="silver":goto1440
  143. 1430 ifx=4thenbn$="gold"
  144. 1440 pokev,18:printu$:pokeh,1:print"[158]bonus! we have found a vein of "bn$
  145. 1450 o$="credit":ifbb<>1theno$=o$+"s"
  146. 1460 print"this is worth"bc;o$:cr=cr+bc:gosub2430:gosub2400:return
  147. 1470 x=int(rnd(1)*3)+1:gosub1700
  148. 1480 ifx=1thensh$="cargo tug"
  149. 1490 ifx=2thensh$="freighter"
  150. 1500 ifx=3thensh$="ore carrier"
  151. 1510 x=x+2:pokev,18:printu$:pokeh,1:print"[158]supervisor, a passing "sh$" has"
  152. 1520 print"hailed us and enquires if we wish to"
  153. 1530 print"sell some stock. the captain has room"
  154. 1540 os=rnd(1)*(1500-500)+500:os=int(os):print"for"os"tons at"x"credits a ton"
  155. 1550 print"shall i sell at that price ? y/n ?"
  156. 1560 gosub2140:ifa$="n"thengosub1700:return
  157. 1570 ifa$="y"thencr=cr+os*x:ms=ms+os:s=s-os:gosub2300:gosub2360:gosub2400
  158. 1580 ifa$="y"thengosub1700:return
  159. 1590 ifa$<>"n"ora$<>"y"thengosub1700:goto1470
  160. 1600 rn=int(rnd(100)*2000)+1:pd=int(rnd(1)*4)+1:os=int(rnd(1)*600)+rn
  161. 1610 pokev,18:printu$:pokeh,1:print"[158]i have called the federation markets"
  162. 1620 print"who require"os"tons of ore."
  163. 1630 o$="credit":ifpd<>1theno$=o$+"s"
  164. 1640 print"they will pay"pd;o$" a ton. shall i"
  165. 1650 print"sell at that price ? y/n ?"
  166. 1660 gosub2140:ifa$="n"thengosub1700:return
  167. 1670 ifa$="y"thencr=cr+os*pd:ms=ms+os:s=s-os:gosub2300:gosub2360:gosub2400
  168. 1680 ifa$="y"thengosub1700:return
  169. 1690 ifa$<>"n"ora$<>"y"thengosub1700:goto1610
  170. 1700 w=17:forxw=1to8
  171. 1710 pokev,w:printu$:pokeh,0:print"                                       "
  172. 1720 w=w+1:ifw<25thennext
  173. 1730 return
  174. 1740 rg=int(rnd(1)*5)+1:onrggoto1750,1900,1750,1900,1750
  175. 1750 iftm<=1then1200
  176. 1760 x=int(rnd(1)*4)+1:gosub2080
  177. 1770 ifx=1thenap$="hill":goto1810
  178. 1780 ifx=2thenap$="river":goto1810
  179. 1790 ifx=3thenap$="desert":gp=int(rnd(1)*wf/5)+2:wf=wf-gp:gosub2340:goto1810
  180. 1800 ifx=4thenap$="plains":ge=int(rnd(1)*100)+1:cr=cr-ge:gosub2400
  181. 1810 pokev,18:printu$:pokeh,2:print"[150]we have been attacked by one of the"
  182. 1820 print""ap$" tribes."dn"workers are dead."
  183. 1830 ifx=1orx=2thengosub2140:goto1890
  184. 1840 ifx=3thenprint""gp"of our people have been taken as"
  185. 1850 ifx=3thenprint"slaves":sl=sl+gp:gosub2140:goto1890
  186. 1860 ifx=4thenprint"[152]vital equipment has been taken to the"
  187. 1870 ifx=4thenprint"value of"ge"credits. your account"
  188. 1880 ifx=4thenprint"has been debited for this amount.":gosub2140
  189. 1890 gosub1700:return
  190. 1900 iftm<=1then1200
  191. 1910 x=int(rnd(1)*4)+1:gosub2080
  192. 1920 ifx=1thenap$=" serious fire":goto1960
  193. 1930 ifx=2thenap$=" heavy flood":goto1960
  194. 1940 ifx=3thenap$="n explosion":goto1960
  195. 1950 ifx=4thenap$=" bad cave-in"
  196. 1960 pokev,18:printu$:pokeh,2:print"[150]there has been a"ap$" at a"
  197. 1970 print"mine in sector"sk"[157]-"sr
  198. 1980 print""dn"workers are dead or injured."
  199. 1990 ifx=1orx=2andcm=1orcm=3then2030
  200. 2000 ifx=1orx=2andcm=2orcm=4then2060
  201. 2010 ifx=3orx=4andcm=1orcm=3then2030
  202. 2020 ifx=3orx=4andcm=2orcm=4then2060
  203. 2030 iftc=1then2060
  204. 2040 iftc=0thenprint"[159]mine is closed for repairs.":y=int(rnd(1)*6)*6+1:tc=1
  205. 2050 iftc=1thentm=tm-1:gosub2140:goto2070
  206. 2060 print"[159]mine is closed permanently.":tm=tm-1:gosub2140
  207. 2070 gosub2280:gosub1700:return
  208. 2080 tp=wf:dn=int(rnd(1)*tp/4)+2:wf=wf-dn:d=dn:md=int(rnd(1)*tm/4)+1:gosub2340
  209. 2090 sk=int(rnd(1)*50)+1:sr=int(rnd(1)*80)+1:cm=int(rnd(1)*4)+1:gosub2380:return
  210. 2100 pokev,18:printu$:pokeh,4:print"[159]damaged mine has been repaired at"
  211. 2110 mr=int(cr/6):mr=int(mr)
  212. 2120 print"a cost of"mr"credits":tc=0:tm=tm+1
  213. 2130 cr=cr-mr:gosub2400:gosub2280:gosub2140:gosub1700:return
  214. 2140 rp=23:forpl=0to14step1:pe$=right$(pk$,pl+1)
  215. 2150 print"[153]"tab(pl)right$(v$,rp)" "pe$:next
  216. 2160 geta$:ifa$=""then2160
  217. 2170 ifa$<>""thenreturn
  218. 2180 pokev,6:printu$:pokeh,2:print"[159]^ workforce"
  219. 2190 pokev,6:printu$:pokeh,21:print"[150]_ fatalaties"
  220. 2200 pokev,8:printu$:pokeh,2:print"[159]total mines"
  221. 2210 pokev,8:printu$:pokeh,21:print"[150]^ immigrants"
  222. 2220 pokev,11:printu$:pokeh,10:print"[158]mineral tons in silos"
  223. 2230 pokev,13:printu$:pokeh,10:print"[158]minerals shipped to date"
  224. 2240 pokev,15:printu$:pokeh,10:print"[152]credits available"
  225. 2250 forw=1to7:pokev,3:printu$:pokeh,28:print"[154]"mid$(dt$,e,3);yr
  226. 2260 pokev,3:printu$:pokeh,28:print""mid$(dt$,e,3);yr;"[146]":next
  227. 2270 pokev,3:printu$:pokeh,28:print"[153]"mid$(dt$,e,3);yr
  228. 2280 pokev,8:printu$:pokeh,14:print"      [159]"
  229. 2290 pokev,8:printu$:printtab(20-len(str$(tm)))tm:iffg=1thenreturn
  230. 2300 pokev,13:printu$:printtab(2)"      [158]"
  231. 2310 pokev,13:printu$:printtab(8-len(str$(ms)))ms:iffg=1thenreturn
  232. 2320 pokev,8:printu$:printtab(35)"   [150]"
  233. 2330 pokev,8:printu$:printtab(38-len(str$(i)))i:iffg=1thenreturn
  234. 2340 pokev,6:printu$:printtab(15)"     [159]"
  235. 2350 pokev,6:printu$:printtab(20-len(str$(wf)))wf:iffg=1thenreturn
  236. 2360 pokev,11:printu$:pokeh,2:print"      [158]"
  237. 2370 pokev,11:printu$:printtab(8-len(str$(s)))s:iffg=1thenreturn
  238. 2380 pokev,6:printu$:printtab(35)"   [150]"
  239. 2390 pokev,6:printu$:printtab(38-len(str$(d)))d:iffg=1thenreturn
  240. 2400 pokev,15:printu$:pokeh,2:print"      [152]"
  241. 2410 pokev,15:printu$:printtab(8-len(str$(cr)))cr:iffg=1thenreturn
  242. 2420 return
  243. 2430 forw=1to3000:next:return
  244. 2440 i=0:ms=0:s=0:d=0:cp=0:fg=0:tc=0:gosub2550:return
  245. 2450 print"[147]":poke53272,31:a=1
  246. 2460 m$="[159] shadow  graphics":j=11:gosub2510
  247. 2470 m$="[129] presents":j=15:gosub2510
  248. 2480 m$=" maurice  miner":j=12:gosub2510
  249. 2490 m$="[159]@ shadow graphics 1992":j=9:gosub2510
  250. 2500 gosub2430:return
  251. 2510 fort=1to24step1
  252. 2520 ms$=left$(m$,1+t)
  253. 2530 print""tab(j)left$(v$,a+10);ms$
  254. 2540 forw=1to15:nextw,t:a=a+2:return
  255. 2550 x$(1)="[213][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][201]":tp$="":wf=100
  256. 2560 dt$="janfebmaraprmayjunjulaugsepoctnovdec":e=1:pk$="press a key"
  257. 2570 x$(2)="[202][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][203]":u$="[145][145]":h=211:v=214:d=0
  258. 2580 x$(3)=" [176][175][175][175][175][175][175][175][175][175][175][175][178][175][175][175][175][175][175][178][175][175][175][175][175][175][175][175][175][175][175][175][175][178][175][175][175][174]":tm=rnd(1)*(1010-990)+990
  259. 2590 x$(4)=" [199]           [200]      [200]             [200]   [200]":tm=int(tm):cr=1000:yr=2050
  260. 2600 x$(5)=" [171][175][175][175][175][175][175][175][175][175][175][175][219][175][175][175][175][175][175][219][175][175][175][175][175][175][175][175][175][175][175][175][175][219][175][175][175][179]"
  261. 2610 x$(6)=" [173][172][172][172][172][172][172][172][172][172][172][172][177][172][172][172][172][172][172][177][172][172][172][172][172][172][172][172][172][172][172][172][172][177][172][172][172][189]"
  262. 2620 x$(7)=" [176][175][175][175][175][175][175][178][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][174]"
  263. 2630 x$(8)=" [199]      [200]                             [200]"
  264. 2640 x$(9)=" [171][175][175][175][175][175][175][219][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][179]"
  265. 2650 x$(10)=" [173][172][172][172][172][172][172][177][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][172][189]"
  266. 2660 v$="":return
  267.