.refnrg
The energy of the bot you are looking at, from 0 to 32000: for choosing prey worth the trouble or well-fed mates.
Facts
- Address
- 709
- Name
.refnrg- Kind
- Sense: the engine writes it for the DNA to read
- Group
- What it sees (ref*)
- Written by
- The engine, in the actions phase of every cycle, with the energy of the bot your focus eye sees, rounded; even if it is a corpse. Also on colliding with a bot. You read it in the next cycle.
- Cleared
- The engine, every cycle, when the senses are cleared.
- Range
- 0 to 32000.
- Mutations
- picked as a read (
*)
.refnrg is the energy of the bot your focus eye sees, rounded and clamped between 0 and 32000. It is the same as what that bot reads in its .nrg.
It is useful for deciding whether an attack is worth it: an energy shot (.shoot at −1) takes a part of what the other has, so against an almost empty bot you gain little. Also for the opposite: Animal Minimalis Amorous, from the Bestiary, only approaches to mate with a partner that has more than 20000.
Unlike the signature (.refeye and company), a corpse does show its real energy, just like its .refbody. If you see nothing, it is 0.
' I only shoot at what has enough energy to give me
cond
*.eye5 0 >
*.refeye *.myeye !=
*.refnrg 500 >
start
-1 .shoot store
stop