; ---------------------------------------------------------------------
; robo brains and robo related funcs
; ---------------------------------------------------------------------
[RoboBrainList]
0	= 5x5PaceRobo
1	= 10x10PaceRobo
2	= 20x20PaceRobo
3	= 30x30PaceRobo
4	= AttackRobo
5	= FraidNutRobo
6	= GoodieGetterRobo
8	= MoshPitRobo
9	= MoronRobo
10	= MuggerRobo
11	= NutCopRobo
12	= NutGuardRobo
13	= PounceRobo
14	= SpitRobo
15	= SpitGuardRobo
16	= SpitCannonRobo
17	= SpitChaseRobo
18	= RebelRobo
19	= VacuumRobo
20	= WallPacerRobo

[AttackRobo]
; A sentry robo who paces in a square until another squeezil
; enters his territory.  When he does, chase him down and bump him.
BodyColor           = Blue1
STIM_BORN           = DoPaceSmall
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoPaceSmall
STIM_SENSE_P_GND    = DoChase
STIM_SENSE_R_GND    = DoChase
STIM_BUMP_P_GND     = DoFlee
STIM_BUMP_R_GND     = DoFlee
STIM_DESENSE_GND    = DoPaceSmall
SenseRadiusP        = 4.0
SenseRadiusR        = 4.0	
;
; Notice no SenseRadiusG or STIM_SENSE_G_....  This guy doesn't ever
; notice goodies.  He may collect one by accident if it's in his way,
; but that's it.  Also, no STIM_BUMP_G_, which means that he doesn't
; react if he's hit by a spit nut.
[RebelRobo]
; An attack robo who attacks other robos (but not the player).
BodyColor           = Green2
STIM_BORN           = DoPaceTiny
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoPaceSmall
STIM_SENSE_R_GND    = DoChase
STIM_BUMP_P_GND     = DoFlee
STIM_BUMP_R_GND     = DoFlee
STIM_DESENSE_GND    = DoPaceTiny
SenseRadiusR        = 6.0
SenseRadiusP        = 3.0

;
; Notice no SENSE_P.  This robo continues what he was doing when he 
; notices the player. The only time he reacts to the player is when 
; the player bumps him.

[MoronRobo]
; A sentry who paces no matter what.
BodyColor           = Green1
STIM_BORN           = DoPaceTiny
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoPaceTiny
;
; Notice that this guy doesn't even react when bumped. 

[VacuumRobo]
; A robo who searches for and collects nuts, and attacks whenever he
; senses another Squeezil nearby.  Note that his large goodie sense
; radius makes him a very effective vacuum cleaner.  He'll eat everything
; he can see, which can make things very frustrating for the player.
BodyColor           = Orange1
STIM_BORN           = DoWander		
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch		
STIM_LAND           = DoWander
STIM_SENSE_P_GND    = DoChase		
STIM_SENSE_R_GND    = DoChase	
STIM_SENSE_G_GND    = DoChase 
STIM_DESENSE_GND    = DoWander
STIM_BUMP_P_GND     = DoFlee
STIM_BUMP_R_GND     = DoFlee
STIM_BUMP_G_GND     = DoChase 
SenseRadiusP        = 4.0			
SenseRadiusR        = 4.0
SenseRadiusG        = 35.0

[NutCopRobo]
; This guy wanders around looking for goodies.  When he finds one, he
; stops wandering and starts pacing, sort of attempting to protect his
; goodie.  When another squeezil approaches, he attacks.  (This brain
; will work better when we have a way to march around a target.)
BodyColor           = Orange1
STIM_BORN           = DoPaceTiny
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoWander
STIM_SENSE_P_GND    = DoChase
STIM_SENSE_R_GND    = DoChase
STIM_SENSE_G_GND    = DoPaceTiny
STIM_BUMP_P_GND     = DoFlee
STIM_BUMP_R_GND     = DoFlee
STIM_DESENSE_GND    = DoWander
SenseRadiusP        = 1.0
SenseRadiusR        = 1.0
SenseRadiusG        = 1.5

[30x30PaceRobo]
; A sentry who paces a 30x30 square no matter what.
BodyColor           = Green1
STIM_BORN           = DoPace30x30
STIM_DIED_GND       = DoDeathShort
STIM_DIED_AIR       = DoDeathShort
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoPace30x30

