DarwinBotsManual
Open the app EspañolES

.mkchlr

Buys chloroplasts: adds that amount in the same cycle and charges energy for each one.

Facts

Address
921
Name
.mkchlr
Kind
Command: the bot writes it and the engine reads it and usually consumes it
Group
Chloroplasts and light
Written by
Your DNA.
Read by
The engine, in the actions phase of the same cycle: adds those chloroplasts and charges New chloroplast for each one. If the bot would be left with less than 100 energy, it buys nothing.
Cleared
The engine, after using it. A negative value does nothing and stays written, unless .rmchlr is used that cycle.
Range
−32000 to 32000; only positive values count.
Mutations
picked as a store target

Write how many chloroplasts you want and the engine adds them in the same cycle, charging for each one whatever the cost New chloroplast sets. The command is cleared afterwards, so a big purchase is made all at once or repeated cycle after cycle. There is no cap per cycle, apart from the maximum of 32000 chloroplasts (whatever goes beyond that is charged anyway and lost).

The purchase is all or nothing. It is cancelled entirely, without charging, if:

A negative value does nothing (in the original DarwinBots, a −100 in .rmchlr together with a purchase added 100 more chloroplasts; the port fixed that). If you also write .rmchlr in the same cycle, both things are done and only the net increase is charged.

' Buys chloroplasts 100 at a time while it has energy to spare
cond
 *.chlr 1000 <
 *.nrg 500 >
start
 100 .mkchlr store
stop

The result is read in .chlr the next cycle.