normal form would complain about missing light source if hero was
changing back from the form of a light-emitting monster [didn't affect
normal play because role monsters are invalid polymorph targets there]
+revise a 3.6.1 fix: if a spellbook which is being read becomes cursed, always
+ stop reading: "The <book> slams shut!" and set book->bknown
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
return;
}
-/* 'book' has just become cursed; if we're reading it and realize it is
- now cursed, interrupt */
+/* 'book' has just become cursed; if we're reading it, interrupt */
void
-book_cursed(struct obj* book)
+book_cursed(struct obj *book)
{
- if (g.occupation == learn && g.context.spbook.book == book
- && book->cursed && book->bknown && g.multi >= 0)
+ if (book->cursed && g.multi >= 0
+ && g.occupation == learn && g.context.spbook.book == book) {
+ pline("%s shut!", Tobjnam(book, "slam"));
+ set_bknown(book, 1);
stop_occupation();
+ }
}
DISABLE_WARNING_FORMAT_NONLITERAL