NetHack 2.2a/do wear.c