#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

View File

@@ -195,6 +195,19 @@ const char *verb;
newsym(x, y);
}
water_damage(obj, FALSE, FALSE);
} else if (u.ux == x && u.uy == y &&
(!u.utrap || u.utrap && u.utraptype != TT_PIT) &&
(t = t_at(x,y)) != 0 && t->tseen &&
(t->ttyp==PIT || t->ttyp==SPIKED_PIT)) {
static const char * const the_your[2] = { "the", "your" };
/* you escaped a pit and are standing on the precipice */
if (Blind && flags.soundok)
You_hear("%s %s downwards.",
The(xname(obj)), otense(obj, "tumble"));
else
pline("%s %s into %s pit.",
The(xname(obj)), otense(obj, "tumble"),
the_your[t->madeby_u]);
}
return FALSE;
}