fix #S14702 - travel to covered vibrating square

Targeting '~' when vibrating square has been discovered would report
"Can't find dungeon feature '~'" if it was covered by an object or a
monster.

That's normal behavior for a trap but the vibrating square is only
one of those for display purposes.
This commit is contained in:
PatR
2025-11-20 15:02:54 -08:00
parent 6466b47fc1
commit 93f8e5b3b3
4 changed files with 44 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 hack.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.477 $ */
/* NetHack 3.7 hack.c $NHDT-Date: 1763708572 2025/11/20 23:02:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.494 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2425,7 +2425,10 @@ avoid_moving_on_trap(coordxy x, coordxy y, boolean msg)
{
struct trap *trap;
if ((trap = t_at(x, y)) && trap->tseen) {
if ((trap = t_at(x, y)) && trap->tseen
/* the vibrating square is implemented as a trap but treated as if
it were a type of terrain */
&& trap->ttyp != VIBRATING_SQUARE) {
if (msg && flags.mention_walls) {
set_msg_xy(x, y);
You("stop in front of %s.",