]> granicus.if.org Git - nethack/commitdiff
Permit blind feeling for objects on trapdoor
authorMichael Meyer <me@entrez.cc>
Wed, 11 Aug 2021 00:14:27 +0000 (20:14 -0400)
committerMichael Meyer <me@entrez.cc>
Wed, 11 Aug 2021 00:14:27 +0000 (20:14 -0400)
Items on a trap door or on the edge of a hole are accessible (they can
be picked up, kicked, etc), but these locations were considered
inaccessible for purposes of feeling the ground for objects while blind.

src/invent.c

index 50c8b755b5941e28a0554d3f1d2af9a9690e820f..66686b90003704d9513cca3d4d2d2b3d101d6f71 100644 (file)
@@ -3431,7 +3431,8 @@ look_here(int obj_cnt, /* obj_cnt > 0 implies that autopickup is in progress */
         }
         if (dfeature && !drift && !strcmp(dfeature, surface(u.ux, u.uy)))
             dfeature = 0; /* ice already identified */
-        if (!can_reach_floor(TRUE)) {
+        trap = t_at(u.ux, u.uy);
+        if (!can_reach_floor(trap && is_pit(trap->ttyp))) {
             pline("But you can't reach it!");
             return 0;
         }