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:
@@ -234,7 +234,7 @@ deadbook(struct obj *book2)
|
||||
|
||||
You("turn the pages of the Book of the Dead...");
|
||||
makeknown(SPE_BOOK_OF_THE_DEAD);
|
||||
book2->dknown = 1; /* in case blind now and hasn't been seen yet */
|
||||
observe_object(book2); /* in case blind now and hasn't been seen yet */
|
||||
/* KMH -- Need ->known to avoid "_a_ Book of the Dead" */
|
||||
book2->known = 1;
|
||||
if (invocation_pos(u.ux, u.uy) && !On_stairs(u.ux, u.uy)) {
|
||||
@@ -896,8 +896,9 @@ skill_based_spellbook_id(void)
|
||||
}
|
||||
|
||||
if (objects[booktype].oc_level <= known_up_to_level)
|
||||
/* makeknown(booktype) but don't exercise Wisdom */
|
||||
discover_object(booktype, TRUE, FALSE);
|
||||
/* makeknown(booktype) but don't exercise Wisdom or mark as
|
||||
encountered */
|
||||
discover_object(booktype, TRUE, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user