home *** CD-ROM | disk | FTP | other *** search
/ zzZACK64 / zzZACK64_2_1992_-_de.d64 / seeschlacht (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  14KB  |  465 lines

  1. 1 onlgoto115,125,3263,3264,3265,3273,3274,3275
  2. 2 ifa=0thenprint"[147]bitte warten":a=1:load"char",8,1
  3. 3 ifa=1thena=2:load"joyst.",8,1
  4. 10 dimcs(9,9),cb(9,9),ss(9,9),sb(9,9),m$(21)
  5. 15 poke53280,11:poke53281,6:print"":mu$="==========[146]":poke650,64
  6. 20 goto100
  7. 21 sc=2:gosub130:kx=2:gosub575:gosub580:kx=17
  8. 22 gosub750:sc=2:gosub130:gosub160:goto15
  9. 100 rem ******* init *********
  10. 101 fori=0to9:fort=0to9:cs(i,t)=0:cb(i,t)=0:ss(i,t)=0:sb(i,t)=0:nextt:nexti
  11. 102 l$="":fori=0to23:poke54272+i,0:next:s=54272:fori=1to40:l$=l$+" ":next:fi=0
  12. 104 pokes+24,15:goto111:
  13. 105 goto120
  14. 106 goto21
  15. 110 rem  ******* load bild ******
  16. 111 l=1:load"bild",8,1
  17. 115 goto105
  18. 120 rem  ****** load farbe ******
  19. 122 l=2:load"farbe",8,1
  20. 125 goto106
  21. 130 rem ******* bildschirm wahl *****
  22. 133 ifsc=1thenpoke648,4:poke56576,199:poke53272,(peek(53272)and241)or4:return
  23. 135 ifsc=2thenpoke648,196:poke56576,196:poke53272,19:return
  24. 136 reurn
  25. 140 rem ******* cursor pos ******
  26. 141 poke211,cx:poke214,cy:sys58732:return
  27. 160 rem   *****spiel routine*****
  28. 161 cb=5:sb=5:t=0:cs=0:ss=0:as=0:ac=0:fl=1:fs=0:xf=1:yf=1:x=int(rnd(1)*10)
  29. 162 y=int(rnd(1)*10):a$="[255]feind in sicht.der tanz beginnt...":gosub541:am=10
  30. 163 a$="[255]":gosub541:kx=2:f1=0:f2=0:f3=0:f4=0:f5=0:gosub3351
  31. 165 gosub501:ss=ss+1:gosub3352:w=233:gosub3000:ifcb(ax,ay)=2thent=1:gosub3005
  32. 166 gosub801:ift=0thenw=6:gosub3041
  33. 167 ift=1thenas=as+1:ifas=3thenas=0:cb=cb-1
  34. 168 ifcb=0thengosub5050:gosub3390:goto3260
  35. 169 ifss=101thengosub3400:return
  36. 170 ift=1thent=0:goto165
  37. 173 gosub220:cs=cs+1:w=133:gosub3000:ifsb(x,y)=2thent=1:fs=1:gosub3024
  38. 175 ift=1thenac=ac+1:gosub3302:ifac=3thenac=0:sb=sb-1:fs=0:xf=1:yf=1:fl=1
  39. 177 ifsb=0then3360
  40. 180 ift=1thent=0:cs(x,y)=2:goto173
  41. 183 cs(x,y)=1:t=0:w=15:gosub3041:goto165
  42. 185 rem ----------------------------
  43. 220 remc64 - schuss  *****
  44. 225 iffs=1then255
  45. 230 x=x+2
  46. 235 ifx=10thengosub240:goto238
  47. 236 ifx=11thengosub245:goto238
  48. 238 ifcs(x,y)<>0thenx=x+1:goto235
  49. 239 return
  50. 240 x=1:y=y+1:ify>9theny=0:return
  51. 241 return
  52. 245 x=0:y=y+1:ify>9theny=0:return
  53. 246 return
  54. 250 rem  *****specialroutine*****
  55. 255 iffl=1thengosub261
  56. 256 x=xh:y=yh:ifac=2then270
  57. 260 goto281
  58. 261 xh=x:yh=y:fl=0:return
  59. 265 rem  ***x/y routinen***
  60. 270 ifrm$="x"thenyf=0:goto281
  61. 271 xf=0:goto313
  62. 280 rem    ***x+1***
  63. 281 rm$="x":ifx+1>9then289
  64. 283 ifcs(x+1,y)<>0then289
  65. 285 x=x+1:return
  66. 287 rem    ***x-1***
  67. 289 ifx-1<0then297
  68. 291 ifcs(x-1,y)<>0then297
  69. 293 x=x-1:return
  70. 295 rem    ***x+2***
  71. 297 ifx+2>9then305
  72. 299 ifcs(x+2,y)<>0then305
  73. 301 x=x+2:return
  74. 303 rem    ***x-2***
  75. 305 ifx-2<0then313
  76. 307 ifcs(x-2,y)<>0then313
  77. 309 x=x-2:return
  78. 311 rem    ---y+1---
  79. 313 rm$="y":ify+1>9then321
  80. 315 ifcs(x,y+1)<>0then321
  81. 317 y=y+1:return
  82. 319 rem    ---y-1---
  83. 321 ify-1<0then329
  84. 323 ifcs(x,y-1)<>0then329
  85. 325 y=y-1:return
  86. 327 rem    ---y+2---
  87. 329 ify+2>9then337
  88. 331 ifcs(x,y+2)<>0then337
  89. 333 y=y+2:return
  90. 335 rem    ---y-2---
  91. 337 ify-2<0thenfs=0:xf=1:fl=1:goto230
  92. 339 ifcs(x,y-2)<>0thenfs=0:xf=1:fl=1:goto230
  93. 341 y=y-2:return
  94. 500 rem  ***** cursor spiel ******
  95. 501 goto517
  96. 502 sys49152:rem   joystick
  97. 505 ifpeek(780)=1then526
  98. 506 ifpeek(780)=0then529
  99. 507 ifpeek(780)=2then532
  100. 508 ifpeek(780)=3then535
  101. 509 ifpeek(780)=4thenfi=1:gosub519:return
  102. 515 goto501
  103. 516 rem   ausfuehren der bewegung
  104. 517 cx=ax+kx:cy=ay+13:gosub141:print"\[146]";:goto502
  105. 518 rem  ****** alt *****
  106. 519 cx=ax+kx:cy=ay+13:gosub141:ifss(ax,ay)=0thenprint"[255]":gosub561:return
  107. 520 ifss(ax,ay)=1thenprint"*[146]":return
  108. 521 print"&[146]":return
  109. 525 rem  ***** ab  ******
  110. 526 ifay+1>9then501
  111. 527 gosub519:ay=ay+1:goto517
  112. 528 rem  *****auf *****
  113. 529 ifay-1<0then501
  114. 530 gosub519:ay=ay-1:goto517
  115. 531 rem  ***** links *****
  116. 532 ifax-1<0then501
  117. 533 gosub519:ax=ax-1:goto517
  118. 534 rem  ***** rechts*****
  119. 535 ifax+1>9then501
  120. 536 gosub519:ax=ax+1:goto517
  121. 540 rem **** ausgabe routine  *****
  122. 541 print" ";:ifleft$(a$,1)="[255]"thengosub566:a$=right$(a$,len(a$)-1):print" ";
  123. 545 forqq=1tolen(a$):print"[157]"mid$(a$,qq,1)"[146] ";:gosub555:nextqq:print"[157] [146]";
  124. 546 return
  125. 550 rem ***** ausgabe sound *****
  126. 555 gh=10:gl=30:ifmid$(a$,qq,1)<>" "thengl=50:gh=70
  127. 556 pokes+24,15:pokes+5,10:pokes+6,95:pokes+4,16:pokes,gl:pokes+1,gh:pokes+4,27:return
  128. 560 rem ***** sound bei joyst.*****
  129. 561 pokes+5,10:pokes+6,140:pokes+4,16:pokes,120:pokes+1,15:pokes+4,27:return
  130. 565 rem ****** textschirm clr *********
  131. 566 print"";:forqq=1to9:print""l$"[146]";:next:print"";:return
  132. 570 rem ****** anfangs text ********
  133. 571 data"[255]           --- seeschlacht ---             "
  134. 572 data"written by christian berg in 1987"
  135. 575 restore:fori=1to2:reada$:gosub541:next:gosub3214:return
  136. 580 rem ******* schiffe setzen ******
  137. 581 a$="[255]bitte geben sie ihren namen ein:":gosub3221
  138. 583 gosub541:print:ls=10:gosub2070:n$=x$:rem check hi score
  139. 585 a$="[255]hauptquartier an flottenkommandant: ":gosub541:print;
  140. 586 a$="   wir registrieren mit besorgnis wachsendefeindes aktivitaeten im "+ot$
  141. 587 a$=a$+"  ":gosub541:cx=0:cy=3:gosub141
  142. 588 a$="sie haben den befehl mit ihrer flotte   fuer ordnung zu"
  143. 590 gosub541:a$="sorgen.":gosub541
  144. 591 getw$:ifw$=""then591
  145. 592 ifw$="q"then610
  146. 593 a$="[255]unter ihrem kommando stehen:                         ein ubootjaeger"
  147. 594 gosub541:print:a$="             ein flugzeugtraeger":gosub541:print;
  148. 595 a$="                    ein unterseeboot":gosub541:print
  149. 596 a$="             ein schlachtschiff"
  150. 597 gosub541:print;:a$="                     ein schnellboot":gosub541
  151. 600 print:a$="die betroffenen einheiten sind alarmiertund in bereitschaft gesetzt."
  152. 602 gosub541:poke198,0:wait198,1:a$="[255]bitte weisen sie ihren einheiten":gosub541
  153. 604 a$="ihre   positionskoordinaten zu.":gosub541:print:print:sb=0
  154. 605 a$="                   viel glueck."
  155. 606 gosub541:poke198,0:wait198,1
  156. 610 kx=17:a$="[255]ubootjaeger an flottenkommandant:    ":gosub541:f=1:gosub3281
  157. 613 a$="  wir bitten um zuweisung der koordinaten.":gosub541:ax=0:ay=0:rm$="u"
  158. 615 gosub3100:cx=0:cy=4:gosub141
  159. 617 a$="senkrecht oder waagerecht":gosub541:print
  160. 619 getw$:ifw$=""then619
  161. 620 ifw$="s"then630     :rem senkr.
  162. 621 ifw$="w"then640     :rem waager.
  163. 623 goto619
  164. 630 rem      **** senkrecht ****
  165. 631 ifay+2>9thena$="kurs ist nicht moeglich.":gosub541:goto610
  166. 633 sb(ax,ay)=2:sb(ax,ay+1)=2:sb(ax,ay+2)=2
  167. 635 rem  ausgeben
  168. 637 a$="aye aye sir.gehen auf kurs":gosub541:sb=1
  169. 638 goto660
  170. 640 rem  ***** waagerecht *******
  171. 642 ifax+2>9thena$="..das ist nicht moeglich.":gosub541:poke198,0:wait198,1:goto610
  172. 645 sb(ax,ay)=2:sb(ax+1,ay)=2:sb(ax+2,ay)=2:a$="aye aye sir.steuern kurs"
  173. 650 gosub541:sb=1
  174. 660 ifw$="s"thenfori=1to2:gosub725:ay=ay+1:next:gosub725:ay=ay-2:gosub727
  175. 661 ifw$="w"thenfori=1to2:gosub725:ax=ax+1:next:gosub725:ax=ax-2:gosub727
  176. 664 rm$="f"
  177. 665 f=0:gosub3281:a$="[255]flugzeugtraeger an flottenkommandant:   ":gosub541:sb=2
  178. 666 f=1:gosub3283
  179. 670 a$="[157]erbitten unsere koordinaten.":gosub541:gosub3100:cy=5:cx=0:gosub141
  180. 675 gosub3100:cy=5:cx=0:gosub141:a$="kurs senkrecht oder waagerecht":gosub541
  181. 676 getw$:ifw$=""then676
  182. 677 ifw$="s"thengosub702:ift=0thengosub3292:goto681
  183. 678 ifw$="w"thengosub710:ift=0thengosub3292:goto681
  184. 679 ift=1thent=0:onsb-1goto665,684,686,687
  185. 680 goto676
  186. 681 ifw$="s"thenfori=1to2:gosub725:ay=ay+1:next:gosub725:ay=ay-2:gosub727
  187. 682 ifw$="w"thenfori=1to2:gosub725:ax=ax+1:next:gosub725:ax=ax-2:gosub727
  188. 683 f=1:sb=sb+1:ifsb=6thenreturn
  189. 684 ifsb=3thena$="[255]unterseeboot an kommandant":gosub541:f=1:gosub3285:rm$="b"
  190. 685 ifsb=3thena$=left$(l$,13)+"erbitten positionskoordinaten":gosub541:goto675
  191. 686 ifsb=4thena$="[255]schlachtschiff bittet um koordinaten.":gosub541:goto3295
  192. 687 ifsb=5thena$="[255]schnellboot bittet um koordinaten":gosub541:goto3297
  193. 700 rem    senk/waage
  194. 701 rem    senk
  195. 702 t=0:ifay+2>9thent=1:return
  196. 703 ifsb(ax,ay)<>0thent=1:return
  197. 704 ifsb(ax,ay+1)<>0thent=1:return
  198. 705 ifsb(ax,ay+2)<>0thent=1:return
  199. 706 sb(ax,ay)=2:sb(ax,ay+1)=2:sb(ax,ay+2)=2:return
  200. 709 rem    waage
  201. 710 t=0:ifax+2>9thent=1:return
  202. 711 ifsb(ax,ay)<>0thent=1:return
  203. 712 ifsb(ax+1,ay)<>0thent=1:return
  204. 713 ifsb(ax+2,ay)<>0thent=1:return
  205. 714 sb(ax,ay)=2:sb(ax+1,ay)=2:sb(ax+2,ay)=2:return
  206. 720 rem ***** koordinaten up to date
  207. 721 cx=ax+2:cy=ay+13:gosub141:ifcb(ax,ay)=0thenprint"*[146]":return
  208. 722 ifcb(ax,ay)=2thenprint"&[146]";:return
  209. 723 print"[255]":return
  210. 725 cx=17+ax:cy=ay+13:gosub141:ifsb(ax,ay)=2thenprint"&[146]":return
  211. 726 print"&[146]":return
  212. 727 ifrm$<>"u"then730
  213. 728 ifw$="s"thenfori=0to2:ux(i+1)=ax:uy(i+1)=ay+i:next:return
  214. 729 ifw$="w"thenfori=0to2:ux(i+1)=ax+i:uy(i+1)=ay:next:return
  215. 730 ifrm$<>"f"then733
  216. 731 ifw$="s"thenfori=0to2:fx(i+1)=ax:fy(i+1)=ay+i:next:return
  217. 732 ifw$="w"thenfori=0to2:fx(i+1)=ax+i:fy(i+1)=ay:next:return
  218. 733 ifrm$<>"b"then736
  219. 734 ifw$="s"thenfori=0to2:bx(i+1)=ax:by(i+1)=ay+i:next:return
  220. 735 ifw$="w"thenfori=0to2:bx(i+1)=ax+i:by(i+1)=ay:next:return
  221. 736 ifrm$<>"s"then739
  222. 737 ifw$="s"thenfori=0to2:sx(i+1)=ax:sy(i+1)=ay+i:next:return
  223. 738 ifw$="w"thenfori=0to2:sx(i+1)=ax+i:sy(i+1)=ay:next:return
  224. 739 ifw$="s"thenfori=0to2:px(i+1)=ax:py(i+1)=ay+i:next:return
  225. 740 ifw$="w"thenfori=0to2:px(i+1)=ax+i:py(i+1)=ay:next:return
  226. 741 return
  227. 750 rem  ***** computer setzt schife **
  228. 751 sz=1:aa=0:cb=0:x=int(rnd(1)*2):ifx=1thengosub3231:aa=1:cb=5:return
  229. 752 gosub781:ifnotcb=5thenonz+1gosub786,791
  230. 753 ift=1thent=0
  231. 756 ifnotcb=5then752
  232. 760 return
  233. 780 rem    auswahl
  234. 781 x=int(rnd(1)*8):y=int(rnd(1)*8):z=int(rnd(1)*2):return
  235. 783 cb(x,y)=2:cb(x+1,y)=2:cb(x+2,y)=2:cb=cb+1:return:rem     waage
  236. 784 cb(x,y)=2:cb(x,y+1)=2:cb(x,y+2)=2:cb=cb+1:return:rem     senk
  237. 785 rem check senk
  238. 786 ifcb(x,y)<>0thent=1:return
  239. 787 ifcb(x,y+1)<>0thent=1:return
  240. 788 ifcb(x,y+2)<>0thent=1:return
  241. 789 gosub784:t=0:return
  242. 790 rem  waage
  243. 791 ifcb(x,y)<>0thent=1:return
  244. 792 ifcb(x+1,y)<>0thent=1:return
  245. 793 ifcb(x+2,y)<>0thent=1:return
  246. 794 gosub783:t=0:return
  247. 800 rem **** eintrag in ss-array***
  248. 801 ift=1thenss(ax,ay)=2:gosub721:cb(ax,ay)=0:return
  249. 802 ss(ax,ay)=1:gosub721:return
  250. 2070 rem  ------ get------
  251. 2071 rem   ls=max laenge von x-str.muss            vorher angegeben werden
  252. 2075 w$="":x$="":hh$="":lx=0:print" ";
  253. 2080 getw$:ifw$=""then2080
  254. 2085 ifw$=chr$(13)thenprint"[157] ":return
  255. 2090 ifw$=chr$(20)andlx<>0 thenprint"[157]"w$" ";:gosub2110  :goto2080
  256. 2091 ifw$=chr$(20)then2080
  257. 2095 ifw$=""orw$="[145]"orw$=""orw$="[157]"orw$="[147]"orw$=""then2080
  258. 2100 iflx=lsthen2080
  259. 2105 x$=x$+w$:print"[157]"w$" ";:lx=lx+1:goto2080
  260. 2110 hh$="":fori=1tolen(x$)-1:hh$=hh$+mid$(x$,i,1):next:x$=hh$:lx=lx-1
  261. 2115 iflx=0thenx$="":return
  262. 2120 return
  263. 3000 pokes+6,05:rem  schuss sp.
  264. 3001 pokes+0,0:pokes+1,116:pokes+5,45:pokes+22,100:pokes+23,w
  265. 3002 pokes+24,53:pokes+4,0:pokes+4,129:forj=1to15:pokes+0,j:next
  266. 3003 forj=1to1600:next:return
  267. 3005 pokes+6,0:rem treffer bei c64
  268. 3006 pokes+0,0:pokes+1,7:pokes+5,46:pokes+22,50:pokes+23,243
  269. 3007 pokes+24,53:pokes+4,0:pokes+4,129:forj=1to70:pokes+0,j:next
  270. 3008 forj=1to1300:next:pokes+22,0:return
  271. 3020 rem ----sound fuer treffer---
  272. 3024 q=0:pokes+5,19:pokes+6,187:pokes+22,95:pokes+23,255:gosub5080
  273. 3026 pokes+24,31:ifq=30thenq=25
  274. 3028 pokes+1,18:pokes,4:q=q+1:ifq=40then3036
  275. 3030 pokes+4,129:fori=1to03:next:pokes,12
  276. 3032 pokes+4,128:fori=1to04:next
  277. 3034 goto3028
  278. 3036 return
  279. 3040 rem wasser
  280. 3041 pokes+0,0:pokes+1,40:pokes+5,10*16+12:pokes+22,0:pokes+23,0
  281. 3042 pokes+24,w:pokes+4,0:pokes+4,129:forj=1to255:pokes+0,j:next
  282. 3043 forq=1to2000:next
  283. 3044 return
  284. 3100 rem  ***** cursor spiel ******
  285. 3102 goto3120
  286. 3104 sys49152:rem   joystick
  287. 3106 ifpeek(780)=1then3132
  288. 3108 ifpeek(780)=0then3138
  289. 3110 ifpeek(780)=2then3144
  290. 3112 ifpeek(780)=3then3150
  291. 3114 ifpeek(780)=4thenfi=1:gosub3124:return
  292. 3116 goto3102
  293. 3118 rem   ausfuehren der bewegung
  294. 3120 cx=ax+kx:cy=ay+13:gosub141:print"\[146]";:goto3104
  295. 3122 rem  ****** alt *****
  296. 3124 cx=ax+kx:cy=ay+13:gosub141:ifsb(ax,ay)=0thenprint"[255]":gosub561:return
  297. 3126 ifsb(ax,ay)=1thenprint"*[146]":return
  298. 3128 print"&[146]":return
  299. 3130 rem  ***** ab  ******
  300. 3132 ifay+1>9then3102
  301. 3134 gosub3124:ay=ay+1:goto3120
  302. 3136 rem  *****auf *****
  303. 3138 ifay-1<0then3102
  304. 3140 gosub3124:ay=ay-1:goto3120
  305. 3142 rem  ***** links *****
  306. 3144 ifax-1<0then3102
  307. 3146 gosub3124:ax=ax-1:goto3120
  308. 3148 rem  ***** rechts*****
  309. 3150 ifax+1>9then3102
  310. 3152 gosub3124:ax=ax+1:goto3120
  311. 3200 q=0
  312. 3201 pokes+5,9:pokes+6,10:pokes+23,0:pokes+21,1 :pokes+22,1
  313. 3202 pokes+24,31:ifq=30thenq=25
  314. 3203 pokes+1,6:pokes,06:q=q+1:ifq=40then3207
  315. 3204 pokes+4,129:
  316. 3205 pokes+4,128:
  317. 3206 goto3203
  318. 3207 return
  319. 3210 rem    *meere*
  320. 3211 data"atlantik","mittelmeer","roten meer","pazifik","indischen ozean"
  321. 3212 data"bering meer","golf von guinea"
  322. 3213 data"arabischen meer","labrador becken","schwarzen meer","golf von mexico"
  323. 3214 fori=1to11:readm$(i):next:return
  324. 3220 rem choose meer
  325. 3221 x=int(rnd(1)*10)+1:ifx=mthenx=x+1:ifx>11thenx=1
  326. 3222 ot$=m$(x)+".":m=x:return
  327. 3230 rem **** szenario wahl *****
  328. 3231 sz=int(rnd(1)*8)+1
  329. 3232 ifsz=sathensz=sz+1:ifsz>8thensz=1
  330. 3233 x$="szenario"+str$(sz)
  331. 3234 sa=sz:open1,8,2,x$+",s,r"
  332. 3236 fori=0to9:fort=0to9:input#1,x:cb(i,t)=x:nextt:nexti:close1:return
  333. 3240 close1:return
  334. 3241 rem ---lernen
  335. 3242 rem
  336. 3243 open1,8,15,"s:szenario"+str$(sz):close1
  337. 3245 open1,8,2,"szenario"+str$(sz)+",s,w"
  338. 3247 fori=0to9:fort=0to9
  339. 3248 print#1,sb(i,t):nextt:nexti:close1:return
  340. 3260 rem  ---- spieler hat gewonnen
  341. 3261 ifsb>=3thengosub3242
  342. 3262 sc=1:gosub130:gosub5045:l=3:load"char 1",8,1
  343. 3263 l=4:print"":load"bild 1",8,1
  344. 3264 l=5:load"farbe 1",8,1
  345. 3265 sc=2:gosub130:cy=12:fori=8to1step-1:cy=cy+1:cx=14:gosub141:printn$(i):nexti
  346. 3266 cy=12:fori=8to1step-1:cy=cy+1:cx=23:gosub141:printp(i):next
  347. 3270 getw$:ifw$=""then3270
  348. 3271 sc=1:gosub130
  349. 3272 l=6:load"char",8,1
  350. 3273 l=7:load"bild",8,1
  351. 3274 l=8:load"farbe",8,1
  352. 3275 sc=2:gosub130:goto3376
  353. 3280 rem     **status**
  354. 3281 forq=55769to55771:pokeq,f:next:forq=55808to55812:pokeq,f:next:return
  355. 3282 rem  flugzeugtraeger
  356. 3283 forq=55888to55893:pokeq,f:next:forq=55928to55933:pokeq,f:next:return
  357. 3284 rem  u-boot
  358. 3285 forq=55969to55970:pokeq,f:next:forq=56008to56012:pokeq,f:next:return
  359. 3286 rem  schlachtschff
  360. 3287 forq=56048to56052:pokeq,f:next:forq=56088to56093:pokeq,f:next:poke56049,f
  361. 3288 return
  362. 3289 rem  schnellboot
  363. 3290 forq=56129to56131:pokeq,f:next:forq=56169to56172:pokeq,f:next:return
  364. 3291 rem hilf
  365. 3292 f=0:onsb-1gosub3283,3285,3287,3290
  366. 3293 return
  367. 3294 rem hilf
  368. 3295 rm$="s":gosub3287:goto675
  369. 3296 rem  hilf
  370. 3297 gosub3290:rm$="p":goto675
  371. 3300 rem  **** schiffstyp feststellen
  372. 3302 iff1=1then3305
  373. 3303 forq=1to3:ifux(q)=xanduy(q)=ythengosub3325:return
  374. 3304 nextq
  375. 3305 iff2=1then3308
  376. 3306 forq=1to3:iffx(q)=xandfy(q)=ythengosub3328:return
  377. 3307 nextq
  378. 3308 iff3=1then3311
  379. 3309 forq=1to3:ifbx(q)=xandby(q)=ythengosub3331:return
  380. 3310 nextq
  381. 3311 iff4=1then3314
  382. 3312 forq=1to3:ifsx(q)=xandsy(q)=ythengosub3334:return
  383. 3313 nextq
  384. 3314 iff5=1thenreturn
  385. 3315 forq=1to3:ifpx(q)=xandpy(q)=ythengosub3337:return
  386. 3316 nextq
  387. 3317 return
  388. 3325 ifac=1thenf=8:gosub3281:return
  389. 3326 ifac=2thenf=2:gosub3281:return
  390. 3327 f=6:gosub3281:f1=1:return
  391. 3328 ifac=1thenf=8:gosub3283:return
  392. 3329 ifac=2thenf=2:gosub3283:return
  393. 3330 f=6:gosub3283:f2=1:return
  394. 3331 ifac=1thenf=8:gosub3285:return
  395. 3332 ifac=2thenf=2:gosub3285:return
  396. 3333 f=6:gosub3285:f3=1:return:rem u-boot
  397. 3334 ifac=1thenf=8:gosub3287:return
  398. 3335 ifac=2thenf=2:gosub3287:return
  399. 3336 f=6:gosub3287:f4=1:return:rem schlacht.
  400. 3337 ifac=1thenf=8:gosub3290:return
  401. 3338 ifac=2thenf=2:gosub3290:return
  402. 3339 f=6:gosub3290:f5=1:return
  403. 3350 rem     munition
  404. 3351 cy=10:cx=8:gosub141:a$=left$(mu$,am+1)+"[146]"+left$(l$,10-am):printa$;:return
  405. 3352 ifss=10orss=20orss=30orss=40orss=50orss=60orss=70thenam=am-1:gosub3351:return
  406. 3353 ifss=80orss=90orss=100thenam=am-1:gosub3351:return
  407. 3354 return
  408. 3360 rem ***** spieler hat verloren sb=0
  409. 3361 pokes+23,0:pokes+22,0:a$="[255]an kommandant "+n$+" vom hq:":gosub541:print
  410. 3362 a$="sie haben in einem harten seegefecht    alle schiffe verloren.":gosub541
  411. 3363 a$="doch sie konnten dem gegner mit"+str$(ss)+" schuss ":gosub541:a$=""
  412. 3365 ifcb=3thena$="einigen":goto3370
  413. 3366 ifcb<=2thena$="schweren":goto3370
  414. 3367 a$="geringen"
  415. 3370 gosub541:cx=0:cy=5:gosub141:a$="schaden zufuegen.":gosub541:print
  416. 3375 a$="sie erreichten"+str$(p)+" punkte":gosub541:poke198,0:wait198,1
  417. 3376 a$="[255]wollen sie in einem weiteren seegefecht auf punktejagd gehen j/n?"
  418. 3377 gosub541
  419. 3378 getw$:ifw$="j"thenrm$="j":sc=1:gosub130:goto15
  420. 3379 ifw$="n"thensc=1:gosub130:poke650,0:end
  421. 3380 goto3378
  422. 3385 rem  punkte errechen
  423. 3390 p=(100-ss)*sb+cb:return
  424. 3400 rem **** keine munition mehr****
  425. 3401 a$="[255]hq an kommandant "+n$+":":gosub541:print
  426. 3403 a$="da sie unfaehig sind ein seegefecht zu  fuehren sind sie vom dienst"
  427. 3404 gosub541:a$="suspendiert.":gosub541
  428. 3405 poke198,0:wait198,1:goto3376
  429. 3410 rem ******* hi-score ********
  430. 3460 rem  --- einordnen ---
  431. 3461 ifp=<p(1)thenreturn
  432. 3464 fori=1to8:ifp>p(i)thennexti:
  433. 3467 i=i-1
  434. 3468 fort=1toi:n$(t)=n$(t+1):p(t)=p(t+1):next:p(i)=p:n$(i)=n$:gosub5021:return
  435. 3500 rem ----- c64 hat gewonnen ----
  436. 5000 rem --- load ----
  437. 5003 open2,8,2,"hi-score,s,r"
  438. 5006 fori=1to8:p(i)=0:n$(i)="":h$=""
  439. 5009 get#2,x$:ifx$=chr$(13)thenget#2,x$:goto5015
  440. 5012 n$(i)=n$(i)+x$:goto5009
  441. 5015 get#2,x$:ifx$=chr$(13)thenget#2,x$:p(i)=val(h$):next:close2:return
  442. 5018 h$=h$+x$:goto5015
  443. 5021 rem --- save ---
  444. 5024 open1,8,15,"s:hi-score":close1
  445. 5027 open2,8,2,"hi-score,s,w"
  446. 5030 fori=1to8:fr$=chr$(13):print#2,n$(i) fr$ str$(p(i)) fr$:next:close2:return
  447. 5033 rem---display--
  448. 5036 fori=1to8:printn$(i),p(i):next:return
  449. 5039 rem init
  450. 5042 fori=1to8:n$(i)="c.b.":p(i)=i:next:gosub5021:return
  451. 5045 gosub5000:gosub3460:return
  452. 5050 rem ----- gratulation -----
  453. 5055 fori=stos+24:pokei,0:next:a$="[255]hq an kommandant "+n$+":":gosub541:print
  454. 5060 a$="wir gratulieren ihnen zu diesem erfolg. sie haben alle feindlichen"
  455. 5063 gosub541:a$="schiffe      versenkt.":gosub541:print
  456. 5065 a$="dafuer benoetigten sie"+str$(ss)+" schuss.":gosub541:print
  457. 5066 gosub3385:a$="sie erreichten"+str$(p)+" punkte.":gosub541
  458. 5070 getw$:ifw$=""then5070
  459. 5071 return
  460. 5075 rem     treffer bei spieler
  461. 5080 poke53280,1:forq=1to8:poke53270,q:next:forq=8to1:poke53270,q
  462. 5085 next:poke53280,11:return
  463. 5090 poke53270,peek(53270)or16:return
  464. 5095 rem
  465.