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:
PatR
2016-01-31 18:22:31 -08:00
parent 5774804524
commit 54325de339
4 changed files with 37 additions and 12 deletions
+5
View File
@@ -139,6 +139,11 @@ monsters fleeing up the upstairs on level 1 were supposed to escape the
monster hitting fire-dealing monster with weapon triggered passive damage to
weapon every time, when hero doing so only had 1/6 chance per hit
hitting steam vortex with flammable weapon would damage the weapon with fire
if a non-cursed spellbook being read becomes cursed and hero recognizes that
(bknown is set), interrupt reading
if a non-cursed spellbook being read becomes cursed and hero doesn't notice,
don't leave it flagged as in-use (hence to be deleted during the
next save/restore cycle) if contact-poison cursed book effect occurs
Platform- and/or Interface-Specific Fixes