There are multiple ways of doing this. Few of them are efficient or worthwhile. Tombs are probably just one of those places where it isn't realistic to auto-aim. Your absolute best solution is denying the bosses you don't want to target the "isEnemy" property, but that is a pain in the ass to do on the fly. Actually, IMO, that is the ONLY way to make a reliable aim-bot for Tombs since it will allow your projectiles to pass through the bosses who are not recognized as enemies at the time and make it impossible to fuck up the tomb.
Doesn't seem worth the time considering how few people will make practical use of it. Unless JustAnoob is just bored as hell.