NetHack 2.3e/dog.c