Files
nethack/doc
PatR 25c27cd4cf fix #H6338 - naming mimicked potion
Player tried to #name a potion on the floor and got prompted to call a
stream of fluid (sink feedback) instead of a potion.  A mimic posing
as an object is represented by a partially initialized object when
examining its map location.  #name for floor object uses the same data
as look_at.

obj->fromsink overloads obj->corpsenm which is set to NON_PM (-1) even
when creating a non-init'd object.  'fromsink' was only being forced to
0 when creating an init'd object (unlike leash which has its overload
of corpsenm set properly regardless of caller's request to init).  So
docall() treated a mimicked potion as a sink stream.

The fix is straightforward but has pointed out another bug which is
harder to fix.  Examining a floor object next to you sets that obj's
dknown flag as if you had seen it up close (a new feature in 3.6.0).
But a mimicked item is discarded as soon as it's been looked at, so
looking again from a non-adjacent spot will give different feedback
since the previously set dknown will be unset when replaced by a new
fake object.  So you can use '/' and ';' to recognize mimics without
provoking them into motion.  Best fix:  mimicking an object should use
a fully initialized one which is tracked via monst->mextra, but that
will break save file compatibility.  Possible hack:  change monst->
mappearance into a mask which uses N bits for object type (instead of
full 'int') and one of the other bits to track obj->dknown.  Examining
an adjacent object probably ought to set bknown for priests, so bknown
and blessed/uncursed/cursed would need to be tracked too.
2017-10-28 01:18:25 -07:00
..
2015-03-31 09:50:02 -04:00
2015-02-26 16:35:55 -05:00
2016-05-22 00:00:06 +03:00
2015-05-25 09:21:31 +09:00
2002-01-05 21:05:47 +00:00
2015-05-25 09:21:31 +09:00
2002-01-05 21:05:47 +00:00
2002-01-11 18:02:22 +00:00
2015-05-25 09:21:31 +09:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2003-05-11 13:40:01 +00:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2017-10-28 01:18:25 -07:00
2016-02-22 17:57:00 -08:00
2002-01-05 21:05:47 +00:00
2015-05-25 09:21:31 +09:00
2010-05-01 23:10:22 +00:00
2015-12-08 15:15:00 -08:00
2015-12-08 15:15:00 -08:00
2017-09-26 10:04:25 +03:00