I like what you have done here. There is a command called /targetlastenemy that could restore your last unfriendly target... but you would have to figure out what the best way to implement that is with your set up.