From d18027e5706261bebdff27b2065893d2742b55d9 Mon Sep 17 00:00:00 2001 From: cohrs Date: Wed, 21 Aug 2002 16:43:48 +0000 Subject: [PATCH] tearing spellbooks while confused Reported to the newsgroup, the code in study_book for the effect of confusion on studying a book was never reached. The study_book code didn't completely handle continuing to read a book when you got confused after getting interrupted. --- src/spell.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spell.c b/src/spell.c index c30cc75bc..baa5b5abc 100644 --- a/src/spell.c +++ b/src/spell.c @@ -350,7 +350,7 @@ register struct obj *spellbook; register boolean confused = (Confusion != 0); boolean too_hard = FALSE; - if (delay && spellbook == book && + if (delay && !confused && spellbook == book && /* handle the sequence: start reading, get interrupted, have book become erased somehow, resume reading it */ booktype != SPE_BLANK_PAPER) { @@ -398,7 +398,8 @@ register struct obj *spellbook; - 2*objects[booktype].oc_level + ((ublindf && ublindf->otyp == LENSES) ? 2 : 0); /* only wizards know if a spell is too difficult */ - if (Role_if(PM_WIZARD) && read_ability < 20) { + if (Role_if(PM_WIZARD) && read_ability < 20 && + !confused) { char qbuf[QBUFSZ]; Sprintf(qbuf, "This spellbook is %sdifficult to comprehend. Continue?",