fix #H8579 - mimics mimicking shop objects
Showing the price of a shop object when examining it with '/' or ';' didn't include a price if it was actually a mimic. This makes fake objects have prices when appropriate, but it is only a partial fix because moving away from a mimic causes nethack to forget the fake object's dknown flag for most types of objects. That could be solved by adding an mobj field to mon->mextra, which will break save compatibility, or by adding a whole extra set of object glyphs for object-with-dknown-set. The latter could probably be done without breaking backwards save compatibility (new program using old files) but it seems like more effort that it'd be worth and it would break forwards save compatibility (old program attempting to use new files--something we've never claimed to support).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 do_name.c $NHDT-Date: 1549321230 2019/02/04 23:00:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.143 $ */
|
||||
/* NetHack 3.6 do_name.c $NHDT-Date: 1555627306 2019/04/18 22:41:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.145 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Pasi Kallinen, 2018. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1564,8 +1564,10 @@ namefloorobj()
|
||||
} else {
|
||||
docall(obj);
|
||||
}
|
||||
if (fakeobj)
|
||||
if (fakeobj) {
|
||||
obj->where = OBJ_FREE; /* object_from_map() sets it to OBJ_FLOOR */
|
||||
dealloc_obj(obj);
|
||||
}
|
||||
}
|
||||
|
||||
static const char *const ghostnames[] = {
|
||||
|
||||
Reference in New Issue
Block a user