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);
study_book(spellbook)
register struct obj *spellbook;
{
- int booktype = spellbook->otyp;
+ int booktype = spellbook->otyp, i;
boolean confused = (Confusion != 0);
boolean too_hard = FALSE;
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) {