NetHack 3.1.0/invent.c