dull spellbook (trunk only)
Something else <Someone> forwarded from the newsgroup long time ago: attempting to read a dull spellbook ought to have a chance of making the hero fall asleep.
This commit is contained in:
@@ -345,6 +345,7 @@ some monsters will use fire to prevent selves being turned into green slime
|
||||
add `#vanquished' debug mode command
|
||||
C and #name commands are now same and use menu to choose monster vs object
|
||||
hallucination provides partial protection against gaze attacks
|
||||
attempting to read "dull" spellbook might cause hero to fall asleep
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
23
src/spell.c
23
src/spell.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)spell.c 3.5 2006/12/06 */
|
||||
/* SCCS Id: @(#)spell.c 3.5 2007/05/29 */
|
||||
/* Copyright (c) M. Stephenson 1988 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -427,6 +427,27 @@ register struct obj *spellbook;
|
||||
register boolean confused = (Confusion != 0);
|
||||
boolean too_hard = FALSE;
|
||||
|
||||
/* attempting to read dull book may make hero fall asleep */
|
||||
if (!confused && booktype != SPE_BLANK_PAPER &&
|
||||
!strcmp(OBJ_DESCR(objects[booktype]), "dull")) {
|
||||
const char *eyes;
|
||||
int dullbook = rnd(25) - ACURR(A_WIS);
|
||||
|
||||
/* adjust chance if hero stayed awake, got interrupted, retries */
|
||||
if (context.spbook.delay && spellbook == context.spbook.book)
|
||||
dullbook -= rnd(objects[booktype].oc_level);
|
||||
|
||||
if (dullbook > 0) {
|
||||
eyes = body_part(EYE);
|
||||
if (eyecount(youmonst.data) > 1) eyes = makeplural(eyes);
|
||||
pline("This book is so dull that you can't keep your %s open.",
|
||||
eyes);
|
||||
dullbook += rnd(2 * objects[booktype].oc_level);
|
||||
fall_asleep(-dullbook, TRUE);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (context.spbook.delay && !confused && spellbook == context.spbook.book &&
|
||||
/* handle the sequence: start reading, get interrupted,
|
||||
have context.spbook.book become erased somehow, resume reading it */
|
||||
|
||||
Reference in New Issue
Block a user