It's a total mess in the code and probably full of bugs. One day I will dig into it and try to figure out the intentions of whoever wrote this mess, but for now, I'm afraid to screw with it. Here's what I can determine from reading through the code. Could be way off.
Basically, when a bot gets hit by a posion shot t, it's posion counter gets increased by the amount:
Shots(t).nrg / (Shots(t).Range * 40) * Shots(t).value
that is, it will stay poisoned for that many cycles.
The posion shot's "nrg" is a paradoxically a function of the range of the shot (not it's nrg) that caused the poison shot in the first place. That is, a posionous bot will emit a more powerful (meaning longer lasting) posion shot when it gets hit with a shot at close range instead of long range. The exact formula of the posion shot's nrg appears to be is (r * 40 + 40 + 1) / 40 where r is the range of the original shot at the time it impacted. Range is a countdown of cycles of life for the shot. And don't ask me why this forumla is the way it is.
The range value at the time the poison shot impacts is a function of the number of cycles the poision shot has been in existance. It counts down each cycle. It's original value is itself originally a function of the where in the range the original shot that casued the posion to get emitted was when it impacted. The initial range for the posion shot is r *40 + 40 + 1. So it looks from a first glance at the code that posion shots last a long time. Do they?
The poison shot's value is paradoxically defined as half the nrg of the original shot that casued the posion shot to be emitted in the first place. What is this nrg? That depends on the original shot type and is in part determined via .shootval for most shot types.
Confused yet? So am I. If you figure it out, let me know. If someone knows how this was supposed to work, also let me know.