this might be solved the same way like avoiding TK can be implemented, just by doing tracelines and watching which entitity is hit ... and often you dont even have to have additional code
is this just a fun thread, or a thread pointing out difficulties this bot is having problems with ?