.kills
How many bots this bot has killed, with shots or through a tie; the engine updates it only when it kills.
Facts
- Address
- 220
- Name
.kills- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Body, energy and state
- Written by
- The engine, only when this bot kills another: with a shot, in the shots phase; through a tie, in the movement phase.
- Cleared
- No. If you write another number, it stays until the next kill; then the engine puts its own count back.
- Range
- 0 to 32000.
- Mutations
- picked as a read (
*)
It counts the bot's victims: every time a shot of its own, or what it takes from another through a tie, leaves that other one without energy or without body, the engine adds 1 and writes it here. The cap is 32000 (in the original DarwinBots, the count by shots did not have one; the port fixed that).
The peculiar thing is that the engine only writes it when the bot kills. The rest of the time it does not touch it, so if you write another number to .kills it stays there until the next kill, and at that moment the engine puts its own count back (which was not aware of your change). It is no good, then, for keeping a count of your own: for that, use a free memory cell.
A child is born with .kills at 0: kills are not inherited.
' After the first victim, it stores energy in the body
cond
*.kills 0 >
*.nrg 3000 >
start
100 .strbody store
stopThe kills of the bot in front of you are read in .refkills: a high number warns you that it is a predator. How killing works with shots is in Shots, and with ties in Ties and multicellular bots.