0 clr:poke36879,8:poke36869,205:print"{$04}{clr}{dish}{down}{down}{down}{down}{down}{down}{down}{down}{down}{yel}SORCERY {grn}{rvon}HI{up}{left}{left}FG 1 print"{down}{down}{wht}(C) B.Jones 1984":print"{down}hit f1{down}":gosub8:r=rnd(-asc(a$)*1e3):ifa$="{F1}"thenr=rnd(-f*ti) 2 print"wait":gosub9000:gosub5:poke36879,28:gosub55:goto700 3 sys5057:return 4 sys5046:return 5 sys5035:return 6 poke255,g(x)/2^16:poke252,g(x)/256and255:poke251,g(x)-peek(255)*65536and255 7 sys6747:return 8 f=1:ifpeek(198)>1thenpoke198,1 9 f=f+1:geta$:ifa$=""then9 10 return 12 b$="":printp$; 13 gosub8:ifa$=chr$(20)thena$="":ifb$>""thenb$=left$(b$,len(b$)-1):printp$b$; 14 ifa$=chr$(13)orlen(b$)=7thenpoke198,0:goto60 16 if(a$<"a"ora$>"z")and(a$<"0"ora$>"9")then13 17 b$=b$+a$:printa$;:goto13 20 gosub8:forx=len(p$)to1step-1:ifmid$(p$,x,1)<>a$thennext 21 return 25 ifpeek(4612)<238thenpoke4612,239:return 26 print:return 30 x=.:ifp=.thenreturn 32 print"{$04}{red}{$02}{clr}";:fori=1top:printchr$(64+i)")"; 34 printleft$(p$(i)+" ",9);:ifi<>3andi<>pthen44 37 print"SELECT/RET"; 38 gosub8:ifa$>="a"anda$<=chr$(64+p)thenx=asc(a$)-64:goto60 40 ifa$<>chr$(13)then38 41 print"{clr}"; 44 next:goto60 48 print"sure? "; 49 gosub8:ifa$="y"thenprint"yes":return 50 ifa$="n"thenprint"no":return 51 goto49 52 ifp=xthenp=p-1:return 53 fori=x+1to6:p$(i-1)=p$(i):forj=0to21:p%(j,i-1)=p%(j,i):next:next:p=p-1:return 55 print"{$04}{clr}{red}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{rvon}8888888888888888888888{rvof}";:return 60 print"{$02}{clr}";:return 62 print"{$02}{clr}RETURN{$03}";:gosub8:ifa$<>chr$(13)then62 63 return 65 print"{$04}{pur}{$02}{clr}"p$(x)":"r$"RETURN";:gosub8:ifa$<>r$then65 66 print"{$04}{red}{$03}":return 99 print"{$04}{red}{$03}"p$(x)" has died. 100 gosub950:gosub52:gosub62:ifp>.thenprintp"member"left$("s",-(p>1))" left.":return 102 print"{$04}{blk}{$03}All members have died.":print"{$02}{clr}This"r$"adventure"r$"is over. 104 print"{$04}{blu}{$02}f1 to play."; 106 gosub8:ifa$<>"{F1}"then106 108 run 110 a=.:print"{$02}{clr}"; 112 forj=t1tot2:printchr$(65-t1+j)")"left$(t$(j)+" ",9); 113 if(j-t1+1)/4<>int((j-t1+1)/4)andj<>t2then124 114 print"SEL/RET/SP"; 116 gosub9:ifa$<>r$anda$<>" "anda$<"a"anda$>chr$(65+t2-t1)then116 118 print"{$02}{clr}"; 120 ifa$=" "thenreturn 122 ifa$>="a"anda$<=chr$(65+t2-t1)thena=asc(a$)-65:return 124 next:goto112 130 print"CRUNCH!":return 140 print"The "t$(d%(.,g)+34)r$"dodges clear.":return 150 print"The "t$(d%(.,g)+34)r$"takes the blow with it's armour.":return 160 fori=0to3:printmid$("vulaccstkarm",1+i*3,3)d%(i+1,g);:gosub25:next 162 print"agl"d%(6,g);:gosub25:print"hit"d%(7,g):return 170 a=asc(a$)-65:y=p%(.,x):printt$(a) 171 ify=5anda<9anda>2anda<>1or(y=1ory=2)anda<9anda>4thenprint"Not in your class":goto735 172 ifa<9theny=w%(3,a):ifp%(4,x)>=ythen763 173 goto761 175 print"quit":gosub48:ifa$="y"thenrun 176 goto360 180 print"withdraw":print"speeds: 181 z=1e3:fori=1top:k=int(p%(3,i)/10):printp$(i);:poke4612,242:printk:ifkkthenprint"You outrun them.":goto192 188 ifz=korrnd(1)>.8thenprint"They don't chase you.":goto192 189 print"Too slow!":ifrnd(1)<.6then540 190 goto584 192 ifd%(7,g)9)ornotzand(a=.ora>1anda<10)orp%(5,x)k%(.,a)thenprint"There is a harmless puff of smoke.":return 226 ifa=3ora=6ora=8theniffnr(100)>d%(4,g)thenz=.:goto150 228 ona+1gosub258,230,232,234,238,240,242,244,246,248,250,254,256:z=.:return 230 r=fnr(484):return 232 d%(2,g)=d%(2,g)*.85:print"The room dims.":return 234 d%(7,g)=d%(7,g)-7:print"Snakes of energy"r$"engulf 'em.":return 238 d%(6,g)=d%(6,g)*.97+.5:return 240 d%(2,g)=d%(2,g)*.97+.5:return 242 d%(7,g)=d%(7,g)-10:print"Heat and flames fly atthem.":return 244 d%(6,g)=d%(6,g)*.85:print"Wind & ice hail 'em.":return 246 d%(7,g)=d%(7,g)-4:print"A heatflash burns 'em.":return 248 d%(3,g)=d%(3,g)*.97:return 250 y=x:gosub30:ifx=.thenz=-1:return 251 p%(2,x)=p%(2,x)+30:ifp%(2,x)>t%(5,p%(.,x))thenp%(2,x)=t%(5,p%(.,x)) 252 return 254 gosub30:ifx=.thenz=-1:return 255 p%(6,x)=.:return 256 if(l%(r)and32)=.thenprint"Nothing happens.":return 257 l%(r)=l%(r)-16:poke38105,2:fori=1to200:next:poke38105,.:return 258 print"Light and blue mist engulf everyone. 260 l%(r)=l%(r)and24703:d%(.,g)=-1:forx=1top:p%(5,x)=p%(5,x)*.9 262 next:return 270 z=.:gosub205:ifnotzthen320 271 goto360 290 ifp%(7,x)=.thenreturn 291 if(p%(7,x)and31)>.thenp%(7,x)=p%(7,x)-1:return 292 p%((p%(7,x)and224)/32,x)=p%(7,x)/256:print"{$04}{blu}{$03}The potion has worn"r$"off. 293 p%(7,x)=.:return 300 ifp=.thengosub899:goto708 302 print"{$02}{clr}Which"r$"entrance"r$"(1-4)?"; 304 gosub8:ifa$=r$then704 305 ifa$<"1"ora$>"4"then304 306 r=e%(val(a$)-1) 320 print"{$02}{clr}{$01}{clr}";:gosub3:x=19:gosub6:y=l%(r):ifyand1thenx=20:gosub6 322 ifyand8thenx=22:gosub6 324 ifyand4thenx=21:gosub6 326 ifyand64thenx=23:gosub6 328 g=(yand8064)/128:ifg=.then334 330 x=d%(.,g):gosub6:printt$(d%(.,g)+34) 334 s=.:ifyand48thenpoke4313,185:poke38105,.:print"chest 340 fori=0to3:if2^iandythenprintmid$("nswe",i+1,1)"."; 341 next 350 forx=1top:ifp%(6,x)=.then356 354 p%(6,x)=p%(6,x)-1:ifp%(6,x)=.thengosub99:goto350 356 next:l=l+1:ifl=40thenl=.:g%(.)=g%(.)-1:ifg%(.)<.thenforx=1top:print"{$04}{blk}{$03}starved":gosub99:next 358 ifg=.then360 359 print"{$03}"t$(34+d%(.,g)):gosub160:ifrnd(1)<-(d%(.,g)<7)*.4orrnd(1)<.15thenprint"They attack!":goto405 360 print"{$02}{clr}{$04}{red}{$03}":print">"; 364 p$="nswexuocaqr":gosub20:ifx=.then364 367 onxgoto390,390,390,390,380,650,600,270,400,175:gosub1000:goto360 380 print"exit":fori=0ton8:ife%(i)<>rthennext:print"No exit here.":goto360 384 print"The party emerges from exit "chr$(i+49)".":goto700 390 printmid$("northsouthwest east",x*5-4,5)"{$04}{blu}{$03}" 392 x=x-1:if(yand2^x)=.thenprint"You can't go that way.";:goto360 394 r=r+(x=0)*22-(x=1)*22+(x=2)-(x=3):goto320 400 print"attack 401 ifg=.thenprint"{$04}{blu}{$03}attack what?":goto360 405 forx=1top 406 gosub290 407 print"{$04}{cyn}{$02}{clr}"p$(x)":{$04}{red}{$02}"r$"Withdraw":ifp%(5,x)thenprint"Cast 408 print"Fight":print"Report"; 409 print"{$03}"r$"{$04}{cyn}{$03}"p$(x)":"r$"{$04}{red}{$03}>"; 410 gosub8:ifa$<>"w"anda$<>"f"andnot(a$="c"andp%(5,x)>.)anda$<>"p"anda$<>"r"then410 411 ifa$="r"thend=x:gosub1000:x=d:goto407 412 ifa$="c"then200 413 ifa$="w"then180 430 print"{$03}fight "; 431 t1=.:t2=8:gosub110:ifa$=" "thenprint"{$03}":goto407 434 print"{$03}"t$(a):ifa>3then438 435 ifa>1thena=a-2 436 ifp%(10+a,x)=.thenprint"You have no "t$(a+2)".":goto407 438 ifp%(a+8,x)=.thenprint"You don't have one.":goto407 440 ifa<2thenp%(a+10,x)=p%(a+10,x)-1 441 iffnr(100)w%(1,a)thengosub130:print"You miss.":goto500 448 iffnr(80)<=d%(6,g)thengosub140:goto500 450 ifd%(4,g)<=fnr(100)thengosub150:goto500 452 z=int(w%(2,a)+p%(1,x)/20+.2) 453 print"A hit!":print"The "t$(d%(.,g)+34)" loses"r$z"hit points. 454 d%(7,g)=d%(7,g)-z:ifd%(7,g)<=.thend%(7,g)=.:goto580 456 goto500 460 print"You leave yourself"r$"open.":ifrnd(1)>.008then470 462 z=fnr(9):ifp%(8+z,x)=.thenprint"But recover.":goto500 465 p%(8+z,x)=p%(8+z,x)-1:print"The "t$(d%(.,g)+34)r$"steals a "t$(z)".":goto405 470 ifp%(3,x)>fnr(80)thenprint"You squirm out of the "t$(d%(.,g)+34)"'s way.":goto500 472 z=20:fori=0to4:ifp%(i+17,x)thenz=z*a%(.,i)/100 474 next 480 iffnr(20)>zthenprint"Your armour takes the blow.":goto500 485 z=int(d%(3,g)/2):print"You're hit!":print"and lose"z;r$"points. 487 p%(2,x)=p%(2,x)-z:ifp%(2,x)<=.thengosub62:gosub99:goto405 500 gosub65 504 iffnr(100)>d%(1,g)then540 506 ifa<2thenprint"The "t$(d%(.,g)+34)r$"fumbles.":goto580 507 print"The "t$(d%(.,g)+34)r$"lets down their guard."r$"You lunge.":gosub65 510 iffnr(80)<=d%(6,g)thengosub140:goto580 514 iffnr(100)>d%(4,g)thengosub150:goto580 520 print"You strike home!":print"The "t$(d%(.,g)+34)r$"loses"int(w%(2,a)/2)"points. 524 d%(7,g)=d%(7,g)-w%(2,a)/2:ifd%(7,g)<.thend%(7,g)=. 526 goto580 540 print"The "t$(d%(.,g)+34)r$"leaps at you. 544 iffnr(100)>d%(2,g)thenprint"It misses.":goto580 547 iffnr(80)zthenprint"Your armour takes the blow.":goto580 557 print"Arrgghhhh!":print"You lose"d%(3,g)r$"hitpoints.":p%(2,x)=p%(2,x)-d%(3,g) 580 gosub65 581 print"Your hitpoints="p%(2,x):print:print"{$04}{cyn}{$03}"t$(d%(.,g)+34)":{$04}{blu}{$03}":gosub160 582 ifp%(2,x)<=.thenprintp$(x)" dies of"r$"wounds.":gosub62:gosub100:goto405 583 ifd%(7,g)=.thenprint"The band has killed"r$"it!":goto590 584 nextx:goto405 590 fori=1top:ifint(d%(5,g)/p)+p%(4,i)>32767thenp%(4,i)=32767 591 p%(4,i)=int(d%(5,g)/p)+p%(4,i):f=p%(22,i)+1:iff=999thenf=900 594 p%(22,i)=f:next:l%(r)=l%(r)and24703:d%(.,g)=-1 595 nk=nk+1:ifnk<16then598 596 nk=.:fori=.ton3:ifd%(.,i)=-1thengosub9400 597 next 598 print"Gold found:"d%(5,g):print"Gold each :"int(d%(5,g)/p):goto320 600 print"open chest":if(yand48)=.thenprint"Huh?":goto360 602 x=p:ifp>1thengosub30:ifx=.then360 603 print"{$03}"p$(x):if(yand32)>.andp%(.,x)<>3orrnd(1)<.06orp%(6,x)>.thenprint"It won't open.":goto350 604 poke4313,186:fori=1to400:next 605 poke4313,187:fori=1to400:next:ifyand16thenc=fnr(4)+fnr(2):d=rnd(1):goto608 606 c=fnr(9):d=rnd(1)*rnd(1) 608 ifd<.75then615 610 ifrnd(1)<.3thenprint"Poision Spores!":d=40:goto614 612 ifrnd(1)<.3thenprint"dust billows out.":goto630 613 print"It's empty.":goto630 614 printp$(x)" is ill.":p%(6,x)=d:goto630 615 printt$(15+c)".":g%(c)=g%(c)+1:ifc=.theng%(c)=g%(c)+fnr(20) 630 l%(r)=l%(r)and32719:y=fnr(484):l%(y)=l%(y)or16+fnr(2)*16:goto320 650 print"use":x=1:ifp>1thengosub30:ifx=.then360 652 t1=16:t2=23:gosub110:ifa$=" "then360 655 print"{$03}"p$(x)" uses "r$t$(a+16)".":ifg%(a+1)=.thenprint"Hey! What "t$(a+16)"?":goto360 656 g%(a+1)=g%(a+1)-1:ifa=4thena=fnr(8):ifa=4thena=6 657 print"gulp.":ona+1goto660,665,669,668,,672,672,660 660 ifp%(2,x)"; 710 gosub8:ifa$<>"g"anda$<>"r"then710 712 ifa$="r"thengosub1000:goto704 714 print"go {$02}{clr}Inn":print"Shop":print"Dungeons"; 718 gosub8:print"{$03}";:ifa$=r$thenprint:goto704 724 ifa$="i"thenprint"inn":goto860 728 ifa$="d"thenprint"dungeons":goto300 729 ifa$<>"s"then718 730 x=.:gosub55 731 print"{$04}{home}";:fori=0to13:printchr$(65+i)")"left$(t$(i),5)"{grn}";:ifi<9thenprintmid$(str$(w%(3,i)),2), 732 ifi>8thenprintmid$(str$(a%(2,i-9)),2), 734 print"{red}";:next:print"{blu}o)food{grn}1/2","{blu}p)aurora{grn}* {red}q)quit","{red}r)inventory","s)select"; 735 print"{$04}{red}{$03}":print">"; 736 gosub8:ifa$<"a"ora$>"s"then736 737 ifa$="q"thenprint"quit":goto700 738 ifa$="r"thenprint"inventory":gosub1050:goto731 739 ifa$="s"thenprint"select":gosub790:goto731 740 ifx=.thenprint:print"Who's buying?":print"Specify by select.":goto735 741 ifa$<"o"then760 742 ifa$="o"then750 743 print"aurora":p$="{$02}{clr}pay what?"+r$:gosub12:ifval(b$)>p%(4,x)then762 744 y=p%(.,x):p%(4,x)=p%(4,x)-val(b$) 745 p%(5,x)=p%(5,x)+val(b$)*(-.8*(y<2)-(y=2ory=4)-(y=5)*2) 746 ifp%(5,x)>t%(7,p%(.,x))thenp%(5,x)=t%(7,p%(.,x)):print"{$03}The absorption was"r$"wasteful. 747 print"{$03}="p%(5,x):goto731 750 print"food":p$="{$02}{clr}pay what?"+r$:gosub12:ifval(b$)>p%(4,x)then762 754 p%(4,x)=p%(4,x)-val(b$):g%(.)=g%(.)+val(b$)*2:print"{$03}="g%(.):goto731 760 goto170 761 ifa>8theny=a%(2,a-9):ifp%(4,x)>=ythen763 762 print"{$03}"p$(x)" can't afford":print"it.":goto735 763 ifa>8andp%(a+8,x)thenprint"{$03}You already have one.":goto735 765 p%(4,x)=p%(4,x)-y:p%(a+8,x)=p%(a+8,x)+1-34*(a=2ora=3) 766 print"="p%(a+8,x):goto735 790 print"{$02}{clr}Group":print"Member"; 791 gosub8:ifa$<>"g"anda$<>"m"anda$<>r$then791 792 x=.:ifa$="m"thengosub30 793 goto60 800 print"abandon ";:ifp=.thenprint:goto899 804 gosub30:ifx=.thenreturn 805 print"{$04}{red}{$03}"p$(x):gosub48:ifa$="n"thenreturn 810 goto52 830 print"save ":ifp=.thenz=.:goto899 834 gosub30:ifx=.thenreturn 835 gosub4:print"{clr}{blu}";:open1,1,1,"src{$03}{$03}{$01}{$03}{$01}" 840 print#1,p$(x):fori=0to22:print#1,chr$(p%(i,x)/256)chr$(p%(i,x)and255);:next:close1 845 gosub5:goto55 850 print"load":gosub48:ifa$="n"thenz=.:return 851 ifp=n1thenz=.:goto898 852 gosub4:print"{clr}{blu}load";:poke157,128:open1,1,0,"src{$03}{$03}{$01}{$03}{$01}":p=p+1:input#1,p$(p):printr$p$(p) 854 fori=0to22:get#1,a$:get#1,b$:p%(i,p)=asc(a$+chr$(0))*256+asc(b$+chr$(0)):next 855 if191andstthenprint"error":p=p-1:goto845 856 close1:goto845 860 gosub3:x=18:gosub6:print"{$04}{blu}{$01}{clr}The WinsomeWench Inn 863 print"{$02}{clr}Meet eXit Load Save Abandon":print"Report"; 864 print"{$04}{red}{$03}":print">"; 865 p$="mxlsar":gosub20:z=x=3orx=4:ifx=2thenprint"exit":goto700 866 ifx=.then865 867 onxgosub900,,850,830,800,1000:ifzthengosub55:goto860 868 goto863 898 print"{$04}{blu}{$03}":print"The party is full.":return 899 print"{$04}{blu}{$03}The party is empty.":return 900 print"meet":ifp=n1thenprint:goto898 901 print"{$04}{red}";:t1=28:t2=33:gosub110 907 x=a:p$="{clr}name?"+chr$(13):gosub12:ifb$=""thenreturn 910 p=p+1:p$(p)=b$:p%(.,p)=x:p%(1,p)=t%(.,x)+fnr(t%(1,x)-t%(.,x)) 914 p%(3,p)=t%(2,x)+fnr(t%(3,x)-t%(2,x)):p%(2,p)=t%(4,x)+fnr(t%(5,x)-t%(4,x)) 917 p%(5,p)=t%(6,x):fori=6to21:p%(i,p)=.:next:p%(4,p)=200 920 x=p:gosub950:print:print"{$04}{red}{$03}accept "b$:print"?"; 930 gosub49:ifa$="n"thenp=p-1 935 return 950 print"{$04}{blu}{$03}"t$(28+p%(.,x))": "p$(x):print 954 fori=0to4:printmid$("strhitaglgolaur",1+i*3,3)":"p%(i+1,x);:gosub25:next:print 956 ifp%(6,x)=.thenreturn 957 ifp%(6,x)<10thenprint"hea: dying":return 958 print"hea: ill":goto60 1000 print"report":ifp=.then899 1001 gosub790 1004 ifa$=r$then60 1005 print"{$02}{clr}Status":print"Inventory"; 1006 gosub8:ifa$<>"s"anda$<>"i"anda$<>r$then1006 1007 ifa$=r$then60 1010 print"{$04}{blu}{$03}";:ifa$="i"then1050 1014 ifxthen1024 1018 fori=1top:printchr$(48+i)")"p$(i);:poke4612,238:printt$(28+p%(.,i)):next:goto60 1024 goto950 1050 ifx=.then1080 1052 printp$(x)":":print"gold:"p%(4,x):print"aurora:"p%(5,x) 1056 fori=8to21:ifp%(i,x)thenprintt$(i-8)":";:poke4612,242:printp%(i,x) 1058 ifi=14thengosub62 1060 next:print:goto60 1080 print"group: 1081 fori=0to12:ifg%(i)thenprintt$(i+15);:poke4612,242:printg%(i):ifi=8thengosub62 1082 next:goto60 9000 i=1:j=1:deffnr(i)=int(rnd(ti)*i):r$=chr$(13) 9001 n1=6:n2=16:n3=45:n6=12:n7=63:n8=4:n9=483:n0=12:nt=5 9005 dimg(23),p%(22,n1),l%(483),t$(n7),t%(7,nt),d%(7,n3),w%(3,8),a%(2,4),k%(1,n6) 9010 dimg%(n0),m%(8,n2),e%(3),p$(n1) 9015 fori=0tont:forj=0to7:readt%(j,i):next:next:g%(.)=50 9020 fori=0ton2:forj=0to8:readm%(j,i):next:next 9025 fori=0ton7:readt$(i):next:fori=0ton6:forj=0to1:readk%(j,i):next:next 9027 fori=0to8:forj=0to3:readw%(j,i):next:next 9030 fori=0to4:forj=0to2:reada%(j,i):next:next 9100 data25,35,25,35,40,60,,,20,30,30,40,30,45,10,60,16,27,20,35,30,40,10,50 9105 data16,25,16,30,30,38,,,20,26,30,35,30,38,,20,20,26,30,40,35,40,10,110 9110 data70,60,3,90,6,13,4,8,30,70,60,3,90,12,16,6,9,35,70,40,5,95,10,18,6,9,38 9115 data50,30,4,80,16,24,9,13,30,40,20,5,60,24,30,17,25,28,30,30,6,50,26,35,59,85,28 9120 data30,30,6,40,26,30,67,96,30,20,25,8,25,30,45,242,347,25,40,40,3,60,30,38,26,38,30 9125 data20,35,8,20,40,55,338,413,34,20,35,6,40,40,50,121,148,34,15,40,7,20,50,60,527 9130 data645,35,15,30,10,20,60,100,822,1005,28,30,40,10,30,70,80,342,418,35 9135 data15,20,15,20,90,140,1233,1508,32,15,45,11,15,200,240,2765,3380,25 9140 data15,50,20,15,310,350,6500,7240,40 9145 datacrossbow,longbow,bolt,arrow,rapier,sword,axe,mace,lance,chain mail,hand shield 9150 datashield,helmet,armour,aurora,food,potion#1,potion#2,potion#3,potion#4 9155 datapotion#5,potion#6,potion#7,potion#8,,,,,fighter,mage,witch 9160 datathief,elf,necromancer,giant rat,wolf,harpy,thaye tase,soothsayer,red caps 9165 databandit,troll,werewolf,goblin,demon,mercenary,ogre,zotz,giant spider,niohoggr 9170 databalrog,goe,boorot,proge,tilcee,fenfen,salp,dale,vale,gad,pullen,orp,bioc,koast 9175 data80,52,80,15,90,20,80,11,90,18,70,15,55,13,80,12,75,5,60,20,70,21,80,10,70,5 9180 data15,70,4,80,15,60,3,120,,,,10,,,,6,25,45,7,150,15,40,8,240,30,30,12,144 9185 data40,30,13,117,7,30,15,750 9190 data75,,311,85,,140,80,,173,90,,103,70,,450 9205 data203507,269051,203525,400141,400155,400169,465721,400201,400215,269161,334707 9210 data465791,400273,531361,400307,465861,465879,2497511,2497595,2104463,466129 9220 data728293,728317,400661 9300 fori=.ton9:l%(i)=.:next:fori=22to462step22:l%(i)=3:l%(i+21)=3:next 9305 l%(0)=10:l%(21)=6:l%(483)=5:l%(462)=9:fori=1to20:l%(i)=12:l%(i+462)=12:next 9310 fori=23to461:if(i-21)/22=int((i-21)/22)theni=i+1:goto9335 9315 y=0:ifrnd(1)<.25thenl%(i)=l%(i)or1:l%(i-22)=l%(i-22)or2:y=1 9320 ifrnd(1)<.25thenl%(i)=l%(i)or2:l%(i+22)=l%(i+22)or1:y=1 9325 ifrnd(1)<.25thenl%(i)=l%(i)or8:l%(i+1)=l%(i+1)or4:y=1 9330 ifrnd(1)<.25thenl%(i)=l%(i)or4:l%(i-1)=l%(i-1)or8:y=1 9332 ify=.then9315 9335 next 9336 y=rnd(-f*ti):fori=.to24:y=fnr(n9):if(l%(y)and48)=.thenl%(y)=l%(y)or16*fnr(2)+16 9337 next:fori=.to3:j=fnr(484):e%(i)=j:l%(j)=l%(j)or64:next:fori=0to23:readj:g(i)=j-120:next 9340 fori=0ton3:gosub9400:next:return 9400 y=rnd(i)*rnd(i)*(n2+1):forj=0to3:d%(j+1,i)=m%(j,y):next:d%(6,i)=m%(8,y):d%(.,i)=y 9405 d%(.,i)=y:d%(5,i)=m%(6,y)+fnr(m%(7,y)-m%(6,y)):d%(7,i)=m%(4,y)+fnr(m%(5,y)-m%(4,y)) 9410 y=fnr(n9+1):if(l%(y)and8064)>.then9410 9415 l%(y)=l%(y)or(i*128):return