[20x20PaceRobo]
; A sentry who paces a 20x20 square no matter what.
BodyColor           = Green1
STIM_BORN           = DoPace20x20
STIM_DIED_GND       = DoDeathShort
STIM_DIED_AIR       = DoDeathShort
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoPace20x20

[10x10PaceRobo]
; A sentry who paces a 10x10 square no matter what.
BodyColor           = Green1
STIM_BORN           = DoPace10x10
STIM_DIED_GND       = DoDeathShort
STIM_DIED_AIR       = DoDeathShort
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoPace10x10
STIM_SENSE_P_GND 	  = DoChase 
STIM_BUMP_P_GND	  = DoFlee 
STIM_DESENSE_GND    = DSDoPace10x10
SenseRadiusP	= 4.0

[5x5PaceRobo]
; A sentry who paces a 5x5 square no matter what.
BodyColor           = Green1
STIM_BORN           = DoPace5x5
STIM_DIED_GND       = DoDeathShort
STIM_DIED_AIR       = DoDeathShort
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoPace5x5

[FraidNutRobo]
; An attack robo who attacks other robos (but not the player).
BodyColor           = Green1
STIM_BORN           = DoPaceTiny
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoPaceTiny
STIM_SENSE_R_GND    = DoChase
STIM_SENSE_G_GND    = DoFlee
STIM_BUMP_P_GND     = DoWander
STIM_BUMP_G_GND     = DoPaceTiny
STIM_DESENSE_GND    = DoPaceTiny
SenseRadiusG        = 3.0
SenseRadiusP        = 1.5
SenseRadiusR        = 3.0

[NutGuardRobo]
; This guy wanders around looking for goodies.  When he finds one, he
; stops wandering and stops , sort of attempting to protect his
; goodie.  When another squeezil approaches, he attacks.  (This brain
; will work better when we have a way to march around a target.)
BodyColor           = Orange1
STIM_BORN           = DoWander
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoWander
STIM_SENSE_P_GND    = DoChase
STIM_SENSE_R_GND    = DoChase
STIM_SENSE_G_GND    = DoHoldStill
STIM_BUMP_P_GND     = DoWander
STIM_BUMP_R_GND     = DoWander
STIM_DESENSE_GND    = DoStopAndSeek
SenseRadiusP        = 2.0
SenseRadiusR        = 2.0
SenseRadiusG        = 5.0

[PounceRobo]
; This guy stands still waiting for any sqzl to come by.
; He then chases the poor sucker down. If he don't sense
; anybody he sands around waiting...
BodyColor           = Blue1
STIM_BORN           = DoHoldStill
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoHoldStillLand
STIM_SENSE_P_GND    = DoChase
STIM_SENSE_R_GND    = DoChase
STIM_BUMP_P_GND     = MoshFlee
STIM_BUMP_R_GND     = MoshFlee
STIM_DESENSE_GND    = DoStopAndSeek
SenseRadiusP        = 2.0
SenseRadiusR        = 2.0


[SpitRobo]
; This is now the same as SpitChaseRobo as per Terry's request.  Just a
; different color is all.
BodyColor           = Blue2
STIM_BORN           = SpitBorn	
STIM_DIED_GND       = DoDeathShort
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch		
STIM_LAND           = DoWander
STIM_SENSE_P_GND    = DoSpit		
STIM_SENSE_G_GND    = DoChase 
STIM_DESENSE_GND    = DoWander 
STIM_BUMP_P_GND     = SpitFlee
STIM_BUMP_R_GND     = DoFlee
;STIM_BUMP_G_GND     = DoChase 
SenseRadiusP        = 35.0
SenseRadiusR        = 4.0		
SenseRadiusG        = 4.0

[SpitGuardRobo]
; The spit robo spits at the player. When he doesn't have the player to spit 
; at, he wanders around looking for nuts. He doesn't start with any spit nuts, 
; so he needs to collect some ammo before becoming effective. Notice how the
; DoSpit function changes his behavior to keep him from chasing after his own
; spit nuts.
BodyColor           = Blue2
STIM_BORN           = DoHoldStill
STIM_DIED_GND       = DoDeathLong
STIM_DIED_AIR       = DoDeathLong
STIM_LAUNCH         = DoLaunch		
STIM_LAND           = DoHoldStillLand
STIM_SENSE_P_GND    = DoSpit		
STIM_DESENSE_GND    = DoHoldStill
STIM_BUMP_P_GND     = DoSpit
STIM_BUMP_G_GND     = DoHoldStill
SenseRadiusP        = 4.0
SenseRadiusG        = 2.0

