fix bz16 - book becoming cursed while being read
Attempting to read a cursed spellbook fails with a nasty effect. But a non-cursed book can become cursed while being read (malignant aura after Wizard has been killed). Assuming no interruption for other reasons, the read would finish, the spell be learned, and then the nasty effect would be given. This changes things so that if the book being read becomes cursed and the hero notices (book's bknown flag is set), the read-in-progress will be interrupted. Resuming will take the attempting-to-read-a-cursed-book path. Unfortunately, if the hero doesn't notice, the old behavior still applies. Maybe the new behavior should happen even if bknown isn't set (but then player won't be told why the interruption occurred).
This commit is contained in:
@@ -2197,6 +2197,7 @@ E boolean FDECL(load_special, (const char *));
|
||||
|
||||
/* ### spell.c ### */
|
||||
|
||||
E void FDECL(book_cursed, (struct obj *));
|
||||
#ifdef USE_TRAMPOLI
|
||||
E int NDECL(learn);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user