Accurately track which items have been discovered, even if not #named
This fixes a couple of bugs: a long-standing bug in which writing a scroll by label could fail even if you've already seen a scroll with that label (due to the game not tracking whether or not you've seen a scroll if it doesn't have a name); and a somewhat newer bug in which spellbooks auto-identified by Wizard knowledge were marked as having been encountered (rather than as known but not encountered). Breaks save file compatibility, but not bones files.
This commit is contained in:
@@ -1527,7 +1527,7 @@ typedef uint32_t mmflags_nht; /* makemon MM_ flags */
|
||||
(objects[(obj)->otyp].a_ac + (obj)->spe \
|
||||
- min((int) greatest_erosion(obj), objects[(obj)->otyp].a_ac))
|
||||
|
||||
#define makeknown(x) discover_object((x), TRUE, TRUE)
|
||||
#define makeknown(x) discover_object((x), TRUE, TRUE, TRUE)
|
||||
#define distu(xx, yy) dist2((coordxy) (xx), (coordxy) (yy), u.ux, u.uy)
|
||||
#define mdistu(mon) distu((mon)->mx, (mon)->my)
|
||||
#define onlineu(xx, yy) online2((coordxy)(xx), (coordxy)(yy), u.ux, u.uy)
|
||||
|
||||
Reference in New Issue
Block a user