[SpitCannonRobo]
; Stands still on a platform, aims at sqz below, spits.
BodyColor           = Blue2
STIM_BORN           = DoLoadAndFreeze
STIM_DIED_GND       = DoDeathShort
STIM_DIED_AIR       = DoDeathShort
STIM_LAUNCH         = DoLaunch
STIM_LAND           = DoWander
STIM_SENSE_P_GND    = DoSpitCannon	
STIM_BUMP_P_GND	  	= CST
STIM_DESENSE_GND    = DoHoldStill
SenseRadiusP        = 15.0
	
[SpitChaseRobo]
; The spit robo spits at the player, then after a little bit runs the player down.
; When he doesn't have the player to spit at, he wanders around looking for nuts. 
; He doesn't start with any spit nuts, 
; so he needs to collect some ammo before becoming effective. Notice how the
; DoSpit function changes his behavior to keep him from chasing after his own
; spit nuts. 
; When the robo first sees the player he chases the player down. Then the spit,chase,
; flee, spit cycle starts
;
BodyColor 	    	= Blue2
STIM_BORN           = SpitBorn   	
STIM_DIED_GND       = DoDeathShort
STIM_DIED_AIR       = DoDeathShort
STIM_LAUNCH         = DoLaunch		
STIM_LAND           = SpitLand
STIM_SENSE_P_GND    = DoSpit		
STIM_SENSE_G_GND    = DoChase 
STIM_DESENSE_GND    = SpitWander
STIM_BUMP_P_GND     = SpitFlee
STIM_BUMP_R_GND     = DoFlee
STIM_BUMP_G_GND     = DoChase 
SenseRadiusP        = 15.0
SenseRadiusR        = 4.0		
SenseRadiusG        = 4.0

[MoshPitRobo]
; He don't like you, he wants to smack you.
; He don't care for damned goodies, He don't
; care about his wormy pals either.
BodyColor		= Blue1
STIM_BORN		= DoHoldStill
STIM_DIED_GND	= DoDeathShort
STIM_DIED_AIR	= DoDeathShort
STIM_LAUNCH		= DoLaunch 
STIM_LAND		= SpitLand
STIM_SENSE_P_GND= DoChase
STIM_BUMP_P_GND = MoshFlee
STIM_BUMP_R_GND = DoFlee
STIM_DESENSE_GND= DoHoldStill
SenseRadiusP        = 15.0				
SenseRadiusR        = 7.0

[GoodieGetterRobo]
; This robo goes after goodies but he's afraid of robos and players
BodyColor		= Green1
STIM_BORN		= DoWander
STIM_DIED_GND   = DoDeathShort
STIM_DIED_AIR	= DoDeathShort
STIM_LAUNCH		= DoLaunch
STIM_LAND		= DoWander 
STIM_SENSE_P_GND= DoFlee
STIM_SENSE_R_GND= DoFlee
STIM_SENSE_G_GND= DoChase
STIM_BUMP_P_GND = DoFlee
STIM_BUMP_R_GND = DoFlee
STIM_DESENSE_GND= DoWander
SenseRadiusP	= 8.0
SenseRadiusR	= 8.0
SenseRadiusG	= 10.0

[WallPacerRobo]
; This robo paces for a while turns 180
; waiting for a player robo. When the 
; player gets close, rush em'
BodyColor		= Green2
STIM_BORN		= StartPace
STIM_DIED_GND	= DoDeathShort
STIM_DIED_AIR	= DoDeathShort
STIM_LAUNCH		= DoLaunch
STIM_LAND = StartPace 
; STIM_LAND = PacerLand 
STIM_SENSE_P_GND= DoChase
STIM_BUMP_P_GND = DoFlee
STIM_BUMP_R_GND = DoFlee
STIM_DESENSE_GND= DoPace10x10
SenseRadiusP	= 2.0
SenseRadiusR	= 2.0

