NetHack 1.3d/apply.c