home *** CD-ROM | disk | FTP | other *** search
- on move_ship
- global right, up, mup, mright, max_shipspeed, player_acc
- checkmax()
- set mright to mright + right
- set mup to mup + up
- set a to find_whole(mup)
- set the locV of sprite 10 to the locV of sprite 10 - a
- set mup to mup - a
- set a to find_whole(mright)
- set the locH of sprite 10 to the locH of sprite 10 + a
- set mright to mright - a
- if the left of sprite 10 < 0 then
- set right to right + (player_acc * 2)
- else
- if the right of sprite 10 > 450 then
- set right to right - (player_acc * 2)
- else
- if the top of sprite 10 < 0 then
- set up to up - 1 - (player_acc * 2)
- else
- if the bottom of sprite 10 > 400 then
- set up to up + (player_acc * 2)
- end if
- end if
- end if
- end if
- end
-
- on astroids
- global astroidlist, max_astroids
- repeat with t = 1 to count(astroidlist)
- if not (getAt(astroidlist, t) = 0) then
- animateastroid(getAt(astroidlist, t))
- end if
- end repeat
- end
-
- on lil_ships
- global lil_list, max_littleships
- repeat with t = 1 to max_littleships
- if not (getAt(lil_list, t) = 0) then
- animatelil_ships(getAt(lil_list, t))
- end if
- end repeat
- end
-
- on lil_ships_fire
- global lil_bulletlist, max_littlebullets
- repeat with t = 1 to max_littlebullets
- if not (getAt(lil_bulletlist, t) = 0) then
- animatelil_bullet(getAt(lil_bulletlist, t))
- end if
- end repeat
- end
-
- on fire
- global bulletlist, max_bullets
- repeat with t = 1 to max_bullets
- if not (getAt(bulletlist, t) = 0) then
- animatebullet(getAt(bulletlist, t))
- end if
- end repeat
- end
-
- on boss_fires
- global boss_bulletlist, boss_bullets
- repeat with t = 1 to boss_bullets
- if not (getAt(boss_bulletlist, t) = 0) then
- anim_bullets(getAt(boss_bulletlist, t))
- end if
- end repeat
- end
-
- on checkmax
- global right, up, max_shipspeed
- set n to max_shipspeed
- if right > n then
- set right to n
- end if
- if right < -n then
- set right to -n
- end if
- if up > n then
- set up to n
- end if
- if up < -n then
- set up to -n
- end if
- end
-
- on find_whole n
- if n >= 0 then
- if integer(n) > n then
- return integer(n) - 1
- end if
- if integer(n) <= n then
- return integer(n)
- end if
- end if
- if n < 0 then
- if integer(n) < n then
- return integer(n) + 1
- end if
- if integer(n) >= n then
- return integer(n)
- end if
- end if
- end
-
- on displays
- global shield, armor, score, max_shield
- put score into field "score"
- if armor <= 0 then
- death()
- end if
- if shield < 0 then
- set armor to armor - abs(shield)
- if armor < 0 then
- set armor to 0
- end if
- set shield to 0
- end if
- set the width of sprite 46 to shield / 2
- set the width of sprite 48 to armor / 2
- updateStage()
- if shield < max_shield then
- set shield to shield + (max_shield / 200) + 1
- end if
- if armor = 0 then
- death()
- end if
- set the ink of sprite 10 to 8
- end
-
- on death
- startTimer()
- repeat with n = 31 to 40
- set the visible of sprite n to 1
- set the castNum of sprite n to random(4) + 136
- set the locH of sprite n to the locH of sprite 10 + random(100) - 50
- set the locV of sprite n to the locV of sprite 10 + random(100) - 50
- end repeat
- updateStage()
- repeat while the timer < 20
- nothing()
- end repeat
- set the visible of sprite 10 to 0
- repeat with n = 31 to 40
- set the castNum of sprite n to the castNum of sprite n + 1
- if the castNum of sprite n >= 141 then
- set the visible of sprite n to 0
- end if
- puppetSound("explosion")
- end repeat
- updateStage()
- repeat while the timer < 40
- nothing()
- end repeat
- repeat with n = 31 to 40
- set the castNum of sprite n to the castNum of sprite n + 1
- if the castNum of sprite n >= 141 then
- set the visible of sprite n to 0
- end if
- puppetSound("explosion")
- end repeat
- updateStage()
- repeat while the timer < 60
- nothing()
- end repeat
- repeat with n = 31 to 40
- set the castNum of sprite n to the castNum of sprite n + 1
- if the castNum of sprite n >= 141 then
- set the visible of sprite n to 0
- end if
- puppetSound("explosion")
- end repeat
- updateStage()
- repeat while the timer < 80
- nothing()
- end repeat
- death2()
- end
-
- on death2
- startTimer()
- repeat with n = 31 to 40
- set the castNum of sprite n to random(4) + 136
- set the visible of sprite n to 1
- set the locH of sprite n to the locH of sprite 10 + random(100) - 50
- set the locV of sprite n to the locV of sprite 10 + random(100) - 50
- end repeat
- updateStage()
- repeat while the timer < 20
- nothing()
- end repeat
- updateStage()
- set the visible of sprite 10 to 0
- repeat with n = 31 to 40
- set the castNum of sprite n to the castNum of sprite n + 1
- if the castNum of sprite n >= 141 then
- set the visible of sprite n to 0
- end if
- puppetSound("explosion")
- end repeat
- updateStage()
- repeat while the timer < 40
- nothing()
- end repeat
- repeat with n = 31 to 40
- set the castNum of sprite n to the castNum of sprite n + 1
- if the castNum of sprite n >= 141 then
- set the visible of sprite n to 0
- end if
- puppetSound("explosion")
- end repeat
- updateStage()
- repeat while the timer < 60
- nothing()
- end repeat
- repeat with n = 31 to 40
- set the castNum of sprite n to the castNum of sprite n + 1
- if the castNum of sprite n >= 141 then
- set the visible of sprite n to 0
- end if
- puppetSound("explosion")
- end repeat
- updateStage()
- repeat while the timer < 80
- nothing()
- end repeat
- go(500)
- end
-
- on play_the_final
- global level
- set level to "10-Completed"
- go(400)
- end
-