DarwinBotsManual
Open the app EspañolES

.refshoot

How many times the DNA of the bot you are looking at writes to .shoot: if it is greater than 0, it knows how to shoot.

Facts

Address
707
Name
.refshoot
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: how many commands writing to .shoot the DNA of the bot your focus eye sees has, whether or not they run. 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 about 16000; 0 if you see a corpse or a shape.
Mutations
picked as a read (*)

It counts how many times the address of .shoot (7) appears in the DNA of the bot being seen right before a write word. Besides being a number in the signature, like .refup, it has a direct reading: a bot with .refshoot at 0 has no shoot command written in the usual way, so it is unlikely to attack you with shots (it could shoot with a computed address, which the signature doesn't count). Vegetables are usually at 0.

Careful: it counts what is written, not what runs. A bot with a -1 .shoot store in a gene that is never activated counts too. Your own number is .myshoot.

' if the other can shoot and isn't one of mine, I turn around
cond
*.eye5 0 >
*.refshoot 0 >
*.refeye *.myeye !=
start
628 .aimdx store
stop