home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 November / 1984-11.d64 / jump_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  146 lines

  1. 100 gosub1160
  2. 110 clr:s=54272:lo=54296:gosub940
  3. 120 c=peek(197):d=peek(653)
  4. 125 q$=str$(q2)+"  ":ifq2<=0thenq$="0   "
  5. 130 print"   sc = ";l;"  lives = ";ww;"    en = ";q$
  6. 140 ifq2=<0then749
  7. 150 if(c=20)and(a+2+2*d<40)then280
  8. 160 if(c=12)and(a-2-2*d>-1)then300
  9. 170 ifc=23orc=1orc=60thenq2=q2-20:goto530
  10. 180 bz=az+int(55*rnd(0))-30:t1=sgn(bz-az)
  11. 200 if (az-bz) > (29-p1) then 630
  12. 210 if bz<30orbz>310 then 180
  13. 220 if t1=1thena1=az:a2=bz:goto240
  14. 230 a1=bz:a2=az
  15. 240 fori=a1toa2stept1*6
  16. 250 if i<256 then pokev+16,peek(v+16)and254:pokev,i:next:az=bz:goto120
  17. 260 pokev+16,peek(v+16)or1:pokev,i-256:next:az=bz:goto120
  18. 270 m=5:goto120
  19. 275 rem move base ship
  20. 280 if d<>0then390
  21. 290 a=a+2:b1=bx+16:goto320
  22. 300 if d<>0then460
  23. 310 a=a-2:b1=bx-16
  24. 320 q2=q2-5:t1=sgn(b1-bx):ift1=1thena1=bx:a2=b1:goto340
  25. 330 a1=b1:a2=bx
  26. 340 fori=a1toa2stept1*4
  27. 350 if i<256 then pokev+16,peek(v+16)and253:pokev+2,i:next:bx=b1:goto370
  28. 360 pokev+16,peek(v+16)or2:pokev+2,i-256:next:bx=b1
  29. 370 if peek(1904+a)<>32andpeek(1905+a)<>32then180
  30. 380 w=w-1:gosub 733:goto 120
  31. 385 rem jump right
  32. 390 a=a+4:fori=bxtobx+16step2:y=y-2
  33. 400 if i<256 then pokev+16,peek(v+16)and253:pokev+2,i:pokev+3,y:next:goto420
  34. 410 pokev+16,peek(v+16)or2:pokev+2,i-256:pokev+3,y:next
  35. 420 fori=bx+16tobx+32step2:y=y+2
  36. 430 if i<256 then pokev+16,peek(v+16)and253:pokev+2,i:pokev+3,y:next:goto450
  37. 440 pokev+16,peek(v+16)or2:pokev+2,i-256:pokev+3,y:next
  38. 450 bx=bx+32:if peek(1904+a)<>32andpeek(1905+a)<>32then180
  39. 455 gosub 731:goto 120
  40. 458 rem jump left
  41. 460 a=a-4:fori=bxtobx-16step-2:y=y-2
  42. 470 if i<256 then pokev+16,peek(v+16)and253:pokev+2,i:pokev+3,y:next:goto490
  43. 480 pokev+16,peek(v+16)or2:pokev+2,i-256:pokev+3,y:next
  44. 490 fori=bx-16tobx-32step-2:y=y+2
  45. 500 if i<256 then pokev+16,peek(v+16)and253:pokev+2,i:pokev+3,y:next:goto520
  46. 510 pokev+16,peek(v+16)or2:pokev+2,i-256:pokev+3,y:next
  47. 520 bx=bx-32:if peek(1904+a)<>32andpeek(1905+a)<>32then180
  48. 525 gosub 731:goto 120
  49. 530 a1=106:pokes+4,33
  50. 540 ii=0:fori=1784to1144step-40:pokei+a,a1:pokei+a+s,1:pokes+1,ii:ii=ii+3
  51. 550 ifpeek(v+31)=1then cr=1:next:goto570
  52. 560 next
  53. 570 pokes+4,32:if a1=32andcr<>1 then 180
  54. 580 if cr=1 and a1=32 then 600
  55. 590 a1=32:cr=0:goto540
  56. 600 pokev+21,2:t1=int((az-bx)/8)
  57. 610 fori=1104+a+t1to1104+a+t1+3:pokei,42:pokei+s,2:nexti:gosub740
  58. 615 fori=1104+a+t1to1104+a+t1+3:pokei,32:pokei+s,2:nexti:cr=0
  59. 620 l=l+50:q2=q2+45:pokev+21,3:az=int(rnd(1)*200)+40:pokev,az:goto 120
  60. 625 rem shoot at base
  61. 630 pokes+4,33:ii=120:a1=106:t1=int(az/8)-2
  62. 640 fori=1144to1864step40:pokei+t1,a1:pokei+s+t1,1:pokes+1,ii:ii=ii-3
  63. 650 if peek(v+31)=2thencr=1:next:goto670
  64. 660 next
  65. 670 pokes+4,32:ifa1=32then 690
  66. 680 a1=32:goto 640
  67. 690 if cr=1 then gosub731:goto120
  68. 710 w=peek(1904+t1):ifw=102thenpoke1904+t1,230:goto120
  69. 715 w=peek(1904+t1):ifw=230thenpoke1904+t1,32:gosub740:goto120
  70. 720 w=peek(1944+t1):ifw=102thenpoke1944+t1,32:gosub740:goto120
  71. 730 goto 800
  72. 731 rem base destroyed
  73. 733 pokev+21,1:poke1864+a,42:poke1865+a,42:poke1864+a+s,2:poke1865+a+s,2
  74. 734 pokes+4,129:pokes+1,90
  75. 735 fori=1to300:next:pokes+4,128:if ww=1 then 800
  76. 736 ww=ww-1:poke1864+a,32:poke1865+a,32:pokev+31,0:cr=0
  77. 737 a=0:pokev+16,peek(v+16)and253:pokev+21,3
  78. 738 fora=0to32step2:ifpeek(1904+a)<>102orpeek(1905+a)<>102thennexta
  79. 739 bx=a*8+24:pokev+2,bx:return
  80. 740 pokes+4,129:pokes1,30:fori=1to50:next:pokes+4,128:return
  81. 749 print"out of energy !!":forx=1to2500:next
  82. 750 print"[147]"
  83. 760 pokes4,0
  84. 800 poke53269,0:print"               game over"
  85. 810 fori=1to1500:next
  86. 820 print"[147]"
  87. 830 pokev+21,0:print"[147]":b$="     battle again ?":b1$="   (y/n)"
  88. 840 fori=1tolen(b$):print"[145]"tab(8)left$(b$,i)
  89. 850 fork=1to125:next:next
  90. 860 print:print:print
  91. 870 b1$="        (y/n)"
  92. 880 fori=1tolen(b1$):print"[145]";tab(8)left$(b1$,i)
  93. 890 fork=1to125:next:next
  94. 900 forv=1to10:geta$:next
  95. 910 getyn$:ifyn$=""then910
  96. 920 ifyn$="n"thenend
  97. 930 goto110
  98. 940 print"[147]difficulty levels[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  99. 950 print"1-beginner"
  100. 960 print"2-rookie"
  101. 970 print"3-pro"
  102. 980 print"4-expert"
  103. 990 print"5-random"
  104. 995 print" choose 1-5"
  105. 1000 getp1$
  106. 1020 ifp1$<>"1"andp1$<>"2"andp1$<>"3"andp1$<>"4"andp1$<>"5"then1000
  107. 1040 ifp1$="5"thenp1=rnd(0)*6
  108. 1050 p1=val(p1$)
  109. 1060 fori=stolo:pokei,0:nexti:pokelo,15:pokes+5,130:pokes+6,72
  110. 1070 v=53248:pokev+21,7:poke2040,13:poke2041,14:poke2042,14
  111. 1080 pokev+39,3
  112. 1090 poke v+28,1:pokev+37,1:pokev+38,5:pokev+39,2:pokev+40,1:pokev+4,150
  113. 1100 poke53280,0:poke53281,0:w=3:print"[147]"
  114. 1110 a=0:bx=24:b=a:m=1:ac=1:a1=1232:a2=1235:q2=1000:co=v:az=200:b1=bx:y=205
  115. 1120 ww=3:forx=1904to1983:pokex,102:pokex+s,5:nextx
  116. 1130 forx=1984to2023:pokex,99:pokex+s,1:next
  117. 1140 pokev+16,0:pokev,az:pokev+1,60:pokev+2,bx:pokev+3,205
  118. 1150 return
  119. 1160 poke53281,0:poke53280,0:a$="[156]j   u   m   p "
  120. 1200 restore:print"[147]        j";
  121. 1210 fork=0to42:readq:poke832+k,q:next
  122. 1220 print"      u";:fork=43to85:readq:poke832+k,q:next
  123. 1230 print"      m";:fork=86to127:readq:poke832+k,q:next:print"      p"
  124. 1250 print"           ready to battle"
  125. 1260 print"               y[146] / n[146]"
  126. 1280 gety$:ify$=""then1280
  127. 1290 ify$="n"thenend
  128. 1300 return
  129. 1310 data000,000,000,000,000,000,000,000
  130. 1320 data000,000,000,000,001,085,064,006
  131. 1330 data190,144,026,190,164,085,085,085
  132. 1340 data085,085,085,080,020,005,085,085
  133. 1350 data085,085,085,085,031,235,244,007
  134. 1360 data235,208,001,085,064,005,000,080
  135. 1370 data020,000,020,080,000,005,000,000
  136. 1380 data000,000,000,000,000,000,000,254
  137. 1390 rem
  138. 1400 data000,000,000,001,000,000,001,000
  139. 1410 data000,001,000,000,003,128,000,003
  140. 1420 data128,000,003,128,000,007,192,000
  141. 1430 data015,224,000,031,240,000,127,252
  142. 1440 data000,227,142,000,227,142,000,127
  143. 1450 data252,000,063,248,000,096,012,000
  144. 1460 data220,118,000,159,242,000,220,118
  145. 1470 data000,096,012,000,063,248,000,255
  146.