Bots and Simulations > The Gene depository

my little insert

<< < (2/3) > >>

d-EVO:
my bad, fixed it to work with poison and shell

*.refshell *.refpoison add sgn -1 add 5 mult -1 add .shoot store

Moonfisher:

--- Quote from: d-EVO ---my bad, fixed it to work with poison and shell

*.refshell *.refpoison add sgn -1 add 5 mult -1 add .shoot store
--- End quote ---

What he ment was that -6 shots won't trigger poison and -1 shots are more powerfull against shell.
As far as I understand (not sure or anything) then a -1 shot will trigger poison if the target has more poison than shell.
So if you don't want to get poisoned but still wan't to use -1 shots against shell then only fire -1 shots if the target has 0 poison or less poison than shell.

But beware some bots create more poison if they get hit by a -1 shot... so often the safest solution is just to stick to -6 shots unless you're in the F3 league (no poison or shell) or maybe when eating alge.

To get more from an alge you could switch between -1 and -6 shots.

.dnalen .memloc store
*.memval 13 = 'Alge dnalen is 13
-1 5 *.timer 2 mod mult sub .shoot store

d-EVO:
Fine. then it is even easier

*.refpoison sgn -5 mult -1 .shoot store

d-EVO:
here is anothere that will shoot :
-6 shots if poison and shell
-6 shots if poison
-6 shots if no shell or poison
-1 shots if shell

*.refshell sgn -1 add 5 mult -1 add *.refpoison sgn ~ mult *.refpoison sgn -6 mult add .shoot store

bacillus:
I think that for these purposes, inline logic will be more efficient. I tried and failed using it once, but if I understand correctly, you can put conditions inside genes such as *.refpoison 0 !=, as long as you and all your conditions up, and use clearbool when you want to clear the boolean stack (is this necessary at the end of a gene?)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version