DarwinBotsManual
Open the app EspañolES

.repro

Orders an asexual reproduction: the number is the percentage of energy, body and chloroplasts that the child takes.

Facts

Address
300
Name
.repro
Kind
Command: the bot writes it and the engine reads it and usually consumes it
Group
Reproduction
Written by
Your DNA.
Read by
The engine, in the actions phase: if it is greater than 0, it requests a child, which is born in the births and deaths phase of the same cycle.
Cleared
The engine, only when the child is born. If the birth fails, it stays written and is retried every cycle.
Range
−32000 to 32000; the remainder of dividing by 100 is used: the percentage the child takes (100 counts as 0).
Mutations
picked as a store target

Write a percentage and, if it can be done, the bot has a child at the end of that same cycle. With 30 .repro store and 3000 energy and 1000 body, the child is born with about 900 energy and 300 body, and the parent keeps about 2100 and 700 (a thousandth is lost in the handover). Chloroplasts and waste are split the same way.

' It splits in two when it gathers energy
cond
 *.nrg 6000 >
start
 50 .repro store
stop

What you need to know:

If .repro and .mrepro are both set in the same cycle, a coin flip decides which of the two percentages is used. If the bot is fertilized and has .sexrepro written, that cycle it only tries sexual reproduction and the asexual one waits, even if the sexual one ends up failing. The rest of the process is in Reproduction and Reproduction.