home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game On 1990 April
/
Game_On_90-04_1990_-_de_Side_B.d64
/
main
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
13KB
|
484 lines
0 if a=0 then a=1:load"flagfight1",8,1
1 if a=1 then a=2:gosub51000
2 if a=2 then a=3:load"flagfight2",8,1
3 if a=3 then a=4:load"flagfight3",8,1
4 if a=4 then a=5:load"scene"+chr$(c+64),8,1
5 if a=5 then a=6:load"flagfight4",8,1
6 if a=6 then a=7:load"flagfight5",8,1
7 if a=7 then a=8:load"flagfight6",8,1
9 poke53280,0:poke53281,0:gosub5000
10 poke53272,18
20 print"[147][152]":poke650,128
30 sys49664 : rem *** bildschirm kopie
45 gosub50000
47 :sys ad
50 f2=1:x=0:sp=0:me=128:ifx1<>1thengosub7000
55 gosub1000
60 f2=7:x=0:sp=1:me=192:gosub7000:gosub1000
100 f2=1:x=0:sp=0:me=128:gosub7500:gosub10000
110 f2=7:x=0:sp=1:me=192:gosub7500:gosub10000
120 x1=1:sp=0:gosub7000:fori=1to30:mp(i,0,1)=mp(i,0,0):mp(i,1,1)=mp(i,1,0):nexti
130 fori=1to30:an(i,0)=0:an(i,1)=0:nexti
140 fori=1to30:ef(i,0)=ef(i,0)+5:ef(i,1)=ef(i,1)+5
150 if ef(i,0)>99then ef(i,0)=99
160 if ef(i,1)>99then ef(i,1)=99
165 if ga(1,0) =0 then poke53272,21:gosub60000
166 if ga(1,1) =0 then poke53272,21:gosub60100
170 nexti
500 goto50
990 end
991 :*** move phase ****
992 :
1000 f1=3:gosub3000:if x=1then return
1010 pe=peek(53244)*40+peek(53245)+1024
1020 bu=peek(pe):ifbu>me and bu<me+30 then 1030
1025 goto1000
1030 if x = 0 then gosub 4000
1040 gosub 2000
1045 poke214,24:poke211,0:sys58732
1047 print" ";
1050 if x=0 then 1000
1055 return
2000 :
2010 :rem *** move subroutine ***
2020 if x=1 then return
2030 getke$:ifke$=""then2030
2040 zw=pe
2060 ifke$="m"then poke53246,1:gosub2180:rem runter
2070 ifke$="i"then poke53246,2:gosub2190:rem hoch
2080 ifke$="j"then poke53246,4:gosub2200:rem links
2090 ifke$="k"then poke53246,3:gosub2210:rem rechts
2100 ifke$="u"then poke53246,5:gosub2220:rem lhoch
2110 ifke$="o"then poke53246,6:gosub2230:rem rhoch
2120 ifke$="n"then poke53246,8:gosub2240:rem lrunt
2130 ifke$=","then poke53246,7:gosub2250:rem rrunt
2135 ifke$="v"then ef(ei,sp)=ef(ei,sp)-10:gosub 2255
2137 ifke$="e"then gosub6010:rem info
2140 ifke$=chr$(13) then poke53248+39,3:return
2150 :
2160 goto2030
2170 :
2180 gosub2270:pe=pe+40:gosub2290:pokepe,bu:gosub2420:return
2190 gosub2270:pe=pe-40:gosub2290:pokepe,bu:gosub2420:return
2200 gosub2270:pe=pe-1:gosub2290:pokepe,bu:gosub2420:return
2210 gosub2270:pe=pe+1:gosub2290:pokepe,bu:gosub2420:return
2220 gosub2270:pe=pe-41:gosub2290:pokepe,bu:gosub2420:return
2230 gosub2270:pe=pe-39:gosub2290:pokepe,bu:gosub2420:return
2240 gosub2270:pe=pe+39:gosub2290:pokepe,bu:gosub2420:return
2250 gosub2270:pe=pe+41:gosub2290:pokepe,bu:gosub2420:return
2251 :
2255 if ve(ei,sp) = 1 then return
2256 mp(ei,sp,1)=mp(ei,sp,1)-3
2257 if mp(ei,sp,1)<0 then mp(ei,sp,1)=mp(ei,sp,1)+3:return
2258 ve(ei,sp)=1:gosub4000:return
2260 :
2270 ba=peek(pe+29696):bf=peek(pe+30720):pokepe,ba:pokepe+54272,bf:return
2280 :
2290 if pe>1983 or pe<1024 or peek(pe)>127orpeek(pe)=0 then pe=zw:goto2400
2300 :
2310 :rem *** hier movepoints abfrage
2315 :
2320 ab=1
2330 if peek(pe)=65 then ab=2
2340 if peek(pe)=66 then ab=3
2350 if peek(pe)>66 and peek(pe)<73then ab=4
2360 if peek(pe)=74 then ab=3
2365 if peek(pe)=73 then ab=5
2370 if peek(pe)>74andpeek(pe)<84 then ab=6
2380 mp(ei,sp,1)=mp(ei,sp,1)-ab:ef(ei,sp)=ef(ei,sp)-1
2390 if mp(ei,sp,1)<0thenmp(ei,sp,1)=mp(ei,sp,1)+ab:pe=zw:ef(ei,sp)=ef(ei,sp)+1
2395 ve(ei,sp)=0:gosub 4000
2400 return
2410 :
2420 pokepe+54272,f2:if pe<>zw thensysad
2430 return
3000 :
3010 :rem *** sprmove subroutine ***
3015 :
3020 poke53248+21,1:poke53248+39,f1
3030 getke$:ifke$=""then3030
3040 :
3060 ifke$="m"then poke53246,1:sysad
3070 ifke$="i"then poke53246,2:sysad
3080 ifke$="k"then poke53246,3:sysad
3090 ifke$="j"then poke53246,4:sysad
3100 ifke$="u"then poke53246,5:sysad
3110 ifke$="o"then poke53246,6:sysad
3120 ifke$=","then poke53246,7:sysad
3130 ifke$="n"then poke53246,8:sysad
3135 ifke$="h"then poke53246,9:sysad
3140 ifke$=chr$(13) thenpoke53248+39,6:return
3145 ifke$="x"then x=1:return
3150 :
3160 goto3030
3170 :
3990 :
3991 : *** einheit ermitteln ***
3992 :
4000 poke214,24:poke211,0:sys58732:ei=bu-me
4010 print" einheit nr. :";ei;"bewegungspunkte :";mp(ei,sp,1);
4020 if mp(ei,sp,1) < 10 then print"[157] ";
4030 return
5000 dim mp(30,1,1),an(30,1)
5010 dimga(30,1),af(30,1),vf(30,1),st(30,1),ve(30,1),ra(30,1),ef(30,1)
5015 fori=0to30:ga(i,0)=0:ga(i,1)=0:nexti
5020 gosub20000
5030 ad=49152:poke53246,9:sysad:x=0:zw=0:
5040 fori=1to30:ef(i,0)=99:ef(i,1)=99:nexti
5050 return
6000 :
6001 rem*** informationenaufruf ***
6002 :
6010 poke53248+21,0:sys50176 :rem bildschirm sichern
6015 o=13:x$="":gosub6500:if ei>9 then o=12
6020 print"[152]";
6030 print"[176]#############################[174]"
6035 fori=0to7:print" ":nexti
6040 print"";x$;"%einheit nr.: ";ei;spc(o);"%"
6050 printx$;"%gattung : ";ga$;"%"
6055 o=13:if mp(ei,sp,1) > 9 then o=12
6060 printx$;"%bewegungsp.: ";mp(ei,sp,1);spc(o);"%"
6065 o=13:if vf(ei,sp) > 9 then o=12
6070 printx$;"%verteid.fa.: ";vf(ei,sp);spc(o);"%"
6075 o=13:if af(ei,sp) > 9 then o=12
6080 printx$;"%angriffsfa.: ";af(ei,sp);spc(o);"%"
6085 o=13:if ra(ei,sp) > 9 then o=12
6090 printx$;"%aktionsrad.: ";ra(ei,sp);spc(o);"%"
6095 o=13:if st(ei,sp) > 9 then o=12
6096 if st(ei,sp) > 99then o=11
6100 printx$;"%staerke : ";st(ei,sp);spc(o);"%"
6105 o=13:if ef(ei,sp) > 9 then o=12
6106 printx$;"%moral : ";ef(ei,sp);spc(o);"%"
6120 if ve(ei,sp)=1then printx$;"% -verschanzt %"
6130 printx$;"[173]#############################[189]"
6140 getke$:ifke$=""then6140
6150 poke53248+21,1:sys49920:return
6500 if ga(ei,sp)=1 then ga$="bogensch&tzen"
6510 if ga(ei,sp)=2 then ga$="armbrustsch&tzen"
6520 if ga(ei,sp)=3 then ga$="kreuzritter"
6530 if ga(ei,sp)=4 then ga$="ritter"
6540 if ga(ei,sp)=5 then ga$="steinschleuder"
6550 if ga(ei,sp)=6 then ga$="bauern"
6560 if ga(ei,sp)=7 then ga$="s'ldner"
6570 if ga(ei,sp)=8 then ga$="morgensterne"
6580 if ga(ei,sp)=9 then ga$="kriegselefanten"
6590 if ga(ei,sp)=10 then ga$="fahnentr^ger"
6600 return
7000 sys50176:x$="":print"[152]";x$
7010 printx$;"[176]####################[174]
7020 [153]x$;"% bewegungsphase %
7030 printx$;"% spieler";sp+1;" %
7040 [153]x$;"/####################exp
7050 fori=0to1425:nexti
7060 sys49920:return
7500 sys50176:x$="":print"[152]";x$
7510 printx$;"[176]####################[174]
7520 [153]x$;"% angriffsphase %
7530 printx$;"% spieler";sp+1;" %
7540 [153]x$;"/####################exp
7550 fori=0to1425:nexti
7560 sys49920:return
9010 :
9020 :**** kampf radiusabfrage
9030 :
9040 :
10000 f1=3:gosub3000:poke53248+39,6:if x=1 then return
10002 rd=0
10010 pe=peek(53244)*40+peek(53245)+1024
10020 bu=peek(pe):ifbu>me and bu<me+30then 10030
10025 goto 10000
10030 gosub 4000
10035 ke$="":gosub10040
10037 goto10000
10040 get ke$:ifke$=""then 10040
10060 if ke$="a" then 10100:rem angriff
10070 if ke$="e" then gosub 6010:rem info
10075 if ke$=chr$(13)then 10090
10080 goto 10040
10090 poke214,24:poke211,0:sys58732
10091 print" ";:return
10100 if an(ei,sp)=1or ef(ei,sp)<40 then return
10200 f1=8:gosub3000
10210 p2=peek(53244)*40+peek(53245)+1024
10220 b2=peek(p2):ifb2<127 then return
10230 if pe > p2 then gosub 10500
10240 if pe < p2 then gosub 10600
10250 if rd=1 then an(ei,sp)=1:gosub30000
10260 if rd=0 then rd=0
10270 gosub10090:return
10500 fori=1tora(ei,sp)
10510 p3=pe-(40*i)+ra(ei,sp)+1:p4=p3-(2*ra(ei,sp))-2
10520 if p3 > p2 and p4 < p2 then rd=1:h=i:i=ra(ei,sp)
10530 nexti
10540 gosub 10560
10550 return
10560 if pe+ra(ei,sp)+1> p2 and pe-ra(ei,sp)-1 < p2 then rd=1
10570 return
10600 fori=1tora(ei,sp)
10610 p3=pe+(40*i)-ra(ei,sp)-1:p4=p3+(2*ra(ei,sp))+2
10620 if p3 < p2 and p4 > p2 then rd=1:i=ra(ei,sp)
10630 nexti
10640 gosub 10560
10650 return
20000 ei=1:sp=0:ge=150:ar=3080
20005 if ei = 30 then gosub20660:goto20060
20010 gosub 20090
20020 gosub 20160
20030 sys28672,9,1,10
20040 a=peek(53247)+1
20050 on a gosub 20300,20340,20380,20420,20460,20500,20540,20580,20620,20660
20060 if sp=0thengoto20005
20070 if sp=1thengoto20005
20080 g=10:r=1:m=5:ag=1:v=10:sp=0:ei=1:s=25:gosub20980
20085 g=10:r=1:m=5:ag=1:v=10:sp=1:ei=1:s=25:gosub20980
20090 print"[147][155]"
20100 print"[176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]
20110 [153]"peek spieler : ";sp[170]1;" peek"
20120 [153]"/lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenexp
20130 print"mobilisierungspunkte :";ge
20140 print"bitte waehlen sie einheit nr.";ei+1;"aus."
20150 return
20160 print"[152]"
20170 print"[176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]
20180 [153]"peek bogenschuetzen peek
20190 print"[194] armbrustschuetzen [194]
20200 [153]"peek kreuzritter peek
20210 print"[194] ritter [194]
20220 [153]"peek steinschleuder peek
20230 print"[194] bauern [194]
20240 [153]"peek soeldner peek
20250 print"[194] morgensterne [194]
20260 [153]"peek kriegselefanten peek
20270 print"[194] ende [194]
20280 [153]"/lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenexp
20295 print"[159](c) by andreas schwedhelm, michael klamt":return
20300 r=3:s=60:g=1:m=7:ag=1:v=1:pr=6
20310 gosub20670
20320 on a gosub 20950,20760
20330 return
20340 r=2:s=35:g=2:m=8:ag=1:v=1:pr=7
20350 gosub20670
20360 on a gosub 20950,20760
20370 return
20380 r=1:s=50:g=3:m=12:ag=5:v=6:pr=12
20390 gosub20670
20400 on a gosub 20950,20760
20410 return
20420 r=1:s=75:g=4:m=14:ag=3:v=4:pr=10
20430 gosub20670
20440 on a gosub 20950,20760
20450 return
20460 r=5:s=10:g=5:m=6:ag=0:v=1:pr=2
20470 gosub20670
20480 on a gosub 20950,20760
20490 return
20500 r=1:s=225:g=6:m=7:ag=1:v=1:pr=7
20510 gosub20670
20520 on a gosub 20950,20760
20530 return
20540 r=1:s=100:g=7:m=8:ag=2:v=2:pr=8
20550 gosub20670
20560 on a gosub 20950,20760
20570 return
20580 r=1:s=65:g=8:m=8:ag=3:v=1:pr=4
20590 gosub20670
20600 on a gosub 20950,20760
20610 return
20620 r=1:s=5:g=9:m=5:ag=15:v=20:pr=8
20630 gosub20670
20640 on a gosub 20950,20760
20650 return
20660 ar=3592:sp=sp+1:ge=150:ei=1:return
20670 print"[152]"
20680 print"[176][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
20690 print"[194] kaufen [194]"
20700 print"[194] information [194]"
20710 print"[194] zurueck [194]"
20720 print"[173][195][195][195][195][195][195][195][195][195][195][195][195][195][189]"
20730 sys28672,2,14,13
20740 a=peek(53247)+1
20750 return
20760 print"[152]"
20770 print"[176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
20780 print"[194] bewegungsp.: [194]"
20790 print"[194] staerke : [194]"
20800 print"[194] angriffsfa.: [194]"
20810 print"[194] verteid.fa.: [194]"
20820 print"[194] radius : [194]"
20830 print"[194] preis : [194]"
20840 print"[173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]"
20850 print""
20860 x$=""
20870 printx$;m
20880 printx$;s
20890 printx$;ag
20900 printx$;v
20910 printx$;r
20920 printx$;pr
20930 getke$:ifke$=""then20930
20940 return
20950 ge=ge-pr
20960 if ge<1 then ge=ge+pr:return
20970 fori=0to7:pokeei*8+ar+i,peek(3320+g*8+i):nexti:ei=ei+1
20980 mp(ei,sp,0)=m:mp(ei,sp,1)=m
20990 vf(ei,sp)=v:af(ei,sp)=ag
21000 st(ei,sp)=s:ra(ei,sp)=r
21010 ga(ei,sp)=g
21020 return
30000 if sp=0 then i=1:mu=192
30010 if sp=1 then i=0:mu=128
30020 e1=peek(p2)-mu:hi=29696
30030 if ef(e1,i)<25then pokep2,peek(p2+29696):poke54272+p2,peek(p2+30720)
30035 of=1
30040 if peek(pe+hi)=65 then of=.9
30050 if peek(pe+hi)=66 then of=.8
30060 if peek(pe+hi)>66 and peek(pe+hi)<73then of=.5
30070 if peek(pe+hi)=74 then of=1.2
30080 if peek(pe+hi)=73 then of=1.5
30090 if peek(pe+hi)>74andpeek(pe+hi)<84 then of=.25:rem *******
30095 de=1
30100 if peek(p2+hi)=65 then de=1.1
30110 if peek(p2+hi)=66 then de=1.3
30120 if peek(p2+hi)>66 and peek(p2+hi)<73then de=0.5
30130 if peek(p2+hi)=74 then de=1.2
30140 if peek(p2+hi)=73 then de=1.5
30150 if peek(p2+hi)>74andpeek(p2+hi)<84 then de=0.25
30151 if ve(e1,i)=1then de=de+0.2
30152 if ga(ei,sp)=1then dd = 3:goto 40000
30153 if ga(ei,sp)=2then dd = 5:goto 40000
30154 if ga(ei,sp)=5then dd = 20 :goto 40000
30155 ag=of*st(ei,sp)*af(ei,sp)*(ef(ei,sp)/100)
30160 df=af(e1,i)*st(e1,i)*de*(ef(e1,i)/100)
30170 od=st(ei,sp)/st(e1,i)
30180 if od < .14 then b=2:r=3
30190 if od > .13 and od < .26 then b=2:r=2.5
30200 if od > .25 and od < 5 then b=2:r=2
30210 if od > 4 and od < 7 then b=2.5:r=2
30220 if od > 6 then b=3:r=2
30222 rm = 1
30224 if ef(e1,i)<75 then rm = 100/ef(e1,i)/1.1
30226 bm=1
30228 if ef(e1,sp)<85 then bm= 100/ef(ei,sp)
30230 v1=df/vf(ei,sp)/b*bm/1.5:v1=int(v1)
30231 if de < 1 then de=1
30232 v2=ag/vf(e1,i)/r*rm/1.5/de:v2=int(v2)
30233 d=st(ei,sp):e=st(e1,i)
30235 st(ei,sp)=st(ei,sp)-v1:st(e1,i)=st(e1,i)-v2
30240 if st(e1,i)<1 then gosub 30850
30245 if st(ei,sp)<1 then gosub 30800
30250 x1=v1/st(ei,sp):x2=v2/st(e1,i):x1=x1*10:x1=int(x1):x2=x2*10:x2=int(x2)
30252 ef(ei,sp)=ef(ei,sp)-5-x1
30255 ef(e1,i)=ef(e1,i)-2-x2
30260 if ef(e1,i)<21 then gosub 30850
30270 if v1 > d then v1 = d
30275 if v2 > e then v2=e
30295 gosub30300
30297 return
30300 poke53248+21,0:sys50176 :rem bildschirm sichern
30310 o=13:x$="":if ei>9 then o=12
30320 print"[152]";
30330 print"[176]#############################[174]"
30340 forz=0to3:print" ":nextz
30350 print"";x$;"% angreifer %"
30370 o=13:if st(ei,sp) > 9 then o=12
30375 if st(ei,sp) >99 then o=11
30380 printx$;"%st^rke : ";st(ei,sp);spc(o);"%"
30390 o=13
30391 if v1 > 9 then o=12
30392 if v1 > 99then o=11
30393 printx$;"%verluste : ";v1;spc(o);"%"
30394 o=13:if ef(ei,sp) > 9 then o=12
30400 printx$;"%morale : ";ef(ei,sp);spc(o);"%"
30410 printx$;"[173]#############################[189]"
30420 getke$:ifke$=""then30420
30510 o=13:if i>9 then o=12
30520 print"[152]";
30530 print"[176]#############################[174]"
30540 forz=0to3:print" ":nextz
30550 print"";x$;"% verteidiger %"
30570 o=13:if st(e1,i) > 9 then o=12
30575 if st(e1,i) > 99then o=11
30580 printx$;"%st^rke : ";st(e1,i);spc(o);"%"
30590 o=13
30591 if v2 > 9 then o=12
30592 if v2 > 99then o=11
30593 printx$;"%verluste : ";v2;spc(o);"%"
30594 o=13:if ef(e1,i) > 9 then o=12
30600 printx$;"%morale : ";ef(e1,i);spc(o);"%"
30620 getke$:ifke$=""then30620
30630 poke53248+21,1:sys49920:return
30800 pokepe,peek(pe+29696):poke54272+pe,peek(pe+30720):ef(ei,sp)=0
30810 ga(ei,sp)=0:return
30850 pokep2,peek(p2+29696):poke54272+p2,peek(p2+30720):ef(e1,i)=0
30860 ga(e1,i)=0:return
40000 if de <= 0 then de = 1
40005 d=st(e1,i)
40010 fe=st(ei,sp)*(ef(ei,sp)/100)/de
40015 if h <= 0 then h=1
40020 fe=(3/h)*fe
40030 au=mp(e1,i,1)/8
40040 if au < 1 then au =1
40050 su = vf(e1,i)/dd
40060 if su > 10 then su =10
40070 if au < .2 then su =.3
40080 if st(e1,i)<30 then dn = .9
40090 if st(e1,i)>29 and st(e1,i)<60 then dn =1
40100 if st(e1,i)>59 then dn=1.1
40110 v1=0:v2=fe/au/su*dn/8:v2=int (v2)
40115 st(e1,i)=st(e1,i)-v2
40120 ef(ei,sp)=ef(ei,sp)-5:ef(e1,i)=ef(e1,i)-5
40130 if v2 > d then v2=d
40140 if st(e1,i)< 1 then gosub 30850
40150 if ef(e1,i)< 21 then gosub 30850
40160 gosub 30300
40170 return
50000 fori=1to15
50010 if ga(i,0)=0theni=16:goto50030
50020 poke1225+i*40,i+128:poke55296+201+i*40,1
50030 nexti
50040 fori=1to15
50050 if ga(i+15,0)=0theni=16:goto50070
50060 poke1226+i*40,i+128+15:poke55296+202+i*40,1
50070 nexti
50100 fori=1to15
50110 if ga(i,1)=0theni=16:goto50130
50120 poke1262+i*40,i+192:poke55296+i*40+238,7
50130 nexti
50140 fori=1to15
50150 if ga(i+15,1)=0theni=16:goto50170
50160 poke1263+i*40,i+192+15:poke55296+i*40+239,7
50170 nexti
50180 return
51000 poke53280,0:poke53281,0:print"[147][151]"
51010 print"[176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]
51020 [153]"peek scenario ? peek
51030 print"[171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]
51040 [153]"peek scenario 1 peek
51050 print"[194] scenario 2 [194]
51052 [153]"peek scenario 3 peek
51053 print"[194] scenario 4 [194]
51054 [153]"peek scenario 5 peek
51060 print"[173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]
51070 [153]"print#cursor up/down
51080 print"und return fuer
51090 [153]"auswahl.
51100 print"[155] written by andreas schwedhelm"
51110 print" and michael klamt '89"
51150 sys28672,4,1,8:c=peek(53247)+1
51160 return
60000 sp=2:goto60200
60100 sp=1:goto60200
60200 print"[152][147]
60220 [153]"
60221 print" sieg !!!
60222 [153]" -----------
60223 print"
60224 [153]" spieler";sp;"hat nach einer langen
60225 print" schlacht gewonnen.
60226 [153]" gratulation ...
60300 geta$:ifa$=""then 60300
60310 print"wollen sie nocheinmal spielen (j/n)?"
60320 geta$:ifa$=""then60320
60330 if a$="j"then run
60340 sys 64378