So, the victim variable is undefined while self is defined? Should be easy to fix then, as self is the one getting the damage. Just check distances to other bots and set a flag on them to not recieve damage from the same player in the same frame again.

Only difficulty would be the amount of damage...