'Alga_Attach

'Gene 1 - Searches for other veggies
cond
  *.numties 0 =
start
  314 rnd .aimsx store
stop

'Gene 2 - Memloc
cond
  *.robage 0 =
start
  67 .memloc store
  101 67 store
stop

'Gene 3 - Shoot tie onto other veggie
cond
  *.eye5 50 >
  *.memval *67 =
  *.in1 15 !=
start
  1 .tie store
stop

'Gene 4 - Delete tie if attacked
cond
  *.tin1 15 =
  *.in1 15 =
start
  1 .deltie store
stop

'Gene 5 - Share nrg with other veggies
cond
  *.numties 1 >=
start
  1 .tienum store
  50 .sharenrg store
  150 .fixlen store
stop

'Gene 6 - Reproduction
cond
  *.body 1000 >
  *.nrg 6000 >
start
  10 rnd 5 add 10 mult .repro store
stop

'Gene 7 - Store body
cond
  *.nrg 6000 >
  *.body 1500 <
start
  .strbody 10 store
stop

'Gene 8 - Feed on body
cond
  *.nrg 6500 <
  *.body 1000 >
start
  .fdbody 10 store
stop
end