NetHack 2.2a/apply.c