NetHack 1.4f/invent.c