home *** CD-ROM | disk | FTP | other *** search
/ Curio City 11 / CURIO11.bin / pc / movie / game / usagi.dir / 00071_usamaker.ls < prev    next >
Encoding:
Text File  |  1998-01-01  |  1.9 KB  |  99 lines

  1. property usah, usav, usach, usacast, usapower, usaspd, usagoal, usacastlist, usaluck
  2. global gyusho
  3.  
  4. on birth me, h, v, ch, c, p, s, g, cl, l
  5.   set usah to h
  6.   set usav to v
  7.   set usach to ch
  8.   set usacast to c
  9.   set usapower to p
  10.   set usaspd to s
  11.   set usagoal to g
  12.   set usacastlist to cl
  13.   set usaluck to l
  14.   set the castNum of sprite usach to usacast
  15.   set the locH of sprite usach to usah
  16.   set the locV of sprite usach to usav
  17.   return me
  18. end
  19.  
  20. on readyusa me
  21.   if usacast = usach then
  22.     set usacast to usacast + 6
  23.   else
  24.     set usacast to usach
  25.   end if
  26.   set the castNum of sprite usach to usacast
  27. end
  28.  
  29. on startusa me
  30.   set usacast to getAt(usacastlist, 1)
  31.   set the castNum of sprite usach to usacast
  32. end
  33.  
  34. on runusa me
  35.   if usapower > 0 then
  36.     set h to (usaspd + random(usaluck)) / 2
  37.     if random(4) = 1 then
  38.       set h to 50 - (usaspd * 3)
  39.     end if
  40.     set usah to h + usah
  41.     set the locH of sprite usach to usah
  42.     if usah >= 463 then
  43.       set usagoal to 1
  44.       set gyusho to usach
  45.       go("goal")
  46.       pass()
  47.     end if
  48.     set up to usapower - 1
  49.     set usapower to up
  50.   else
  51.     if random(2) = 1 then
  52.       set usapower to random(usaluck)
  53.     end if
  54.   end if
  55.   set c to selectusacast(me)
  56.   set usacast to c
  57.   set the castNum of sprite usach to usacast
  58. end
  59.  
  60. on selectusacast me
  61.   set c to usacast
  62.   set ichi to getPos(usacastlist, c)
  63.   if ichi = 3 then
  64.     set nextcast to getAt(usacastlist, 1)
  65.   else
  66.     set nextcast to getAt(usacastlist, ichi + 1)
  67.   end if
  68.   return nextcast
  69. end
  70.  
  71. on goalusa me
  72.   if usagoal = 1 then
  73.     winusa()
  74.   else
  75.     lostusa()
  76.   end if
  77. end
  78.  
  79. on winusa me
  80.   if usacast = (usach + 30) then
  81.     set usacast to usacast + 6
  82.   else
  83.     set usacast to usach + 30
  84.   end if
  85.   set the castNum of sprite usach to usacast
  86. end
  87.  
  88. on lostusa me
  89.   if usacast = (usach + 54) then
  90.     set usacast to usacast + 6
  91.   else
  92.     set usacast to usach + 54
  93.   end if
  94.   set the castNum of sprite usach to usacast
  95. end
  96.  
  97. on ooanamode
  98. end
  99.