; -------------------MASTER FUNCTIONLIST ---------------------|
; DO NOT DELETE ANY ENTRIES, ONLY APPENDING IS ALLOWED
; ------------------------------------------------------------|

; FunctionList Ranges:
; 	Used for organisation and to avoid posible
; 	name/number collisions between input files.

; 1-500 function.ini FunctionList
; 	(1-250 Reserved for Audio Range)
; 	(251-450 Reserved for Goodie Range)
; 	(451-500 Reserved for Future use)
; -------------------
; 501-1000 place.ini FunctionList
; -------------------
; 1001-2000 death FunctionList
; 	(1001-1100 Death_1 Range)
; 	(1101-1200 Death_2 Range)
; 	{ Etc....)
; -------------------
; 2001 --> Reserved for Future use
; --------------------------------|

[FunctionList]
; --------------------------------|
; 	(1 - 250) Audio Range
; --------------------------------|
1=PlaypickupEffect
2=PlayjumpEffect
3=PlaybumpEffect
4=PlaylevelEndEffect
5=PlayfishDeathEffect
6=PlaysnakeDeathEffect
7=PlaybirdDeathEffect
8=PlaywaterDeathEffect
9=PlaycattailTriggerEffect
10=PlayleafTriggerEffect
11=PlayflowerTriggerEffect
12=PlaystalagtiteTriggerEffect
13=PlaycatapultAimEffect
14=PlaycatapultLaunchEffect
15=PlaycoconutSplashEffect
16=PlayslipperySurfaceEffect
17=PlaylaunchBounceSurfaceEffect
18=PlaybumpBounceSurfaceEffect
19=PlayFinalMovie
; --------------------------------|

; --------------------------------|
; 	(251-450) Goodie Range
; --------------------------------|

251=SuperJump
252=SuperJumpGo
253=GetFoodNutSoundFunc
254=ActivateGoodieSoundFunc
255=EndGoodieSoundFunc
256=PlayEndGoodieSoundFunc
257=AirDeathGoodieFunc
259=FoodNutBumperFunc
265=SuperHighJump
266=SuperHighJumpGo
267=PootJump
268=PootJumpGo

; --------------------------------|
; 	(451-500) Reserved Range
; --------------------------------|

451=GenericDeathFunc
452=QuickStopFunc
453=ResetClawsFunc
454=SlipperyFunc
455=UnSlipperyFunc
456=RemoveGoodieFunc
457=WinLevelFunc
458=BounceFunc
459=BounceSlower1
460=BounceSlower2
461=BounceSlower3
462=BounceSlower4
463=BounceSlower5
464=BounceSlower6
465=BounceSlower7
467=WaterWalkerFunc
469=AltSlipperyFunc
470=AltUnSlipperyFunc
471=StartTimerFunc 
472=TimeLoopFunc
473=KillTheSqueezilFunc
474=MoreTime
475=ClearMessFunc
476=1MinuteLevelTimer
477=2MinuteLevelTimer
478=3MinuteLevelTimer
479=4MinuteLevelTimer
480=5MinuteLevelTimer
481=6MinuteLevelTimer
482=7MinuteLevelTimer
483=8MinuteLevelTimer
484=9MinuteLevelTimer
485=10MinuteLevelTimer
486=11MinuteLevelTimer
487=12MinuteLevelTimer
488=13MinuteLevelTimer
489=14MinuteLevelTimer
490=15MinuteLevelTimer
491=16MinuteLevelTimer
492=17MinuteLevelTimer
493=18MinuteLevelTimer
494=19MinuteLevelTimer
495=20MinuteLevelTimer
496=ClearTimerFunc
497=TimedPassOutFunc
498=TestPassOutFunc
499=PassOutDeathFunc
500=StartTimedPassOutFunc
501=TurnOffTimer

; ------------------------------------------------------------|

; --------------------------------|
; Begin FUNCTION DEFINITIONS
; --------------------------------|

; --------------------------------|
; Begin AUDIO FUNCTION DEFINITIONS
; --------------------------------|

[PlaypickupEffect]
Class=function
1=PlayAudioEffect pickupEffect

[PlayjumpEffect]
Class=function
1=PlayAudioEffect jumpEffect

[PlaylandEffect]
Class=function
1=PlayAudioEffect landEffect

[PlaybumpEffect]
Class=function
1=PlayAudioEffect bumpEffect

[PlaylevelEndEffect]
Class=function
1=PlayAudioEffect levelEndEffect

[PlayfishDeathEffect]
Class=function
1=PlayAudioEffect fishDeathEffect

[PlaysnakeDeathEffect]
Class=function
1=PlayAudioEffect snakeDeathEffect

[PlaybirdDeathEffect]
Class=function
1=PlayAudioEffect birdDeathEffect

[PlaywaterDeathEffect]
Class=function
1=PlayAudioEffect waterDeathEffect

[PlaycattailTriggerEffect]
Class=function
1=PlayAudioEffect cattailTriggerEffect

[PlayleafTriggerEffect]
Class=function
1=PlayAudioEffect leafTriggerEffect

