Files
nethack/include
PatR bbba8b82d2 fix issue #1062 - monster hiding messages
Reported by Umbire:  if a statue of a hider-under was activated by
a statue trap, it would hide underneath its own statue.  Also, the
hero saw a snake hide under unseen submerged kelp.

Both of those things were exposed by new "you see <monster> hide"
message rather than caused by it.  It also led to the [re-]discovery
that an existing monster hiding under a statue that was a not-yet-
triggered trap prevented the trap from producing a monster.

This redoes yesterday's can't-hide-under-statue change:  hiders can
hide under statues again, but they can't hide under anything at trap
locations.  [Pits containing one or more objects are an exception,
although it seems silly that a hero is prevented from falling into
one by the presence of a tiny creepy-crawly hiding under a ring or
dart in there.]  So, hider-underers won't be able to interfere with
statue traps by being present at the trap location.  [Trappers and
lurkers-above probably need a similar restriction; I didn't look.
They avoid trap spots rather than get lured to such by objects.]

It also prevents newly created hider-underers from becoming hidden
as part of the their creation (except when that creation is part
of level creation) whether their creation uses up an object (statue
activation, egg hatching) or there are simply other items present.
That will prevent statue of a hider producing a monster that hides
under the activated statue (which was happening due to the sequence
create monster, transfer any statue contents to monster inventory,
destroy statue).

The can't-hide-under-statues code has been repurposed to prevent
hiding under gold pieces unless there are at least 10 (arbitrary
threshold) of those or they're in a pile with some other object(s).

Sea monsters hide in water regardless of the presence of objects.
Prevent other swimmers from hiding under objects at water locations.
Such creatures don't have gills and shouldn't be able to stay
submerged in hiding for an arbitrary length of time.  [No exception
is made for non-breathers.  The overlap between swimmers and hider-
underers is limited to small snakes, even though it is feasible for
a creature wearing an amulet of magical breathing to polymorph into
one.  Heros don't spend enough time underwater to worry about snakes
hiding under kelp or thrown junk.]

Lastly, alter the "suddenly, you notice a <monster>" message if
monster-vs-monster activity causes one you've just seen going into
hiding comes back out again without any intervening messages.  [I'm
not sure whether something similar is needed for the "Wait.  There's
something there" message in the you-vs-monster case.]

Fixes #1062
2023-06-16 21:19:43 -07:00
..
2022-02-04 11:01:20 -05:00
2022-03-13 13:58:56 -07:00
2022-11-29 21:53:21 -05:00
2022-07-19 21:23:26 +03:00
2022-07-19 21:23:26 +03:00
2022-11-29 21:53:21 -05:00
2023-04-22 16:10:37 -07:00
2023-05-22 20:50:35 -04:00
2023-03-04 11:02:06 +02:00
2022-06-30 23:48:18 -04:00
2023-03-01 14:00:29 +02:00
2023-03-16 22:27:01 -04:00
2021-01-26 21:06:16 -05:00
2023-06-04 00:22:14 -07:00
2023-05-04 06:02:23 -07:00
2023-05-22 14:43:01 -07:00
2023-06-14 15:54:04 -07:00
2022-07-01 08:36:03 -04:00
2022-03-11 07:33:28 -05:00
2022-06-19 02:30:45 -07:00
2022-11-29 21:53:21 -05:00
2022-11-29 21:53:21 -05:00
2023-02-25 07:02:19 -08:00
2023-06-09 16:09:26 -07:00
2023-04-22 11:13:53 -04:00
2023-06-14 15:54:04 -07:00
2023-06-14 15:54:04 -07:00
2023-04-29 02:18:29 -07:00
2023-04-22 11:13:53 -04:00
2022-10-26 14:21:23 -04:00
2022-10-26 14:21:23 -04:00
2022-10-26 14:21:23 -04:00
2022-10-26 14:21:23 -04:00
2023-06-12 15:07:34 -07:00
2023-02-28 16:15:56 -05:00
2022-07-23 23:11:13 -07:00
2023-02-25 18:05:09 +02:00
2022-11-29 21:53:21 -05:00
2022-12-10 12:27:18 -05:00
2020-08-12 16:15:28 -07:00
2022-10-26 14:21:23 -04:00
2022-12-06 00:49:52 -08:00
2022-11-29 21:53:21 -05:00
2023-05-25 15:35:49 -07:00
2022-06-30 23:48:18 -04:00
2022-10-26 14:21:23 -04:00
2022-10-26 14:21:23 -04:00
2023-05-08 15:21:03 -07:00