NetHack 1.3d/invent.c