'
'Plants have feelings too
'by peterb
'
'(like some trees only reproduce with forest fire)
'This algey only reproduces when attacked.
'When attacked, it wil have offsrping that run away when shot if age < 450
'There is no check on age.
'Once an older algey is attacked it also rotates (so offspring goes into various directions)


def auw 100
def heal 101

def reproval 50   
def bigsmall 51   


cond
*.robage 300 >
start
1 .fixpos store
stop



' added self tuning genetics for the PREYBOT
'---------------------------
cond
*.robage 1 =
start
90 rnd 10 add .reproval store
40 rnd 50 add .bigsmall store
stop

cond
*.nrg *.nrg =
start
*.reproval .out1 store
*.bigsmall .out2 store
stop

'------------------------






cond
*.numties 0 >
start
*.tiepres .deltie store
stop




cond 
*.pain 40 >
*.numspecies 200 <

start
200 .auw store
400 .heal store
*.tiepres .deltie store
stop


cond
*.robage 450 >
*.auw 1 >
*.body 50 >
start
0 .fixpos store
15 .repro store
*.auw .aimdx store
*.auw 10 sub .auw store
*.tiepres .deltie store
stop

cond
*.robage 450 <               
*.auw 0 >
*.nrg 200 >
start
200 .dn store
*.auw  3 sub .auw store
*.tiepres .deltie store
0 .aimdx store
stop


cond
*.heal 0 >
start
.heal dec
else
0 *.auw store
stop

cond 
*.robage 0 =
start
50 .dn store
stop
