def robage1 50
def mytienum 53

'eyepos

cond
*.robage 0 =
start
-615 .eye1dir store
615 .eye9dir store
-419 .eye2dir store
419 .eye8dir store
-291 .eye3dir store
291 .eye7dir store
-100 .eye4dir store
100 .eye6dir store
285 .eye1width store
285 .eye9width store
-34 .eye2width store
-34 .eye8width store
149 .eye3width store
149 .eye7width store
93 .eye4width store
93 .eye6width store
-34 .eye5width store
31999 rnd .mytienum store
stop

'eyescanning

start
.robage1 inc
stop

cond
*.robage1 32000 =
start
0 .robage1 store
stop

cond
*52 0 =
start
*.robage1 9 mod 4 sub .focuseye store
stop

cond
*.refeye *.myeye !=
*.eyef 0 >
start
1 52 store
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop

cond
*.eye5 0 =
*.refeye *.myeye = or
start
0 52 store
stop

'feeding
'shooting

cond
*.eye5 50 >
*.refeye *.myeye !=
*52 1 =
start
-1 .shoot store
*.refvelup .up store
*.refvelsx .sx store
stop

cond
*52 1 =
*.eye5 50 <
*.refeye *.myeye !=
start
*.refvelup 30 add .up store
stop

'ties

'friend

cond
*.refeye *.myeye =
start
*.refxpos *.refypos angle debugint dup sgn 100 mult add debugint 0 store
stop