`spestudied' manipulation again (trunk only)
Refine last week's change dealing with polymorphing spellbooks: when a spellbook has faded to blank after multiple readings, randomize its spestudied value so that it doesn't always polymorph into another blank book on the first subsequent transformation attempt.
This commit is contained in:
@@ -356,6 +356,8 @@ learn()
|
||||
if (book->spestudied > MAX_SPELL_STUDY) {
|
||||
pline("This spellbook is too faint to be read any more.");
|
||||
book->otyp = booktype = SPE_BLANK_PAPER;
|
||||
/* reset spestudied as if polymorph had taken place */
|
||||
book->spestudied = rn2(book->spestudied);
|
||||
} else if (spellknow(i) <= 1000) {
|
||||
Your("knowledge of %s is keener.", splname);
|
||||
incrnknow(i);
|
||||
@@ -376,6 +378,8 @@ learn()
|
||||
/* pre-used due to being the product of polymorph */
|
||||
pline("This spellbook is too faint to read even once.");
|
||||
book->otyp = booktype = SPE_BLANK_PAPER;
|
||||
/* reset spestudied as if polymorph had taken place */
|
||||
book->spestudied = rn2(book->spestudied);
|
||||
} else {
|
||||
spl_book[i].sp_id = booktype;
|
||||
spl_book[i].sp_lev = objects[booktype].oc_level;
|
||||
|
||||
Reference in New Issue
Block a user