Screeps does that, and it doesn't have "classes" per se, but modular bodies... so you can look at an enemy and see that they have some HEAL body parts, so you know they are a healer. You can even calculate how much healing per turn they can do to influence your fight or flight, or target priority decisions (you have multiple units, after all).