[PlayflowerTriggerEffect]
Class=function
1=PlayAudioEffect flowerTriggerEffect

[PlaystalagtiteTriggerEffect]
Class=function
1=PlayAudioEffect stalagtiteTriggerEffect

[PlaycatapultAimEffect]
Class=function
1=PlayAudioEffect catapultAimEffect

[PlaycatapultLaunchEffect]
Class=function
1=PlayAudioEffect catapultLaunchEffect

[PlaycoconutSplashEffect]
Class=function
1=PlayAudioEffect coconutSplashEffect

[PlayslipperySurfaceEffect]
Class=function
1=PlayAudioEffect slipperySurfaceEffect

[PlaylaunchBounceSurfaceEffect]
Class=function
1=PlayAudioEffect launchBounceSurfaceEffect

[PlaybumpBounceSurfaceEffect]
Class=function
1=PlayAudioEffect bumpBounceSurfaceEffect

[PlayFinalMovie]
Class=function
1=PlayMovie 1.0 final.avi

; END AUDIO FUNCTION DEFINITIONS-----------------------------|

; --------------------------------|
; Begin GOODIE FUNCTION DEFINITIONS
; --------------------------------|

[SuperJump]
Class=function
1=DelayedExecute 1 SuperJumpGo
2=FlashGoodie 5 1.90

[SuperJumpGo]
Class=function
1=LaunchFromFaceNormal 32 0 0
2=PlayAudioEffect launchBounceSurfaceEffect
3=DelayedExecute 2.0 RemoveGoodieFunc

[SuperHighJump]
Class=function
0=IfDyingOrDead Abort
1=DelayedExecute 1 SuperHighJumpGo
2=FlashGoodie 2 0.5

[SuperHighJumpGo]
Class=function
0=IfDyingOrDead Abort
1=LaunchFromFaceNormal 50 0 0
2=PlayAudioEffect launchBounceSurfaceEffect
3=SetTo FartNutBlastVar 1
4=DelayedExecute 2.0 RemoveGoodieFunc

[PootJump]
Class=function
0=IfDyingOrDead Abort
1=Execute PootJumpGo
2=FlashGoodie 2 0.5

[PootJumpGo]
Class=function
0=IfDyingOrDead Abort
1=LaunchFromFaceNormal 20 0 0
2=PlayAudioEffect launchBounceSurfaceEffect
3=SetTo FartNutBlastVar 1
4=DelayedExecute 2.0 RemoveGoodieFunc


;----------------------------------

[FoodNutBumperFunc]
Class=function
1=IfPlayer Execute MoreTime

[GetFoodNutSoundFunc]
Class=function
1=PlayAudioEffect pickupEffect

[ActivateGoodieSoundFunc]
Class=function
1=PlayAudioEffect levelEndEffect

[EndGoodieSoundFunc]
Class=function
1=DelayedExecute 1 PlayEndGoodieSoundFunc
2=DelayedExecute 2 PlayEndGoodieSoundFunc
3=DelayedExecute 3 PlayEndGoodieSoundFunc

[PlayEndGoodieSoundFunc]
Class=function
1=PlayAudioEffect pickupEffect

[AirDeathGoodieFunc]
Class=function
1=KillSqueezil
2=DelayedExecute 0.05 RemoveGoodieFunc

;--------------------------------------------
[ClearMessFunc]
Class=function
1=ClearMessage


[GenericDeathFunc]
Class=function
1=FlashGoodie 20 1.0
2=KillSqueezil
3=DelayedExecute 15 RemoveGoodieFunc

[RemoveGoodieFunc]
Class=function
1=RemoveCurrentGoodie

[QuickStopFunc]
Class=function
1=SetClaws 0.5 0.08
2=DelayedExecute 1 ResetClawsFunc
3=SetMotionSpeed 0.0

[ResetClawsFunc]
Class=function
1=ResetClaws

[SlipperyFunc]
Class=function
1=SetFriction -1.7 -1.4
2=SetClaws -0.25 -0.07

[UnSlipperyFunc]
Class=function
1=ResetFriction
2=ResetClaws

[WinLevelFunc]
Class=function
1=Message Well Done, Sparky!
2=DelayedExecute 5 ClearMessFunc
3=GoToRegion

[BounceFunc]
Class=function
0=Execute AltSlipperyFunc
1=BounceBackwards 3.0
2=DelayedExecute 0.05 BounceSlower1
3=DelayedExecute 0.10 BounceSlower2
4=DelayedExecute 0.15 BounceSlower3
5=DelayedExecute 0.20 BounceSlower4
6=DelayedExecute 0.25 BounceSlower5
7=DelayedExecute 0.30 BounceSlower6
8=DelayedExecute 0.35 BounceSlower7

[BounceSlower1]
Class=function
1=SetMotionSpeed 2.568

[BounceSlower2]
Class=function
1=SetMotionSpeed 2.14

[BounceSlower3]
Class=function
1=SetMotionSpeed 1.712

[BounceSlower4]
Class=function
1=SetMotionSpeed 1.284

[BounceSlower5]
Class=function
1=SetMotionSpeed 0.856

