home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 October
/
1984-10.d64
/
tomb_vic
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
73 lines
0 print"[147]":poke36879,10:goto3000:ph=0:sc=0:s=7680
1 gosub2000:s=7680:c=38400:dx=1:dy=1:ex(1)=10:ex(2)=13:ex(3)=2
2 q=22:ey(1)=11:ey(2)=10:ey(3)=17:poke8162,32:poke8139,32:poke7726,32
3 pokes+q*dy+dx,33:pokec+q*dy+dx,4
4 forz=1to3:pokes+q*ey(z)+ex(z),36:pokec+q*ey(z)+ex(z),5:next
5 poke8185,37:poke38905,7
11 tr=500
12 poke36878,15
18 poke36875,140:for z=1to25:next
19 poke36875,0
20 poke37154,127:p=peek(37152)and128:j0=-(p=0):poke37154,255
21 p=peek(37151):j1=-((pand8)=0):j2=-((pand16)=0):j3=-((pand4)=0)
22 cx=j0-j2:cy=j1-j3
23 ifcx=0andcy=0then80
24 ifpeek(s+q*(dy+cy)+(dx+cx))=35then80
25 pokes+q*dy+dx,32:dx=dx+cx:dy=dy+cy:ifpeek(s+q*dy+dx)=36then4000
28 pokec+q*dy+dx,4:pokes+q*dy+dx,33
29 ifs+q*dy+dx=8185then5000
79 ifint(rnd(1)*3)=1then18
80 b=int(rnd(1)*3)+1:cx(b)=0:cy(b)=0:w=0
81 pokes+q*ey(b)+ex(b),32:cx(b)=((ex(b)>dx)-(ex(b)<dx))
82 ex(b)=ex(b)+cx(b)
85 cy(b)=((ey(b)>dy)-(ey(b)<dy))
86 ifpeek(s+q*ey(b)+ex(b)+q*cy(b))=35thency(b)=0:ex(b)=ex(b)-cx(b)
87 ey(b)=ey(b)+cy(b)
88 ifpeek(s+q*ey(b)+ex(b))=33then4000
89 pokes+q*ey(b)+ex(b),36:pokec+q*ey(b)+ex(b),5:tr=tr-1:goto18
91 goto18
299 cx(b)=0:cy(b)=0
1999 end
2000 form=7702to8163
2001 ifint(rnd(1)*3)=1 andpeek(m-1)<>35then2004
2002 next
2003 return
2004 pokem+30720,2:pokem,35:next
2999 return
3000 poke56,28:poke52,28:poke51,peek(55):clr:print"";:printtab(6)"redefining"
3001 cs=256*peek(52)+peek(51):fori=cstocs+511:pokei,peek(i+32768-cs):next
3002 fori=7432to7439:readj:pokei,j:next
3003 data60,60,24,255,60,60,102,102
3004 fori=7448to7455:readj:pokei,j:next
3005 data255,255,255,255,255,255,255,255
3006 fori=7456to7463:readj:pokei,j:next
3007 data129,153,102,60,255,60,66,66
3008 fori=7464to7471:readj:pokei,j:next:print"[147]"
3009 data0,0,126,126,126,126,0,0
3010 clr:poke36869,255
3011 forc=7680to7701:pokec+30720,2:pokec,35:pokec+31204,2:pokec+484,35:next
3012 forc=7680to8164step22:pokec+30720,2:pokec,35:pokec+30741,2:pokec+21,35:next
3111 goto 1
4000 poke 36878,15:poke36876,200:forl1=250 to 150step-17
4001 poke36875,l1:forl2=150to190:poke36876,l2:nextl2,l1
4002 poke36875,0:poke36876,0
4003 print" the guardian has caught you."
4004 printtab(8)"[158]gold="sc
4005 print"[159]hit the trigger if you dare to try again."
4006 print"[159]type (q) if you wish to quit."
4007 geta$:p=peek(37137):if a$="q"thenpoke251,0:sys251
4008 if-((pand32)=0)<>1then4007
4009 if sc>ph then ph=sc
4010 print"[147]":sc=0:goto3011
5000 print"you grab the treasure"
5001 forz=1to100:poke36876,int(rnd(1)*128)+128
5002 forhg=1to10:next:next:poke36876,0
5100 print"[147]":print" gold=[158]"sc;:print" "
5101 forl=1totr:sc=sc+1:print"[145]"sc:next
5120 print" most treasure recov- ered from tomb yet":printtab(8)"[158]"ph
5121 print"[156] press q to quit now"
5122 print:print " hit the trigger to continue"
5123 p=peek(37137):if -((pand32)=0)=1then print"[147]":goto 3011
5124 if peek(197)=48 then poke251,0:sys251
5125 goto 5123