diff --git a/src/spell.c b/src/spell.c index 4b509c61c..312ca4475 100644 --- a/src/spell.c +++ b/src/spell.c @@ -393,10 +393,7 @@ learn(VOID_ARGS) book->otyp = booktype = SPE_BLANK_PAPER; /* reset spestudied as if polymorph had taken place */ book->spestudied = rn2(book->spestudied); - } else if (spellknow(i) > KEEN / 10) { - You("know %s quite well already.", splname); - costly = FALSE; - } else { /* spellknow(i) <= KEEN/10 */ + } else { Your("knowledge of %s is %s.", splname, spellknow(i) ? "keener" : "restored"); incrnknow(i, 1); @@ -443,7 +440,7 @@ int study_book(spellbook) register struct obj *spellbook; { - int booktype = spellbook->otyp; + int booktype = spellbook->otyp, i; boolean confused = (Confusion != 0); boolean too_hard = FALSE; @@ -529,6 +526,16 @@ register struct obj *spellbook; return 0; } + /* check to see if we already know it and want to refresh our memory */ + for (i = 0; i < MAXSPELL; i++) + if (spellid(i) == booktype || spellid(i) == NO_SPELL) + break; + if (spellid(i) == booktype && spellknow(i) > KEEN / 10) { + You("know \"%s\" quite well already.", OBJ_NAME(objects[booktype])); + if (yn("Refresh your memory anyway?") == 'n') + return 0; + } + /* Books are often wiser than their readers (Rus.) */ spellbook->in_use = TRUE; if (!spellbook->blessed && spellbook->otyp != SPE_BOOK_OF_THE_DEAD) {