zapping a never seen wand while blinded won't make the wand a discovery
zapping an unID'd wand of teleportation at self will discover it (usually)
zapping unlocking magic at self while punished will remove attached chain
+don't see objects or read engraving when hero changes location (random
+ teleport) or position (levitation timeout) while asleep or fainted
Platform- and/or Interface-Specific Fixes
-/* SCCS Id: @(#)pickup.c 3.5 2005/12/07 */
+/* SCCS Id: @(#)pickup.c 3.5 2006/02/03 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
struct obj *objchain;
int traverse_how;
+ /* we might have arrived here while fainted or sleeping, via
+ random teleport or levitation timeout; if so, skip check_here
+ and read_engr_at in addition to bypassing autopickup itself
+ [probably ought to check whether hero is using a cockatrice
+ corpse for a pillow here... (also at initial faint/sleep)] */
+ if (autopickup && multi < 0 && unconscious()) return 0;
+
if (what < 0) /* pick N of something */
count = -what;
else /* pick anything */