[BounceSlower6]
Class=function
1=SetMotionSpeed 0.428

[BounceSlower7]
Class=function
1=SetMotionSpeed 0.0

[WaterWalkerFunc]
Class=function
1=PlayAudioEffect fishDeathEffect
2=DelayedExecute 5 TestDrownFunc

[AltSlipperyFunc]
Class=function
1=SetFriction -1.7 -1.8
2=SetClaws -0.25 -0.07

[AltUnSlipperyFunc]
Class=function
1=ResetFriction
2=ResetClaws

[StartTimerFunc]
Class=function
2=Execute TimeLoopFunc

[1MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 60
3=Execute StartTimerFunc

[2MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 120
3=Execute StartTimerFunc

[3MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 180
3=Execute StartTimerFunc

[4MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 240
3=Execute StartTimerFunc

[5MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 300
3=Execute StartTimerFunc

[6MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 360
3=Execute StartTimerFunc

[7MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 420
3=Execute StartTimerFunc

[8MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 480
3=Execute StartTimerFunc

[9MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 540
3=Execute StartTimerFunc

[10MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 600
3=Execute StartTimerFunc

[11MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 660
3=Execute StartTimerFunc

[12MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 720
3=Execute StartTimerFunc

[13MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 780
3=Execute StartTimerFunc

[14MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 840
3=Execute StartTimerFunc

[15MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 900
3=Execute StartTimerFunc

[16MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 960
3=Execute StartTimerFunc

[17MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 1020
3=Execute StartTimerFunc

[18MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 1080
3=Execute StartTimerFunc

[19MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 1140
3=Execute StartTimerFunc

[20MinuteLevelTimer]
Class=function
1=SetTo TimeLeftVar 1200
3=Execute StartTimerFunc

; --
; -- Time Incrementor
; --
[TimeLoopFunc]
Class=function
0=IfPlayerDead Execute ClearTimerFunc
1=IfPlayerDead Abort
2=IfEqual TimeLeftVar -1 KillSqueezil
3=IfEqual TimeLeftVar -1 Abort
4=DelayedExecute 1 TimeLoopFunc
;5=DelayedExecute 0.9 ClearTimerFunc
6=TimerTimeMessage TimeLeftVar 
7=AddTo TimeLeftVar -1
8=IfEqual TimeLeftVar 60 PlayAudioEffect AlarmEffect
9=IfEqual TimeLeftVar 30 PlayAudioEffect AlarmEffect
10=IfLesser TimeLeftVar 20 PlayAudioEffect TickingEffect
11=IfGreater TimeLeftVar 3600 SetTo TimeLeftVar 3600

[ClearTimerFunc]
Class=function
1=ClearTimerMessage


; --
; -- Kills the sqz
; --
[KillTheSqueezilFunc]
Class=function
1=PlayAudioEffect attackEffect        
2=KillSqueezil
; --
; -- Call this to give the sqz 10 more seconds 
; --
[MoreTime]
Class=function
1=AddTo TimeLeftVar 10

[TimedPassOutFunc]
Class=function
1=IfEqual PassOutDeathVar 0 IfEqual TriggerPassOutDeathVar 0 Execute StartTimedPassOutFunc
2=IfEqual PassOutDeathVar 0 IfEqual TriggerPassOutDeathVar 0 SetTo PassOutDeathVar 1
3=IfEqual TriggerPassOutDeathVar 0 SetTo TriggerPassOutDeathVar 1
4=PlayAudioEffect bumpEffect
10=DelayedExecute 1.0 PlaybumpEffect
11=DelayedExecute 1.2 PlaybumpEffect
12=DelayedExecute 1.4 PlaybumpEffect

[StartTimedPassOutFunc]
Class=function
1=DelayedExecute 120 TestPassOutFunc
2=Message Hurry back to the tree!
3=DelayedExecute 3 ClearMessFunc
10=DelayedExecute 1.0 PlaybumpEffect
11=DelayedExecute 1.2 PlaybumpEffect
12=DelayedExecute 1.4 PlaybumpEffect
13=DelayedExecute 1.6 PlaybumpEffect
14=DelayedExecute 1.8 PlaybumpEffect

[TestPassOutFunc]
Class=function
1=IfEqual PassOutDeathVar 1 IfOnSurfaceType TimedPassOutDeathSurf Execute PassOutDeathFunc
3=SetTo TriggerPassOutDeathVar 0
4=SetTo PassOutDeathVar 0
5=Execute PlaybumpEffect
10=DelayedExecute 1.0 PlaybumpEffect
11=DelayedExecute 1.2 PlaybumpEffect
12=DelayedExecute 1.4 PlaybumpEffect
13=DelayedExecute 1.6 PlaybumpEffect
14=DelayedExecute 1.8 PlaybumpEffect

[PassOutDeathFunc]
Class=function
1=KillSqueezil 1
;2=PlayAudioEffect PassOutEffect

[TurnOffTimer]
Class=function
1=IfOnTree SetTo PassOutDeathVar 0



; |-----------------END Function.ini File--------------------|
