home *** CD-ROM | disk | FTP | other *** search
/ B Soft 4 / B-Soft_4_19xx_Maik__Mike_de_Side_A.d64 / caractacus (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  7KB  |  261 lines

  1. 1 rem caractacus
  2. 2 dimcf$(1):cf$(0)=" [157]" :cf$(1)=" [146][157]":cf=-1:goto13
  3. 3 ax=0:forad=itoil:ax=(s(a,i)=0)orax:next:return
  4. 5 poke 198,0:i$="":print""
  5. 6 for iv=1to300:next:printcf$(cf+1);:cf=notcf:geta$:ifa$=""then6
  6. 7 iflen(i$)anda$=chr$(13)then12
  7. 8 ifa$=chr$(20)andlen(i$)=0ora$=chr$(13)then6
  8. 9 ifa$=chr$(20)theni$=left$(i$,len(i$)-1):print"[157][157] [157]";:goto6:rem'del'
  9. 10 ifa$>chr$(95)ora$<chr$(32)orlen(i$)=2then6
  10. 11 i$=i$+a$:printa$;:goto6
  11. 12 poke198,0:print"":return
  12. 13 gosub 63900
  13. 14 dim m(2,26),s(2,26),p(2,26),d(2,26)
  14. 15 x=-120:t=0
  15. 16 uc=uc+124
  16. 18 h=us+164
  17. 20 g=us+124
  18. 22 dim f(2,2)
  19. 23 pokeub,14:pokeug,uf
  20. 24 printu7$;"[147] --- [195][193][210][193][195][212][193][195][213][211] ---"
  21. 25 print" [211]chotten gegen [197]nglaender!"
  22. 27 print"[154] [194]ei [198]rage nach [194]efehlen"
  23. 28 print" [210]ichtungsangaben wie bei [203]ompass        eingeben:"
  24. 29 print" ([206], [206][207], [207] usw. [203]ein [218]ug = [207][203]!)"
  25. 30 print" [197]nglaender sind in [210]everszeichen":print" angezeigt."
  26. 31 geta$:ifa$=""then31
  27. 32 print"[154] [197]inen [205]oment [199]eduld...":rr=0:bb=0
  28. 35 for a=1to2
  29. 36 fori=1to26
  30. 37 gosub 700
  31. 38 s(a,i)=q
  32. 39 next i:next a
  33. 40 for i=1 to 26
  34. 41 bb=bb+s(1,i):rr=rr+s(2,i):next i
  35. 42 printu1$;"[147] [196]ie [208]unkte sind wie folgt:"
  36. 43 printu7$;" [211]chotten:    "rr
  37. 44 printu9$;" [197]nglaender:  "bb
  38. 45 printu1$;" [218]ufrieden ([202]/[206])?"
  39. 46 get w$:if w$<>"j"andw$<>"n"goto46
  40. 47 if w$="n"thenrun
  41. 50 for i=1 to26
  42. 51 d(1,i)=i:d(2,i)=i+128
  43. 52 next i
  44. 53 for a=1 to 2
  45. 54 for i=1 to 26
  46. 56 read  p(a,i)
  47. 58 nexti
  48. 59 nexta
  49. 60 data 453,413,412,493,492,452,333,293,253,252,292,573,613,653,652,612
  50. 61 data 449,409,489,448,91,131,171,811,771,731
  51. 62 data 455,415,416,495,496,456,575,615,655,656,616,335,295,255,256,296
  52. 63 data 459,419,499,460,817,777,737,97,137,177
  53. 65 restore
  54. 90 pokeug,u3:printchr$(142)"[147]":pokeug,u6
  55. 100 for i=0to28
  56. 110 poke h+1,43
  57. 120 poke h+800+i,43
  58. 130 next i
  59. 140 for i=0 to 20
  60. 150 poke h+i*40,43
  61. 160 poke h+28+i*40,43
  62. 170 next i
  63. 200 for i=1 to 26
  64. 202 if s(1,i)<=0 then p(1,i)=x:goto207
  65. 205 poke g+p(1,i),d(1,i):pokeuc+p(1,i),u9
  66. 207 if s(2,i)<=0 then p(2,i)=x :goto215
  67. 210 poke g+p(2,i),d(2,i):pokeuc+p(2,i),u7
  68. 215 next i
  69. 220 fora=1 to 2
  70. 221 for j=1 to8
  71. 222 na$(1)=u9$+"schottische":na$(2)=u7$+"englische"
  72. 224 print""na$(a)"befehle"
  73. 227 print"                                    "
  74. 229 on j goto 230,240,250,260,270,276,280,286
  75. 230 i=1:il=6:gosub3:ifaxthen235
  76. 231 print"[145]mitte   (abcdef)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
  77. 232 for i=1 to 6
  78. 233 m(a,i)=n
  79. 234 next i
  80. 235 next j
  81. 240 i=7:il=11:gosub3:ifaxthen245
  82. 241 print"[145]links   (ghijk)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
  83. 242 for i=7 to 11
  84. 243 m(a,i)=n
  85. 244 next i
  86. 245 next j
  87. 250 i=12:il=16:gosub 3:ifaxthen255
  88. 251 print"[145]rechts   (lmnop)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
  89. 252 for i=12 to 16
  90. 253 m(a,i)=n
  91. 254 next i
  92. 255 nextj
  93. 260 i=17:il=20:gosub3:ifaxthen265
  94. 261 print"[145]reserve   (qrst)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
  95. 262 for i=17 to 20
  96. 263 m(a,i)=n
  97. 264 next i
  98. 265 next j
  99. 270 i=21:il=23:gosub3:ifaxthenj=j+1:goto278
  100. 271 print"[145]bogenschuetzen links   (uvw)?";:gosub5:n$=i$:gosub 800:ifn=99then224
  101. 272 for i=21 to23
  102. 273 m(a,i)=n
  103. 274 next i
  104. 275 next j
  105. 276 print"[145]schussrichtung?";:gosub5:n$=i$
  106. 277 gosub 800:if n=99 then 224
  107. 278 f(a,1)=n
  108. 279 next j
  109. 280 i=24:il=26:gosub3:ifaxthenj=j+1:goto288
  110. 281 print"[145]bogenschuetzen rechts   (xyz)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
  111. 282 for i=24 to 26
  112. 283 m(a,i)=n
  113. 284 next i
  114. 285 next j
  115. 286 print"[145]schussrichtung?  ";:gosub5:n$=i$
  116. 287 gosub 800:if n=99 then 224
  117. 288 f(a,2)=n
  118. 289 nextj
  119. 290 print"                    "
  120. 297 next a
  121. 299 print"                         "
  122. 300 for c=1 to 30
  123. 310 for b= 1to2
  124. 312 bb=0:rr=0
  125. 320 gosub 600
  126. 323 if s(b,q)<=0 then goto 320
  127. 325 pokeuc+p(b,q),u1
  128. 330 if b=1 then e=2
  129. 335 if b=2 then e=1
  130. 337 if peek(g+p(b,q)+m(b,q))=43 then490
  131. 340 for a=1 to 26
  132. 345 if p(b,q)+m(b,q)=p(b,a) goto490
  133. 360 if p(b,q)+m(b,q)=p(e,a) goto 370
  134. 365 nexta
  135. 366 goto 480
  136. 370 gosub 650
  137. 372 pokeg+p(b,q),32
  138. 375 if(s(b,q)+r)>=(s(e,a)+v)goto420
  139. 385 s(b,q)=s(b,q)-1
  140. 390 s(e,a)=s(e,a)-1
  141. 395 if s(b,q)=0 then p(b,q)=x
  142. 400 if s(e,a)>9 then s(e,a)=9
  143. 405 m(b,q)=0
  144. 410 goto 480
  145. 420 s(b,q)=s(b,q)+1
  146. 425 s(e,a)=s(e,a)-1
  147. 426 if e=1 then p(e,a)=p(e,a)-1
  148. 427 if e=2 then p(e,a)=p(e,a)+1
  149. 430 if s(e,a)=0 then p(e,a)=x
  150. 435 poke g+p(b,q),32:pokeuc+p(b,q),u3
  151. 440 if s(b,q)>9 then s(b,q)=9
  152. 455 for y=1 to 26
  153. 457 if a=y goto 463
  154. 460 if p(e,a)<>p(e,y) and p(e,a)<>p(b,y)goto 463
  155. 461 s(e,a)=0:p(e,a)=x
  156. 462 goto475
  157. 463 nexty
  158. 475 poke g+ p(e,a),d(e,a):pokeuc+p(e,a),18-4*e
  159. 480 pokeg+p(b,q),32:p(b,q)=p(b,q)+m(b,q)
  160. 482 if p(b,q)<30 then p(b,q)=x:s(b,q)=0
  161. 483 if p(b,q)>830 then p(b,q)=x:s(b,q)=0
  162. 490 poke g+ p(b,q),d(b,q):pokeuc+p(b,q),18-4*b
  163. 492 if q>20 then gosub 900
  164. 495 next b
  165. 496 for a=1to26
  166. 497 rr=rr+s(2,a):bb=bb+s(1,a)
  167. 498 next a
  168. 499 printue$;"...tot"
  169. 500 print"                                      "
  170. 501 printu8$;"[145]punkte..."u7$;"r:"rr;u9$;"b:"bb;ur$;"    minuten:"c:printu8$;
  171. 510 nextc
  172. 511 t=t+1
  173. 515 printue$;"***ende einer halben stunde kampf***"
  174. 516 fora=1to5:forj=1to100:pokeug,uu:nextj:pokeug,u6:forj=1to100:nextj:nexta
  175. 520 fora=1to3500:nexta:printu1$;
  176. 521 ifbb=>3*rr/2thenprint"englische niederlage!!!hoch bonnie prince charlie!":goto1000
  177. 522 ifrr=>3*bb/2then print"englischer sieg!+++++++++++++fuck!":goto1000
  178. 524 if t>=3then print"*es wird spaet- die leute sind muede!*":goto550
  179. 525 goto 90
  180. 550 for a=1 to 3000:nexta
  181. 552 print"geht's weiter? (j/n)";
  182. 555 getn$:ifn$="" then 555
  183. 557 printn$:if n$="j"then570
  184. 559 printu7$;"englaender haben noch "rr"truppen"
  185. 560 printu9$;"schotten:noch";bb;"truppen":printu8$;
  186. 562 if bb>rr then print"knapper schottischer sieg!":goto1000
  187. 564 if rr>bb then print"knapper englischer sieg!":goto1000
  188. 566 print"*** unentschieden ***":goto1000
  189. 570 print"neuordnung der streitkraefte ? (j/n)"
  190. 574 print""
  191. 575 getn$:ifn$="" then 575
  192. 576 if n$="n" then 90
  193. 578 goto 53
  194. 600 q=rnd(1)*26+1
  195. 610 q=int(q)
  196. 620 return
  197. 650 for z=1 to 10:pokeuv,15:pokeuw,33:poke uh,int(rnd(1)*20+2)
  198. 675 poke g+p(b,q),102
  199. 680 poke g+p(e,a),102
  200. 685 poke g+p(b,q),d(b,q)
  201. 690 pokeg+p(e,a),d(e,a)
  202. 691 nextz:pokeuv,0:pokeuw,129
  203. 692 r=rnd(1)*4+1
  204. 693 v=rnd(1)*4+1
  205. 694 r=int(r)
  206. 695 v=int(v)
  207. 696 return
  208. 700 q=rnd(1)*4+2
  209. 705 q=int(q)
  210. 710 return
  211. 800 if n$="no" then n=-39:return
  212. 805 if n$="nw" then n=-41:return
  213. 810 if n$="so" then n=41:return
  214. 815 if n$="sw" then n= 39:return
  215. 818 if n$="ok" then n=0:return
  216. 820 if n$="o" then n=1:return
  217. 825 if n$="w" then n=-1:return
  218. 830 if n$="n" then n=-40:return
  219. 835 if n$="s" then n=40:return
  220. 836 n=99
  221. 837 print"*** illegaler befehl! ***
  222. 838 [129] y[178]1 [164] 2000:[130] y
  223. 839 [153]"                                  "
  224. 840 [142]
  225. 900 m[178]1
  226. 901 [139] q[177]23 [167] m[178]2
  227. 902 [139] f(b,m)[178]1 [176] f(b,m)[178][171]1 [167] ff[178]64
  228. 903 [139] f(b,m)[178]40 [176] f(b,m)[178][171]40 [167] ff[178]93
  229. 904 [139] f(b,m)[178]41 [176] f(b,m)[178][171]41 [167] ff[178]77
  230. 905 [139] f(b,m)[178]39 [176] f(b,m)[178][171]39 [167] ff[178]78
  231. 906 [139] f(b,m)[178]0 [167] [142]
  232. 907 [129] a[178]1[164]5
  233. 908 f[178]a[172]f(b,m)
  234. 909 kl[178][194](g[170]p(b,q)[170]f):[139]kl[178]43[167] [151]uv,0:[142]
  235. 910 [139] kl[178]32[167] [151] g[170]p(b,q)[170]f,ff:[137]916
  236. 911 [151] uv,15:[151]uw,33
  237. 912 [129] i[178]1 [164]26:[151]uh,200[171]i
  238. 913 [139] p(b,i)[178]p(b,q)[170]f [167] [137]920
  239. 914 [139] p(e,i)[178]p(b,q)[170]f [167] [137] 930
  240. 915 [130] i
  241. 916 [151] g[170]p(b,q)[170]f,32:[151]uc[170]p(b,q)[170]f,u3
  242. 917 [151] uv,15:[151]ul,250[171]a[172]48:[151]uh,244:[129]z[178]1[164]10:[130]z,a:[151]uv,0
  243. 918 [142]
  244. 920 [151] g[170]p(b,i),32:[151]uc[170]p(b,i),u3
  245. 922 s(b,i)[178]0:p(b,i)[178]x
  246. 923 [151] g[170]p(b,i),d(b,i):[151]uc[170]p(b,i),18[171]4[172]b
  247. 925 [151]uv,0:[151]uw,129:[142]
  248. 930 [151] g[170]p(e,i),32:[151]uc[170]p(e,i),u3
  249. 932 s(e,i)[178]0:p(e,i)[178]x
  250. 933 [151] g[170]p(e,i),d(e,i):[151]uc[170]p(e,i),18[171]4[172]e
  251. 935 [151]uv,0:[151]uw,129:[142]
  252. 1000 [161]a$:[139]a$[178]""[167]1000
  253. 1001 [138]
  254. 63900 [143] farb/ton codes
  255. 63902 us[178]1024:uc[178]55296:ug[178]53281:ub[178]53280:uv[178]54296:ua[178]54277:ud[178]54278:uh[178]54273
  256. 63905 ul[178]54272:uw[178]54276:u0[178]0:u0$[178]"stop":ui[178]1:u1$[178]"":u2[178]2:u2$[178]"":u3[178]5:u3$[178]""
  257. 63910 u4[178]6:u4$[178]"":u5[178]8:u5$[178]"for":u6[178]9:u6$[178]"verify":u7[178]10:u7$[178]"def":u8[178]13:u8$[178]"print"
  258. 63915 u9[178]14:u9$[178]"cont":uu[178]4:uu$[178]"clr":ur[178]12:ur$[178]"print#":ue[178]7:ue$[178]"sys":uf[178]11:uf$[178]"poke"
  259. 63920 [151] ua,55:[151]ud,100:[151]uw,129
  260. 63930 [142]
  261.