'Topic: Overaged Robots - Amazing
'Alga Kelp (veg)
'by ScarabDrowner
'15 May 2004
'
'run unblocked in pond mode
'*Initialize
cond
*.robage 0 =
start
0 53 store
0 54 store
0 55 store
56 .readtie store
56 .tie store
1000 .setboy store
stop
cond
*.robage 1 =
start
628 .aimdx store
50 .fixlen store
stop
cond
*.robage 4000 >
start
1 53 store
stop
'*Start Root Function
'* if free floating, start spinning
cond
*.fixed 0 =
*.numties 0 =
*54 0 =
start
1 55 store
26 .aimdx store
stop
'* when facing top of pond, turn to face bottom
cond
*55 1 =
*.sun 1 =
*.numties 0 =
start
1 54 store
628 .aimdx store
stop
'* if not at bottom of pond, move towards bottom
cond
*54 1 =
*55 1 =
*.numties 0 =
start
5 .up store
stop
'* fix into position on bottom and turn to face the top
cond
*54 1 =
*55 1 =
*.edge 1 =
*.depth 5000 >
*.numties 0 =
start
0 55 store
628 .aimdx store
1 .fixpos store
stop
'* start reproducing to create rest of tree
cond
*.nrg 2000 >
*.edge 1 =
*.fixed 1 =
*.numties 0 =
*53 0 =
start
50 .repro store
stop
'*End Root Function
'*Start Branch Function
'* just regular reproduction
cond
*.fixed 0 =
*.numties 0 >
*.numties 2 <
*.nrg 2000 >
*53 0 =
*.depth 3000 >
start
50 .repro store
stop
'* if branch breaks off, separate into new roots
cond
*.multi 1 =
*.depth 3500 <
start
*.tiepres .deltie store
stop
'* share energy throughout plant
'cond
'*.fixed 0 =
'*.numties 1 >
'*.nrg 2000 >
'start
'80 .sharenrg store
'stop
'* die of old age
cond
*53 1 =
*.numties 2 <
*.fixed 1 !=
start
-2 .shoot store
*.nrg .shootval store
stop
cond
*53 1 =
*.numties 1 <
*.fixed 1 =
start
-2 .shoot store
*.nrg .shootval store
stop
end