home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global gnum1
- set gnum1 to 0
- set sp to 14
- repeat with n = 1 to 5
- set alist to []
- set the locV of sprite 13 to the locV of sprite sp
- repeat with m = 1 to 5
- set cn to the castNum of sprite sp - 120
- append(alist, cn)
- set sp to sp + 1
- end repeat
- puppetSound(3, 83)
- judh(alist, n)
- end repeat
- set the castNum of sprite 13 to 324
- set the locV of sprite 13 to 199
- set sp to 14
- repeat with n = 1 to 5
- set alist to []
- set h to the locH of sprite sp
- set the locH of sprite 13 to h
- repeat with m = 1 to 5
- set cn to the castNum of sprite (sp + (5 * (m - 1))) - 120
- append(alist, cn)
- end repeat
- set sp to sp + 1
- puppetSound(3, 83)
- judh(alist, n + 5)
- end repeat
- updateStage()
- repeat with n = 39 to 42
- puppetSprite(n, 0)
- end repeat
- startTimer()
- repeat while the timer < 50
- nothing()
- end repeat
- end
-
- on judh alist, lin
- global gchnlist, gnum1, ghdlist
- set rec to judgeh(alist)
- updateStage()
- set the castNum of sprite 47 to 322
- set the locV of sprite 47 to 164 + (rec * 20)
- set mark to getAt(ghdlist, rec)
- if lin <> getAt(gchnlist, 1) then
- set flg to 0
- else
- set flg to mark
- set mark to mark * getAt(gchnlist, 2)
- chanceh(mark, rec)
- end if
- updateStage()
- startTimer()
- repeat while the timer < 50
- nothing()
- end repeat
- if rec = 10 then
- set var to -1
- else
- set var to 1
- end if
- set the locV of sprite 47 to 384
- set the castNum of sprite 47 to 322
- if the locV of sprite 44 <> 383 then
- repeat with n = 44 to 46
- set the locV of sprite n to 383
- end repeat
- end if
- repeat with c = 1 to mark
- set gnum1 to gnum1 + var
- if gnum1 < 0 then
- set the castNum of sprite 43 to 291
- set the castNum of sprite 39 to 291
- else
- set the castNum of sprite 43 to 292
- set the castNum of sprite 39 to 292
- end if
- counth(abs(gnum1), 43)
- counth(abs(gnum1), 39)
- updateStage()
- startTimer()
- repeat while the timer < 2
- nothing()
- end repeat
- end repeat
- set the castNum of sprite 47 to 325
- updateStage()
- if flg <> 0 then
- chanceh(flg, rec)
- end if
- set the locV of sprite 47 to 164 + (rec * 20)
- end
-
- on chanceh mark, rec
- repeat with n = 44 to 46
- set the locV of sprite n to 163 + (20 * rec)
- end repeat
- counth(mark, 43)
- if rec = 10 then
- set the castNum of sprite 44 to 291
- end if
- end
-
- on counth num, sp
- set b1 to num / 100
- if b1 > 9 then
- set b1 to 9
- end if
- set num to num - (b1 * 100)
- set b2 to num / 10
- set b3 to num - (b2 * 10)
- repeat with n = 1 to 3
- do("put b" & string(n) & " into num")
- if num <> 0 then
- exit repeat
- next repeat
- end if
- set the castNum of sprite (sp + n) to 292
- end repeat
- if n = 4 then
- set n to 3
- end if
- repeat with m = n to 3
- do("set the castNum of sprite (m+sp) to (281 + b" & string(m) & ")")
- end repeat
- end
-
- on judgeh tlist
- set handlist to [0, 0, 0, 0, 0, 0, 0, 0]
- set mlist to []
- set nlist to []
- repeat with n = 1 to 5
- append(mlist, getAt(tlist, n) / 14)
- append(nlist, getAt(tlist, n) mod 14)
- end repeat
- sort(nlist)
- sort(mlist)
- set num to getAt(mlist, 1)
- repeat with n = 2 to 5
- if num <> getAt(mlist, n) then
- exit repeat
- end if
- end repeat
- if n = 6 then
- setAt(handlist, 4, 1)
- end if
- set num to getAt(nlist, 1)
- set rec to straighth(nlist, num)
- if (rec <> 6) and (num = 1) then
- set rec to straighth(nlist, 9)
- if rec = 6 then
- setAt(handlist, 1, 1)
- end if
- end if
- if rec = 6 then
- setAt(handlist, 5, 1)
- end if
- set slist to [0, 0]
- set clist to [0, 0]
- set pos to 0
- repeat with n = 1 to 4
- set num to getAt(nlist, n)
- set pc to 1
- repeat with m = n + 1 to 5
- if (num = getAt(nlist, m)) and (getOne(slist, num) = 0) then
- set pc to pc + 1
- next repeat
- end if
- exit repeat
- end repeat
- if pc <> 1 then
- set pos to pos + 1
- setAt(clist, pos, pc)
- setAt(slist, pos, num)
- end if
- end repeat
- if (pos = 2) and (getOne(slist, 0) = 0) and ((getAt(clist, 1) + getAt(clist, 2)) = 5) then
- setAt(handlist, 3, 1)
- set pos to 0
- end if
- if pos <> 0 then
- if (getAt(clist, 1) = 2) and (getAt(clist, 2) = 2) then
- setAt(handlist, 7, 1)
- else
- if getOne(clist, 3) <> 0 then
- setAt(handlist, 6, 1)
- else
- if getOne(clist, 4) <> 0 then
- setAt(handlist, 2, 1)
- else
- setAt(handlist, 8, 1)
- end if
- end if
- end if
- end if
- if getAt(handlist, 1) and getAt(handlist, 4) and getAt(handlist, 5) then
- return 1
- else
- if getAt(handlist, 1) and getAt(handlist, 5) then
- return 6
- else
- if getAt(handlist, 4) and getAt(handlist, 5) then
- return 2
- else
- if getOne(handlist, 1) = 0 then
- return 10
- else
- return getPos(handlist, 1) + 1
- end if
- end if
- end if
- end if
- end
-
- on straighth nlist, num
- repeat with n = 2 to 5
- if (num + n - 1) <> getAt(nlist, n) then
- exit repeat
- end if
- end repeat
- return n
- end
-