[MuggerRobo]
; ----------------------------------------
; This robot attacks the player, retreats 
; then attacks again until he gets a goodie.
; He ignores other robos until they are too 
; near. There can only be ONE of these since
; it relies on brain states that aren't unique
; accross all muggers. 
; Perhaps different instances of the brain 
; funcs could be made to instanciate each Mugger.
; ----------------------------------------
BodyColor		= Blue1
STIM_BORN		= MuggerRoboBorn
STIM_DIED_GND	= DoDeathShort
STIM_DIED_AIR	= DoDeathShort
STIM_LAUNCH		= DoLaunch
STIM_LAND		= DoMuggerLand
STIM_BUMP_R_GND	= DoFlee 		
STIM_BUMP_P_GND	= DoMuggerBump  
STIM_BUMP_G_GND	= DoMuggerGoodieBump
STIM_SENSE_P_GND= DoMuggerChase
STIM_DESENSE_GND= DSDoPace10x10
SenseRadiusG	= 3.0
SenseRadiusR	= 4.0  
SenseRadiusP	= 15.0


; ----------------------------------------------------------------
; These are the robo functions
[FunctionList]
1=DoWander
2=DoDeathShort
3=DoDeathLong
4=DoLaunch
5=DoGather
6=DoFlee
7=DoPaceSmall
8=DoChase
9=DoAttackBump
10=DoHoldStill
11=DoWanderLong
12=DoPaceTiny
13=DoPace10x10
14=DoPace5x5
15=DoPace20x20

16=DoPace30x30
17=DoStopAndSeek
18=DoSpit
19=DoSpitterDesense
20=ArmedWander
21=ArmedGuard
22=SpitBorn
23=SpitStand
24=SeeGoodie
25=GoodieChase
26=SpitWander
27=SpitLand
28=SwitchToChaseBehavior
29=SpitFlee 
30=CST
31=MoshFlee
32=DoLoadAndFreeze
33=DoSpitCannon
34=StartPace
35=PacerLand
36=MuggerRoboBorn
37=DoMuggerGoodieBump
38=DoMuggerChase
39=DoMuggerLand
40=MuggerResetState
41=DoMuggerBump
42=MuggerPause
43=DoHoldStillLand
44=DSDoPace10x10     ; Desense Pace 10x10 func
; --------------------------------------------------------------
[DoWander]
Class=function
1=SetRoboBehavior BEH_WANDER

[DoDeathShort]
Class=function
1=SetRoboBehavior BEH_DEATH 15

[DoDeathLong]
Class=function
1=SetRoboBehavior BEH_DEATH 30

[DoLaunch]
Class=function
1=SetRoboBehavior BEH_SIMPLE_FLY

[DoGather]
Class=function
1=SetRoboBehavior BEH_WANDER

[DoFlee]
Class=function
1=SetRoboBehavior BEH_FLEE

[DoPaceSmall]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 2.5 2.5

[DoPaceTiny]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 0.5 0.5

[DoChase]
Class=function
1=SetRoboBehavior BEH_CHASE

[DoAttackBump]
Class=function
1=SetRoboBehavior BEH_FLEE

[DoHoldStill]
Class=function
1=SetRoboBehavior BEH_PACE 10.0 0.0 0.0

; - when landing clear sense targs
[DoHoldStillLand]
Class=function
1=Execute DoHoldStill
2=Execute CST

[DoStopAndSeek]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 0.0 0.5
;2=Execute CST

[DoWanderLong]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 5.0 10.0

[DoPace30x30]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 30.0 1.0

[DoPace20x20]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 20.0 1.0

[DoPace10x10]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 4.0 0.0
2=Execute CST

[DSDoPace10x10]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 4.0 0.0


[DoPace5x5]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 5.0 2.0

;[DoSpitterDesense]
;Class=function
;1=SetRoboBehavior BEH_PACE 90.0 5.0 0.0
;;1=Execute DoWander
;2=ChangeRoboResponse STIM_SENSE_G_GND DoChase
;3=ChangeRoboResponse STIM_DESENSE_GND DoWander

[DoLoadAndFreeze]
Class=function
1=AddSpitNuts 20
2=Execute DoHoldStill


