NetHack 2.2a/dog.c