After modifications to amnesia, `deja vu' messages are now displayed upon entering a level containing bones of a previous character of the current player. This test is done simply by checking for a ghost on the level that shares a name with the current character. However, since ghosts generated in other circumstances (such as in the Valley of the Dead and other special levels) can have names pulled randomly from the high score list, etc, this message can be displayed on non-bones levels where a ghost has been generated with the character's name. Additionally, when a bones pile doesn't include a ghost (such as when the character in question was slimed, killed by a wraith, etc), the `deja vu' message will not be displayed when it should be. This is all described in in NetHack/NetHack#322. This commit changes the method of testing for `familiarity' by adding a function to iterate through any bones data for the current level, searching for a match to the hero's name. Should fix NetHack/NetHack#322.
117 KiB
117 KiB