#U632: Objects in Pits (game behavior)

<Someone> submitted the following bug report:
> An object and a pit are occupying the same square. I try to kick
> the object out of the square, but "You can't kick something
> that's in a pit!"
>
> I step into the square and escape the pit, but I can pick up the
> object, so maybe it's not in the pit after all.
>

This patch does *not* address this part of the bug report:
> If it's in the pit and it's a cockatrice corpse, should I die
> from landing on it when I fall into the pit?
This commit is contained in:
nethack.allison
2003-09-07 17:25:50 +00:00
parent c3bfccdaf6
commit dae1b81029
4 changed files with 55 additions and 8 deletions
+13 -1
View File
@@ -398,6 +398,7 @@ int what; /* should be a long */
count = 0;
if (!u.uswallow) {
struct trap *ttmp = t_at(u.ux, u.uy);
/* no auto-pick if no-pick move, nothing there, or in a pool */
if (autopickup && (flags.nopick || !OBJ_AT(u.ux, u.uy) ||
(is_pool(u.ux, u.uy) && !Underwater) || is_lava(u.ux, u.uy))) {
@@ -411,7 +412,18 @@ int what; /* should be a long */
read_engr_at(u.ux, u.uy);
return (0);
}
if (ttmp && ttmp->tseen) {
/* Allow pickup from holes and trap doors that you escaped
* from because that stuff is teetering on the edge just
* like you, but not pits, because there is an elevation
* discrepancy with stuff in pits.
*/
if ((ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT) &&
(!u.utrap || (u.utrap && u.utraptype != TT_PIT))) {
read_engr_at(u.ux, u.uy);
return(0);
}
}
/* multi && !flags.run means they are in the middle of some other
* action, or possibly paralyzed, sleeping, etc.... and they just
* teleported onto the object. They shouldn't pick it up.