home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 19 / 019.d81 / periscope (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  338 lines

  1. 5 printchr$(142)"[147]":poke53280,5:poke53281,14:tr=54272:gosub5000
  2. 10 poke54277,145:poke54278,128:poke54273,81:poke54272,1
  3. 15 poke54290,16:poke54291,16:poke54292,64
  4. 20 goto30
  5. 25 gosub5055
  6. 30 gosub1000:poke54286,33:poke54287,135:poke54290,129:poke54296,5
  7. 35 p=int(10*rnd(0))
  8. 40 ifs>=500then50
  9. 45 goto55
  10. 50 ifn=0thengosub1500
  11. 55 ifp>6orp<1then35
  12. 60 ifj>=n+12orct>25+(n*2)-ithen10000
  13. 65 print"torpedos used "j
  14. 70 print"score"s
  15. 75 ct=ct+1:onpgoto100,200,300,400,500,600
  16. 100 x=30
  17. 105 x=x-1
  18. 110 print"":poke54276,16:ifx=15thenpoke54276,17
  19. 115 printtab(x)"   [178][169][184] [146] "
  20. 120 printtab(x)"[169]  ... [146] "
  21. 125 ifx=0then155
  22. 130 t=0
  23. 135 t=t+1
  24. 140 ift<>ithen135
  25. 145 goto900
  26. 155 print"[145]       "
  27. 160 print"[145][145]       "
  28. 165 goto35
  29. 200 x=1
  30. 205 x=x+1
  31. 210 print"":poke54276,16:ifx=10thenpoke54276,17
  32. 215 printtab(x)"[129]  [206][163][205]  "
  33. 220 printtab(x)"[144] [223][185][185][185][169] "
  34. 225 ifx=30then255
  35. 230 t=0
  36. 235 t=t+1
  37. 240 ift<>ithen235
  38. 245 goto900
  39. 255 printtab(30)"[145]      "
  40. 260 printtab(30)"[145][145]      "
  41. 265 goto35
  42. 300 x=1
  43. 305 x=x+1
  44. 310 print"":poke54276,16:ifx=20thenpoke54276,17
  45. 315 printtab(x)"[159] '[205][158][176][178][174]"
  46. 320 printtab(x)" [188]    [146][169]"
  47. 325 ifx=30then355
  48. 330 t=0
  49. 335 t=t+1
  50. 340 ift<>ithen335
  51. 345 goto900
  52. 355 printtab(30)"[145]       "
  53. 360 printtab(30)"[145][145]       "
  54. 365 goto35
  55. 400 x=30
  56. 405 x=x-1
  57. 410 print"":poke54276,16:ifx=25thenpoke54276,17
  58. 415 printtab(x)"[150] [190][188][184][190][188][146] "
  59. 420 printtab(x)"[153][223]_::: [146] "
  60. 425 ifx=0then455
  61. 430 t=0
  62. 435 t=t+1
  63. 440 ift<>ithen435
  64. 445 goto900
  65. 455 printtab(x)"[145]       "
  66. 460 printtab(x)"[145][145]       "
  67. 465 goto35
  68. 500 x=30
  69. 505 x=x-1
  70. 510 print"":poke54276,16:ifx=17thenpoke54276,17
  71. 515 printtab(x)"'[205][206][149][182][181][206]  "
  72. 520 printtab(x)"[159][223][166][166][166][166][166][161] "
  73. 520 ifx=0then555
  74. 530 t=0
  75. 535 t=t+1
  76. 540 ift<>ithen535
  77. 545 goto900
  78. 555 printtab(x)"[145]       "
  79. 560 printtab(x)"[145][145]       "
  80. 565 goto35
  81. 600 x=0
  82. 605 x=x+1
  83. 610 print"":poke54276,16:ifx=5thenpoke54276,17
  84. 615 printtab(x)"  [205][255][255][255] "
  85. 620 printtab(x)"[155] + [146][185][185][185][169]"
  86. 625 ifx=30then655
  87. 645 goto900
  88. 655 printtab(x)"[145]       "
  89. 660 printtab(x)"[145][145]       "
  90. 665 goto35
  91. 900 ift1<>0then2005
  92. 905 ift2<>0then2505
  93. 910 ift3<>0then3005
  94. 915 ift4<>0then3505
  95. 920 ift5<>0then4005
  96. 925 ift6<>0then4505
  97. 930 getf$:f=val(f$):iff>6then940
  98. 935 onfgosub2000,2500,3000,3500,4000,4500
  99. 940 onpgoto105,205,305,405,505,605
  100. 1000 print"[159]"
  101. 1005 print"                   [206][205]"
  102. 1010 print"                  [206]  [205]"
  103. 1020 print"                [213][206]    [205][201]"
  104. 1030 print"               [213][206]      [205][201]"
  105. 1040 print"              [213][206][155].[149]  [172][187][155]  .[159][205][201]"
  106. 1050 print"              [206][155] [194][149]  [182][181][155]  [194][159] [205]"
  107. 1060 print"              [165][155] .[149]  [182][181][155]  .[159] [167]"
  108. 1070 print"              [165][155] [194][149] [169][146][169][223][223][146][155] [194][159] [167]"
  109. 1080 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  110. 1085 return
  111. 1500 z=0:h=0
  112. 1505 print""
  113. 1510 z=z+1
  114. 1515 printtab(13)"bonus six more "
  115. 1520 printtab(16)"torpedos"
  116. 1525 h=h+1
  117. 1530 ifh<>5then1525
  118. 1535 print""
  119. 1540 printtab(13)"                "
  120. 1545 printtab(16)"         "
  121. 1550 ifz=10then1560
  122. 1555 h=0:goto1505
  123. 1560 z=0:h=0:n=6:return
  124. 2000 j=j+1:t1=1718
  125. 2005 poket1,32
  126. 2010 t1=t1-40:c1=t1+tr
  127. 2015 poket1,81:pokec1,6
  128. 2020 ifx=10then2050
  129. 2025 ifx=11then2050
  130. 2030 ifx=12then2050
  131. 2035 ifx=13then2050
  132. 2040 ifx=14then2050
  133. 2045 goto2055
  134. 2050 ift1=1118then6000
  135. 2055 ift1<1118thenpoket1,32:t1=0:return
  136. 2060 onpgoto105,205,305,405,505,605
  137. 2500 j=j+1:t2=1678
  138. 2505 poket2,32
  139. 2510 t2=t2-40.5:c2=t2+tr
  140. 2515 poket2,81:pokec2,6
  141. 2520 ifx=2then2550
  142. 2525 ifx=3then2550
  143. 2530 ifx=4then2550
  144. 2535 ifx=5then2550
  145. 2540 ifx=6then2550
  146. 2545 goto2555
  147. 2550 ift2=1111then6000
  148. 2555 ift2<1111thenpoket2,32:t2=0:return
  149. 2560 onpgoto105,205,305,405,505,605
  150. 3000 j=j+1:t3=1640
  151. 3005 poket3,32
  152. 3010 t3=t3-40:c3=t3+tr
  153. 3015 poket3,81:pokec3,6
  154. 3020 ifx=12then3050
  155. 3025 ifx=13then3050
  156. 3030 ifx=14then3050
  157. 3035 ifx=15then3050
  158. 3040 ifx=16then3050
  159. 3045 goto3055
  160. 3050 ift3=1120then6000
  161. 3055 ift3<1120thenpoket3,32:t3=0:return
  162. 3060 onpgoto105,205,305,405,505,605
  163. 3500 j=j+1:t4=1647
  164. 3505 poket4,32
  165. 3510 t4=t4-40:c4=t4+tr
  166. 3515 poket4,81:pokec4,6
  167. 3520 ifx=19then3550
  168. 3525 ifx=20then3550
  169. 3530 ifx=21then3550
  170. 3535 ifx=22then3550
  171. 3540 ifx=23then3550
  172. 3545 goto3555
  173. 3550 ift4=1127then6000
  174. 3555 ift4<1127thenpoket4,32:t4=0:return
  175. 3560 onpgoto105,205,305,405,505,605
  176. 4000 j=j+1:t5=1688
  177. 4005 poket5,32
  178. 4010 t5=t5-39.5:c5=t5+tr
  179. 4015 poket5,81:pokec5,6
  180. 4020 ifx=25then4050
  181. 4025 ifx=26then4050
  182. 4030 ifx=27then4050
  183. 4035 ifx=28then4050
  184. 4040 ifx=29then4050
  185. 4045 goto4055
  186. 4050 ift5=1135then6000
  187. 4055 ift5<1135thenpoket5,32:t5=0:return
  188. 4060 onpgoto105,205,305,405,505,605
  189. 4500 j=j+1:t6=1729
  190. 4505 poket6,32
  191. 4510 t6=t6-40:c6=t6+tr
  192. 4515 poket6,81:pokec6,6
  193. 4520 ifx=20then4550
  194. 4525 ifx=21then4550
  195. 4530 ifx=22then4550
  196. 4535 ifx=23then4550
  197. 4540 ifx=24then4550
  198. 4545 goto4555
  199. 4550 ift6=1129then6000
  200. 4555 ift6<1129thenpoket6,32:t6=0:return
  201. 4560 onpgoto105,205,305,405,505,605
  202. 5000 z=0:print""
  203. 5005 print"periscope",
  204. 5010 z=z+1
  205. 5015 ifz<>40then5005
  206. 5020 z=0:print""
  207. 5025 print"periscope",
  208. 5030 z=z+1
  209. 5035 ifz<>40then5025
  210. 5040 v=v+1
  211. 5045 ifv<>4then5000
  212. 5050 z=0:v=0
  213. 5055 print"[147]":print"do you need instructions?  (y/n)"
  214. 5060 getc$:ifc$=""then5060
  215. 5065 ifc$="y"then5500
  216. 5070 print"just how fast are you?  1 to 9"
  217. 5075 print"1 is fast  9 is slow"
  218. 5080 geti$:ifi$=""then5080
  219. 5085 i=val(i$):ifi<1ori>9then5080
  220. 5090 print"[147]":return
  221. 5500 print"[147]"
  222. 5505 print"   the object of this game is to sink"
  223. 5510 printtab(13)"as many boats"
  224. 5515 print"   as you can with your 12 torpedos."
  225. 5520 printtab(16)"to do it"
  226. 5525 printtab(6)"you fire them from your sub"
  227. 5530 print"     by using one of the six tubes"
  228. 5535 printtab(14)"marked below."
  229. 5540 print"   tubes 2 and 5 fire on a 30' angle."
  230. 5545 printtab(5)"all others fire straight ahead."
  231. 5550 print:print"       press any key to continue        "
  232. 5550 gosub1000
  233. 5560 poke1716,178:poke1717,62:poke1677,179:poke1678,62
  234. 5565 poketr+1716,1:poketr+1717,1:poketr+1677,1:poketr+1678,1
  235. 5570 poke1756,62:poke1755,177:poke1689,60:poke1690,180
  236. 5575 poketr+1756,1:poketr+1755,1:poketr+1689,1:poketr+1690,1
  237. 5580 poke1731,181:poke1730,60:poke1772,182:poke1771,60
  238. 5585 poketr+1731,1:poketr+1730,1:poketr+1772,1:poketr+1771,1
  239. 5590 d=d+1
  240. 5595 ifd<>25then5590
  241. 5600 d=0
  242. 5605 poketr+1716,32:poketr+1717,32:poketr+1677,32:poketr+1678,32
  243. 5610 poketr+1756,32:poketr+1755,32:poketr+1689,32:poketr+1690,32
  244. 5615 poketr+1731,32:poketr+1730,32:poketr+1772,32:poketr+1771,32
  245. 5620 gete$:ife$=""then5560
  246. 5625 print"[147]":print
  247. 5630 printtab(7)"for each boat that you sink"
  248. 5635 print"  you will receive points as shown below"
  249. 5640 print"  [205][255][255][255] "
  250. 5645 print"[155] + [146][185][185][185][169]   =100 points     troop carrier"
  251. 5650 print
  252. 5655 print"[150] [190][188][184][190][188][146] "
  253. 5660 print"[153][223]_::: [146]    =50 points      ocean liner"
  254. 5665 print
  255. 5670 print"'[205][206][149][182][181][206]  "
  256. 5675 print"[159][223][166][166][166][166][166][161]   =40 points      cargo ship"
  257. 5680 print
  258. 5685 print"   [178][169][184] [146] "
  259. 5690 print"[169]  ... [146]   =30 points      pt boat"
  260. 5695 print
  261. 5700 print"[159] '[205][158][176][178][174]"
  262. 5705 print" [188]    [146][169]   =20 points      tug boat"
  263. 5710 print
  264. 5715 print"[129]  [206][163][205]  "
  265. 5720 print"[144] [223][185][185][185][169]    =10 points      sail boat"
  266. 5725 print:print"       press any key to continue        "
  267. 5730 getc$:ifc$=""then5730
  268. 5735 print"[147]"
  269. 5740 printtab(8)"there is a special bonus"
  270. 5745 printtab(6)"if you score over 500[146] points."
  271. 5750 printtab(7)"you get six more torpedos."
  272. 5755 printtab(8)"there will be a maximum"
  273. 5760 printtab(10)"of 24 boats to pass."
  274. 5765 print" the number in the conv