I'm wondering if t.has_flag works. It uses the creature class.

But it seems like it isn't working when shooting vermin. (the splatter function in ranged.cpp).