I guess kill stealing 50% of the time is better than 100% of the time...right? Sigh...
Seriously though, this needs massive improvements. Walker did this better 15 years ago. You've already made everyone bots with this system might as well make us good bots.
Main problem : Swapping targets correctly when a mob is already taken. If this occurs after someone else has registered a hit on it, it's too late. You should simply not be able to target a mob that is already targeted. If you don't intend to make it work that way, at least make it react faster. I can literally fully deplete a mob's HP after someone else has hit it first before target changing kicks in.
Feelsbadman, but at least we're on the right path.