[ArmedWander]
Class=function
1=AddSpitNuts 5
2=Execute DoWander

[ArmedGuard]
Class=function
1=AddSpitNuts 5
2=Execute DoHoldStill

; -- start standing

[SpitBorn]
Class=function
1=SetRoboBehavior BEH_PACE 90.0 0.0 0.0 
2=AddSpitNuts 5

; -- wander about slowly
[SpitStand]
Class=function
1= SetRoboBehavior BEH_PACE 45.0 1.0 0.0

[SpitWander]
Class=function
1=SetRoboBehavior BEH_PACE 90 2.5 0.1

; - clear sense targs,
; - turn away from surface
[SpitLand]
Class=function
1=ClearSenseTargets
2=SetRoboBehavior BEH_PACE 180 2.5 0.1


[GoodieChase]
Class=function
1=Execute DoChase

[SeeGoodie]
Class=function
2=ChangeRoboResponse STIM_SENSE_G_GND 0

; --
; - pace around looking for nuts
; -
[DoSpitterDesense]
Class=function
1=SetRoboBehavior BEH_PACE 45.0 5.0 0.0 
2=ChangeRoboResponse STIM_SENSE_G_GND GoodieChase
3=ChangeRoboResponse STIM_DESENSE_GND SpitStand

; - spit, forget about nuts, 
; - reset function desense so that when the 
; - player is out of range, don't ignore nuts

[DoSpit]
Class=function
1=SetRoboBehavior BEH_SPIT 4.0 .5
2=ChangeRoboResponse STIM_SENSE_G_GND 0
3=ChangeRoboResponse STIM_DESENSE_GND DoSpitterDesense
; -- run the player down after a while
4=DelayedExecute 10 SwitchToChaseBehavior

;This may be a waste since spit nuts
; don't go very far. But Since he may be
; on high spitting down...
[DoSpitCannon]
Class=function
1=SetRoboBehavior BEH_SPIT 2.0 1

[SpitFlee]
Class=function
1=Execute DoFlee
2=DelayedExecute 5 CST
3=ChangeRoboResponse STIM_SENSE_P_GND DoSpit

[ChaseFlee]
Class=function
1=Execute DoFlee
2=DelayedExecute 2 CST
; --------------------------------------------------------
[SwitchToChaseBehavior]
Class=function
1= ClearSenseTargets
2= ChangeRoboResponse STIM_SENSE_P_GND DoChase 


[CST]
Class=function
1=ClearSenseTargets


[MoshFlee]
Class=function
1=Execute DoFlee
2=DelayedExecute 2 CST

[StartPace]
Class=function
1=SetRoboBehavior BEH_PACE 180 7 1
2=Execute CST

[PacerLand]
Class=function
1=DelayedExecute 5 KillSqeezil


; -- When born, stand in one place waiting...
;
[MuggerRoboBorn]
Class=function 
1 = SetRoboBehavior BEH_PACE 0.0 0.0

; -- 
; --
[DoMuggerChase]
Class=function 
1=SetRoboBehavior BEH_CHASE 

; -- If mugger bumps into a goodie, make him stop 
; -- attacking the player. Reset to attack mode 
; -- after three minutes.
; --
[DoMuggerGoodieBump]  	
Class = function 
1=ChangeRoboResponse STIM_SENSE_P_GND SpitStand
2=ChangeRoboResponse STIM_SENSE_G_GND DoChase 
3=DelayedExecute 180 MuggerResetState

; -- ClearSenseTargets when mugger Lands
; -- from flight. He is now looking for 
; -- trouble again.

[DoMuggerLand]
Class=function
1=SetRoboBehavior BEH_PACE 180 0.02 1.0
2=ClearSenseTargets

[MuggerResetState]
Class=function
1 = ChangeRoboResponse STIM_SENSE_P_GND DoMuggerChase

[DoMuggerBump]
Class=function
1 = SetRoboBehavior BEH_FLEE
2 = DelayedExecute 5 MuggerPause

[MuggerPause]
Class=function
1=SetRoboBehavior BEH_PACE 0.0 0.0 0.0 
2=ClearSenseTargets


; ------------------------------------
; 9/27/96 
; 9/28/96
; 10/7/96
; ------------------------------------
