diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 131a26118..217bc3d5f 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1367,6 +1367,9 @@ the number of items destroyed by elemental effects is based on the damage randomize the spellbook in the second level of vlad's tower monsters weren't randomly generating if exactly one square was outside LOS, and it contained a monster +when a spellbook was polymorphed into a novel and then incrementing spestudied + field turned it into a blank spellbook, the novel's title would stick: + "{spellbook of blank paper|plain spellbook} named " Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/zap.c b/src/zap.c index 94b0a960f..3609c3a8a 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1789,9 +1789,12 @@ poly_obj(struct obj *obj, int id) case SPBOOK_CLASS: while (otmp->otyp == SPE_POLYMORPH) - otmp->otyp = rnd_class(SPE_DIG, SPE_BLANK_PAPER); - /* reduce spellbook abuse; non-blank books degrade */ - if (otmp->otyp != SPE_BLANK_PAPER) { + otmp->otyp = rnd_class(gb.bases[SPBOOK_CLASS], SPE_BLANK_PAPER); + /* reduce spellbook abuse; non-blank books degrade; + 3.7: novels don't use spestudied so shouldn't degrade to blank + (but don't force spestudied to zero for them since a non-zero + value could get passed along to a future polymorph) */ + if (otmp->otyp != SPE_BLANK_PAPER && otmp->otyp != SPE_NOVEL) { otmp->spestudied = obj->spestudied + 1; if (otmp->spestudied > MAX_SPELL_STUDY) { otmp->otyp = SPE_BLANK_PAPER;