DarwinBotsManual
Open the app EspañolES

.fdbody

Converts body into energy: up to 100 energy per cycle, at 10 energy per body point.

Facts

Address
312
Name
.fdbody
Kind
Command: the bot writes it and the engine reads it and usually consumes it
Group
Body, energy and state
Written by
Your DNA.
Read by
The engine, in the actions phase of the same cycle: takes that energy out of the body, at 10 energy per point.
Cleared
The engine, after using it. A negative value is also cleared, with no effect.
Range
−32000 to 32000; only 1 to 100 count (more than 100 counts as 100).
Mutations
picked as a store target

Write how much energy you want to take out of the body and the engine converts it in the same cycle: 100 .fdbody store adds 100 to .nrg and subtracts 10 from .body. It is the inverse operation of .strbody, and it has no extra cost.

Some details:

' If it runs out of energy, it eats from its body
cond
 *.nrg 1000 <
 *.body 50 >
start
 100 .fdbody store
stop

The typical use, together with .strbody, is covered in Body, energy and state.