Venom

From WikiManual
Revision as of 03:57, 8 February 2006 by Endy (talk | contribs) (horray I'm happy)
Jump to: navigation, search

Can be deliberatly fired by storing -3 into .shoot. Similar to .poison it targets the memory location stored into .vloc. Unlike .poison though it can set that location to a particular value with the use of .venval. The length of time it remains that value again depends on the amount of venom that has been stored into .strvenom.

cond
*.robage 0 =
start
.venval inc
.backshot .vloc store
stop
cond
100 *.venom >
start
100 *.venom sub .strvenom store
stop
cond
*.refeye *.myeye !=
*.refeye 0 >
*.eye5 30 >
start
'fire venom
-3 .shoot store
stop

Here's a basic example showing a bot storing venom whenever it falls below 100. At birth it'll store 1 in venval and .backshot in vloc; to save energy on costs. These will not change unless changed by another. By storing the -3 in .shoot it fires a venom shot causing the defending by to begin firing backwards for however long the hundred units of venom last.

With some additional coding it could then feed from an enemy once it knows a venom shot has been fired.