home *** CD-ROM | disk | FTP | other *** search
- on initdigit
- global gheadlist, gbodylist, gleglist, gtimer, gslt, gspdh, gspdl, gtick
- set gheadlist to [14, 15, 16, 17]
- set gbodylist to [18, 19, 20, 21]
- set gleglist to [22, 23, 24, 25]
- set gtimer to [0, 0, 0]
- set gslt to [0, 1, 0, 1, 0, 1]
- set gspdh to [0, 0, 0]
- set gspdl to [0, 0, 0]
- set gtick to 60 / 8
- set kakuritu to [4, 3, 2, 5]
- setAt(gspdh, 1, 0)
- setAt(gspdh, 3, 12)
- setAt(gspdh, 2, 27)
- setAt(gspdl, 1, 3)
- setAt(gspdl, 3, 24)
- setAt(gspdl, 2, 33)
- set i to random(4)
- set k to getAt(kakuritu, i)
- if random(k) = 1 then
- set j to i - 2
- if j < 1 then
- set j to 2 + i
- end if
- setAt(gslt, 2, j)
- setAt(gslt, 6, j)
- set j to i - 1
- if j < 1 then
- set j to 4
- end if
- setAt(gslt, 4, j)
- else
- set j to i - 2
- if j < 1 then
- set j to 2 + i
- end if
- setAt(gslt, 2, j)
- setAt(gslt, 6, random(4))
- setAt(gslt, 4, random(4))
- end if
- end
-
- on cleardigit
- repeat with i = 1 to 6
- set the puppet of sprite i to 0
- end repeat
- end
-
- on startdigit list
- repeat with i = 1 to 3
- set the puppet of sprite ((i * 2) - 1) to 1
- set the castNum of sprite ((i * 2) - 1) to 13
- set the puppet of sprite (i * 2) to 1
- set the castNum of sprite (i * 2) to 13
- end repeat
- end
-
- on updatedigit i, list
- global gspdh, gspdl, gslt, gstop
- if gstop <> 0 then
- if getAt(gspdh, i) <> 0 then
- setAt(gspdh, i, getAt(gspdh, i) - 1)
- else
- if getAt(gspdl, i) <> 0 then
- setAt(gspdl, i, getAt(gspdl, i) - 1)
- set i to i * 2
- set j to getAt(gslt, i - 1)
- set k to getAt(gslt, i)
- if j <> 1 then
- if j = 0 then
- setAt(gslt, i - 1, 3)
- set j to 3
- set k to k + 1
- if k > 4 then
- set k to 1
- end if
- setAt(gslt, i, k)
- else
- setAt(gslt, i - 1, j - 1)
- end if
- set l to k - 1
- if l < 1 then
- set l to 4
- end if
- set the castNum of sprite (i - 1) to getAt(list, l)
- set the locH of sprite (i - 1) to 201 - ((4 - j) * 18)
- set the castNum of sprite i to getAt(list, k)
- set the locH of sprite i to 201 + (j * 18)
- if getAt(gspdl, i / 2) = 0 then
- setAt(gspdl, i / 2, j)
- end if
- else
- setAt(gslt, i - 1, 0)
- set the castNum of sprite (i - 1) to getAt(list, k)
- set the locH of sprite (i - 1) to 201
- set the castNum of sprite i to getAt(list, k)
- set the locH of sprite i to 201
- if getAt(gspdl, i / 2) = 0 then
- puppetSound("8.é~Ç‹ÇÈ")
- end if
- end if
- end if
- end if
- end if
- end
-
- on movedigit
- global gheadlist, gbodylist, gleglist, gtick
- if the timer > gtick then
- startTimer()
- updatedigit(1, gheadlist)
- updatedigit(2, gbodylist)
- updatedigit(3, gleglist)
- updateStage()
- end if
- end
-