home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / shwtxt19.zip / ATTACK.ST < prev    next >
Text File  |  1995-09-01  |  2KB  |  36 lines

  1. 'ATTACK.ST - Attack Game
  2. copy(attack,2)\on intkey0 esc goto x\if`[m?] then cls\!"Mouse required."\exit
  3. :s\nochk\cls7,0\copy(2,1)\bfill1(1,1,20,80)255 7\bfill1(2,2,19,79)32 15\csr
  4. for%i=1to[rnd50to75]\poke1([rnd2to19],[rnd2to79])249 15\next
  5. poke1([rnd2to19],[rnd2to79])[rnd40to41] 14\for %i=1to5\:z\%r=[rnd2to19]
  6. %c=[rnd2to79]\if[as:1:%r:%c]<>32 z\v%i=%r\v(%i+5)=%c\v(%i+10)=[rnd1to2]
  7. v(%i+15)=[rnd1to2]\v(%i+20)=32\next\%t=18\copy(1,0)
  8. for%i=2to79\for%j=24to(25-[rnd0to4])nstep\bfill0(%j,%i,%j,%i)255 112\next\next
  9. %a=20\%b=100\:k\chk\waitkey0\if key null a\if key q q\if key r r
  10. if[.25:54:25:60]p\if[.25:72:25:77]q\if[.25:63:25:69]r
  11. %b--\attr110\p@25,22\!%b,3lq\%r=[.r]\%c=[.c]\if[as:0:%r:%c]<>236 m
  12. for%i=1to5\if v%i<>%r | v(%i+5)<>%c then gonext
  13. %a--\attr110\p@25,12\!%a,2qz\save\bfill0(%r,1,%r,80)219 10
  14. bfill0(1,%c,20,%c)219 10\gosub b\bcopy1to0(1,1,20,80)\v%i=0\if%a=0 w
  15. if%a<5 then gonext\endif\v%i=2\v(%i+5)=[rnd2to79]\next
  16. :m\if%b<%a l\:a\nochk\if[t0]<%t0 k\rst t0\%t0=[rnd6to9]
  17. for%i=1to5\if v%i=0 then gonext\endif\%i5=%i+5\%it=%i+10\%if=%i+15
  18. select case255\case[as:0:(v%i)-1:v%i5]=255\%y=2\case[as:0:(v%i)+1:v%i5]=255
  19. %y=1\case else\if[rnd0to99]<75 then %y=v%it else %y=[rnd1to2]\endif\end select
  20. :a1\v%it=%y
  21. select case 255\case[as:0:v%i:(v%i5)-1]=255\%x=2\case[as:0:v%i:(v%i5)+1]=255
  22. %x=1\case else\if[rnd0to99]<75 then %x=v%if else %x=[rnd1to2]\endif\end select
  23. :a2\v%if=%x
  24. bcopy1to0(v%i,v%i5,v%i,v%i5)\select case%y\case1\v%i--\case2\v%i++\end select
  25. select case %x\case1\v%i5--\case2\v%i5++\end select\poke0(v%i,v%i5)236 10
  26. if [t1]<%t|[as:0:24:v%i5]<>255 then gonext\endif\rst t1\%t=[rnd3to45]
  27. bfill0(v%i+1,v%i5,24,v%i5)179 12\wait.2\gosub b\bcopy1to0(v%i+1,v%i5,24,v%i5)
  28. if bsame0to2(24,1,24,80)l\next\goto k\:p\bfill0(25,54,25,60)attr207\waitkey
  29. if`[.25:54:25:60]p\bfill0(25,54,25,60)attr79\goto k\:b\for %boom=1 to 8
  30. bmod0(1,1,25,80),,255\next\ret\:r\save\bcopy2to0(5,19,17,62)\waitkey\restore
  31. goto k\:w\attr206\p@12,24\!"          Y O U    W I N !        "\goto q
  32. :l\attr206\p@12,24\!"          Y O U    L O S E        "
  33. :q\attr75\p@13,24\!" GAME OVER - Play Again? (Y or N) ";\waitkey
  34. if key y s\if key n x\if[.13:50:13:50]s\if[.13:55:13:55]x\goto q\:x\exitc
  35.  
  36.