home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 October
/
1984-10.d64
/
tomb_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
70 lines
0 poke56,28:clr:print"[147]":poke53280,2:poke53281,0:goto3000:ph=0:sc=0
1 gosub2000:c=55296:dx=1:dy=1:ex(1)=5:ex(2)=20:ex(3)=35
2 q=40:ey(1)=12:ey(2)=6:ey(3)=22:poke1982,32
3 poke1024+q*dy+dx,33:pokec+q*dy+dx,4
4 forz=1to3:poke1024+q*ey(z)+ex(z),36:pokec+q*ey(z)+ex(z),5:next
5 poke2023,37:poke56295,7:s=1024
6 cl=54272:vl=cl+24:fori=cltocl+24:pokei,0:next
11 tr=500
18 pokevl,15:pokecl+5,15:pokecl+6,129:for z=1to25:next:pokevl,0
20 x1=peek(56320):cy=-(((x1and1)=1)+((x1and2)=2)*-1)
21 cx=((x1and8)=8)+((x1and4)=4)*-1
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=2023then5000
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=1064to1983
2001 if int(rnd(1)*3)=1andpeek(m-1)<>35then 2004
2002 next
2003 return
2004 pokem+54272,2:pokem,35:next
2999 return
3000 poke56334,peek(56334)and254:poke1,peek(1)and251:print"";
3001 printtab(15)"redefining[146]":fori=0to511:pokei+12288,peek(i+53248):nexti
3002 fori=12552to12559:readj:pokei,j:next
3003 data60,60,24,255,60,60,102,102
3004 fori=12568to12575:readj:pokei,j:next
3005 data255,255,255,255,255,255,255,255
3006 fori=12576to12583:readj:pokei,j:next
3007 data129,153,102,60,255,60,66,66
3008 fori=12584to12591:readj:pokei,j:next:print"[147]"
3009 data0,0,126,126,126,126,0,0
3010 poke1,peek(1)or4:poke56334,peek(56334)or1:poke53272,peek(53272)and240or12
3011 forc=1024to1063:pokec+54272,2:pokec,35:pokec+55232,2:pokec+960,35:next
3012 forc=1024to1984step40:pokec+54272,2:pokec,35:pokec+54311,2:pokec+39,35:next
3111 goto 1
4000 forl2=1to5:pokevl,9:pokecl+5,72:pokecl+6,241:forl1=50to25step-1
4001 poke cl+1,l1:pokecl+4,33:nextl1:nextl2:pokecl+4,32
4003 printtab(6)"the guardian has caught you"
4004 printtab(17)"[158]gold="sc
4005 print"[159]hit the trigger if you dare to try again"
4006 printtab(6)"[159]type (q) if you wish to quit"
4007 geta$:x1=peek(56320)and16:ifa$="q"thenpoke53272,21:print"[147]":end
4009 ifx1<>0then 4007
4010 if sc<>ph then ph=sc
4011 print"[147]":sc=0:goto 3011
5000 print:printtab(10)"you grab the treasure"
5001 pokevl,15:pokecl+5,71:pokecl+6,241:forz=1to100:pokecl+4,33
5002 pokecl+1,int(rnd(1)*128)+64:forhg=1to10:next:next:pokecl+4,32
5100 print"[147]":printtab(14)" gold=[158]"sc;:print" "
5101 forl=1totr:sc=sc+1:printtab(21)"[145]"sc:next
5120 print" most treasure recovered before=";:printtab(32)"[158]"ph
5122 printtab(10)"[156] press q to quit now"
5123 print:printtab(7)"hit the trigger to continue"
5124 geta$:x1=peek(56320)and16:ifx1=0 then print"[147]":goto3011
5125 if a$="q"then poke53272,21:print"[147]":end
5126 goto 5124
20000 x1=peek(56320)and16:printx1:goto20000