home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
B Soft 4
/
B-Soft_4_19xx_Maik__Mike_de_Side_A.d64
/
caractacus
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
7KB
|
261 lines
1 rem caractacus
2 dimcf$(1):cf$(0)=" [157]" :cf$(1)=" [146][157]":cf=-1:goto13
3 ax=0:forad=itoil:ax=(s(a,i)=0)orax:next:return
5 poke 198,0:i$="":print""
6 for iv=1to300:next:printcf$(cf+1);:cf=notcf:geta$:ifa$=""then6
7 iflen(i$)anda$=chr$(13)then12
8 ifa$=chr$(20)andlen(i$)=0ora$=chr$(13)then6
9 ifa$=chr$(20)theni$=left$(i$,len(i$)-1):print"[157][157] [157]";:goto6:rem'del'
10 ifa$>chr$(95)ora$<chr$(32)orlen(i$)=2then6
11 i$=i$+a$:printa$;:goto6
12 poke198,0:print"":return
13 gosub 63900
14 dim m(2,26),s(2,26),p(2,26),d(2,26)
15 x=-120:t=0
16 uc=uc+124
18 h=us+164
20 g=us+124
22 dim f(2,2)
23 pokeub,14:pokeug,uf
24 printu7$;"[147] --- [195][193][210][193][195][212][193][195][213][211] ---"
25 print" [211]chotten gegen [197]nglaender!"
27 print"[154] [194]ei [198]rage nach [194]efehlen"
28 print" [210]ichtungsangaben wie bei [203]ompass eingeben:"
29 print" ([206], [206][207], [207] usw. [203]ein [218]ug = [207][203]!)"
30 print" [197]nglaender sind in [210]everszeichen":print" angezeigt."
31 geta$:ifa$=""then31
32 print"[154] [197]inen [205]oment [199]eduld...":rr=0:bb=0
35 for a=1to2
36 fori=1to26
37 gosub 700
38 s(a,i)=q
39 next i:next a
40 for i=1 to 26
41 bb=bb+s(1,i):rr=rr+s(2,i):next i
42 printu1$;"[147] [196]ie [208]unkte sind wie folgt:"
43 printu7$;" [211]chotten: "rr
44 printu9$;" [197]nglaender: "bb
45 printu1$;" [218]ufrieden ([202]/[206])?"
46 get w$:if w$<>"j"andw$<>"n"goto46
47 if w$="n"thenrun
50 for i=1 to26
51 d(1,i)=i:d(2,i)=i+128
52 next i
53 for a=1 to 2
54 for i=1 to 26
56 read p(a,i)
58 nexti
59 nexta
60 data 453,413,412,493,492,452,333,293,253,252,292,573,613,653,652,612
61 data 449,409,489,448,91,131,171,811,771,731
62 data 455,415,416,495,496,456,575,615,655,656,616,335,295,255,256,296
63 data 459,419,499,460,817,777,737,97,137,177
65 restore
90 pokeug,u3:printchr$(142)"[147]":pokeug,u6
100 for i=0to28
110 poke h+1,43
120 poke h+800+i,43
130 next i
140 for i=0 to 20
150 poke h+i*40,43
160 poke h+28+i*40,43
170 next i
200 for i=1 to 26
202 if s(1,i)<=0 then p(1,i)=x:goto207
205 poke g+p(1,i),d(1,i):pokeuc+p(1,i),u9
207 if s(2,i)<=0 then p(2,i)=x :goto215
210 poke g+p(2,i),d(2,i):pokeuc+p(2,i),u7
215 next i
220 fora=1 to 2
221 for j=1 to8
222 na$(1)=u9$+"schottische":na$(2)=u7$+"englische"
224 print""na$(a)"befehle"
227 print" "
229 on j goto 230,240,250,260,270,276,280,286
230 i=1:il=6:gosub3:ifaxthen235
231 print"[145]mitte (abcdef)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
232 for i=1 to 6
233 m(a,i)=n
234 next i
235 next j
240 i=7:il=11:gosub3:ifaxthen245
241 print"[145]links (ghijk)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
242 for i=7 to 11
243 m(a,i)=n
244 next i
245 next j
250 i=12:il=16:gosub 3:ifaxthen255
251 print"[145]rechts (lmnop)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
252 for i=12 to 16
253 m(a,i)=n
254 next i
255 nextj
260 i=17:il=20:gosub3:ifaxthen265
261 print"[145]reserve (qrst)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
262 for i=17 to 20
263 m(a,i)=n
264 next i
265 next j
270 i=21:il=23:gosub3:ifaxthenj=j+1:goto278
271 print"[145]bogenschuetzen links (uvw)?";:gosub5:n$=i$:gosub 800:ifn=99then224
272 for i=21 to23
273 m(a,i)=n
274 next i
275 next j
276 print"[145]schussrichtung?";:gosub5:n$=i$
277 gosub 800:if n=99 then 224
278 f(a,1)=n
279 next j
280 i=24:il=26:gosub3:ifaxthenj=j+1:goto288
281 print"[145]bogenschuetzen rechts (xyz)?";:gosub5:n$=i$:gosub 800:if n=99 then 224
282 for i=24 to 26
283 m(a,i)=n
284 next i
285 next j
286 print"[145]schussrichtung? ";:gosub5:n$=i$
287 gosub 800:if n=99 then 224
288 f(a,2)=n
289 nextj
290 print" "
297 next a
299 print" "
300 for c=1 to 30
310 for b= 1to2
312 bb=0:rr=0
320 gosub 600
323 if s(b,q)<=0 then goto 320
325 pokeuc+p(b,q),u1
330 if b=1 then e=2
335 if b=2 then e=1
337 if peek(g+p(b,q)+m(b,q))=43 then490
340 for a=1 to 26
345 if p(b,q)+m(b,q)=p(b,a) goto490
360 if p(b,q)+m(b,q)=p(e,a) goto 370
365 nexta
366 goto 480
370 gosub 650
372 pokeg+p(b,q),32
375 if(s(b,q)+r)>=(s(e,a)+v)goto420
385 s(b,q)=s(b,q)-1
390 s(e,a)=s(e,a)-1
395 if s(b,q)=0 then p(b,q)=x
400 if s(e,a)>9 then s(e,a)=9
405 m(b,q)=0
410 goto 480
420 s(b,q)=s(b,q)+1
425 s(e,a)=s(e,a)-1
426 if e=1 then p(e,a)=p(e,a)-1
427 if e=2 then p(e,a)=p(e,a)+1
430 if s(e,a)=0 then p(e,a)=x
435 poke g+p(b,q),32:pokeuc+p(b,q),u3
440 if s(b,q)>9 then s(b,q)=9
455 for y=1 to 26
457 if a=y goto 463
460 if p(e,a)<>p(e,y) and p(e,a)<>p(b,y)goto 463
461 s(e,a)=0:p(e,a)=x
462 goto475
463 nexty
475 poke g+ p(e,a),d(e,a):pokeuc+p(e,a),18-4*e
480 pokeg+p(b,q),32:p(b,q)=p(b,q)+m(b,q)
482 if p(b,q)<30 then p(b,q)=x:s(b,q)=0
483 if p(b,q)>830 then p(b,q)=x:s(b,q)=0
490 poke g+ p(b,q),d(b,q):pokeuc+p(b,q),18-4*b
492 if q>20 then gosub 900
495 next b
496 for a=1to26
497 rr=rr+s(2,a):bb=bb+s(1,a)
498 next a
499 printue$;"...tot"
500 print" "
501 printu8$;"[145]punkte..."u7$;"r:"rr;u9$;"b:"bb;ur$;" minuten:"c:printu8$;
510 nextc
511 t=t+1
515 printue$;"***ende einer halben stunde kampf***"
516 fora=1to5:forj=1to100:pokeug,uu:nextj:pokeug,u6:forj=1to100:nextj:nexta
520 fora=1to3500:nexta:printu1$;
521 ifbb=>3*rr/2thenprint"englische niederlage!!!hoch bonnie prince charlie!":goto1000
522 ifrr=>3*bb/2then print"englischer sieg!+++++++++++++fuck!":goto1000
524 if t>=3then print"*es wird spaet- die leute sind muede!*":goto550
525 goto 90
550 for a=1 to 3000:nexta
552 print"geht's weiter? (j/n)";
555 getn$:ifn$="" then 555
557 printn$:if n$="j"then570
559 printu7$;"englaender haben noch "rr"truppen"
560 printu9$;"schotten:noch";bb;"truppen":printu8$;
562 if bb>rr then print"knapper schottischer sieg!":goto1000
564 if rr>bb then print"knapper englischer sieg!":goto1000
566 print"*** unentschieden ***":goto1000
570 print"neuordnung der streitkraefte ? (j/n)"
574 print""
575 getn$:ifn$="" then 575
576 if n$="n" then 90
578 goto 53
600 q=rnd(1)*26+1
610 q=int(q)
620 return
650 for z=1 to 10:pokeuv,15:pokeuw,33:poke uh,int(rnd(1)*20+2)
675 poke g+p(b,q),102
680 poke g+p(e,a),102
685 poke g+p(b,q),d(b,q)
690 pokeg+p(e,a),d(e,a)
691 nextz:pokeuv,0:pokeuw,129
692 r=rnd(1)*4+1
693 v=rnd(1)*4+1
694 r=int(r)
695 v=int(v)
696 return
700 q=rnd(1)*4+2
705 q=int(q)
710 return
800 if n$="no" then n=-39:return
805 if n$="nw" then n=-41:return
810 if n$="so" then n=41:return
815 if n$="sw" then n= 39:return
818 if n$="ok" then n=0:return
820 if n$="o" then n=1:return
825 if n$="w" then n=-1:return
830 if n$="n" then n=-40:return
835 if n$="s" then n=40:return
836 n=99
837 print"*** illegaler befehl! ***
838 [129] y[178]1 [164] 2000:[130] y
839 [153]" "
840 [142]
900 m[178]1
901 [139] q[177]23 [167] m[178]2
902 [139] f(b,m)[178]1 [176] f(b,m)[178][171]1 [167] ff[178]64
903 [139] f(b,m)[178]40 [176] f(b,m)[178][171]40 [167] ff[178]93
904 [139] f(b,m)[178]41 [176] f(b,m)[178][171]41 [167] ff[178]77
905 [139] f(b,m)[178]39 [176] f(b,m)[178][171]39 [167] ff[178]78
906 [139] f(b,m)[178]0 [167] [142]
907 [129] a[178]1[164]5
908 f[178]a[172]f(b,m)
909 kl[178][194](g[170]p(b,q)[170]f):[139]kl[178]43[167] [151]uv,0:[142]
910 [139] kl[178]32[167] [151] g[170]p(b,q)[170]f,ff:[137]916
911 [151] uv,15:[151]uw,33
912 [129] i[178]1 [164]26:[151]uh,200[171]i
913 [139] p(b,i)[178]p(b,q)[170]f [167] [137]920
914 [139] p(e,i)[178]p(b,q)[170]f [167] [137] 930
915 [130] i
916 [151] g[170]p(b,q)[170]f,32:[151]uc[170]p(b,q)[170]f,u3
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
918 [142]
920 [151] g[170]p(b,i),32:[151]uc[170]p(b,i),u3
922 s(b,i)[178]0:p(b,i)[178]x
923 [151] g[170]p(b,i),d(b,i):[151]uc[170]p(b,i),18[171]4[172]b
925 [151]uv,0:[151]uw,129:[142]
930 [151] g[170]p(e,i),32:[151]uc[170]p(e,i),u3
932 s(e,i)[178]0:p(e,i)[178]x
933 [151] g[170]p(e,i),d(e,i):[151]uc[170]p(e,i),18[171]4[172]e
935 [151]uv,0:[151]uw,129:[142]
1000 [161]a$:[139]a$[178]""[167]1000
1001 [138]
63900 [143] farb/ton codes
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
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]""
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"
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"
63920 [151] ua,55:[151]ud,100:[151]uw,129
63930 [142]