book of the dead fixes

After writing the log message for the bell change, I decided to
test the Book and found some issues:
1) reading it while blind discovered the book's type but wasn't
   marking the book object as if it had become seen (dknown);
2) reading it while blind gave sighted feedback if it was cursed;
3) reading (blind or not) when either of the other two invocation
   tools are cursed referred to those as "artifacts" even though
   they aren't artifacts; the discoveries list describes them as
   "unique items" but that makes for a clumsy message--use "relics"
   instead.
This commit is contained in:
PatR
2020-07-01 07:35:44 -07:00
parent b2789979e5
commit 2760dc3f16
2 changed files with 20 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.235 $ $NHDT-Date: 1593611274 2020/07/01 13:47:54 $
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.236 $ $NHDT-Date: 1593614134 2020/07/01 14:35:34 $
General Fixes and Modified Features
-----------------------------------
@@ -201,6 +201,13 @@ report "<Mon> expires" rather than "<Mon> dies" if polymorphed hero kills a
non-living monster (golem, vortex) with life drain (vampire bite)
allow hero in silver-hating form to ring the silver bell but only if on/over
the vibrating square
reading the Book of the Dead while blind is allowed; doing so gives
"you turn the pages of the Book of the Dead" and the type of item
becomes discovered, but the object wasn't being flagged as 'dknown'
so if not seen yet it remained "a spellbook" in hero's inventory
reading cursed Book of the Dead while blind gave feedback for sighted hero
reading non-cursed Book of the Dead without having prepped the other tools
referred to those as "artifacts" even though they aren't; use "relics"
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 spell.c $NHDT-Date: 1581322667 2020/02/10 08:17:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.102 $ */
/* NetHack 3.6 spell.c $NHDT-Date: 1593614134 2020/07/01 14:35:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.106 $ */
/* Copyright (c) M. Stephenson 1988 */
/* NetHack may be freely redistributed. See license for details. */
@@ -201,7 +201,8 @@ struct obj *spellbook;
return gone;
}
/* special effects for The Book of the Dead */
/* special effects for The Book of the Dead; reading it while blind is
allowed so that needs to be taken into account too */
static void
deadbook(book2)
struct obj *book2;
@@ -211,6 +212,7 @@ struct obj *book2;
You("turn the pages of the Book of the Dead...");
makeknown(SPE_BOOK_OF_THE_DEAD);
book2->dknown = 1; /* in case blind now and hasn't been seen yet */
/* KMH -- Need ->known to avoid "_a_ Book of the Dead" */
book2->known = 1;
if (invocation_pos(u.ux, u.uy) && !On_stairs(u.ux, u.uy)) {
@@ -219,7 +221,9 @@ struct obj *book2;
arti_cursed = FALSE;
if (book2->cursed) {
pline_The("runes appear scrambled. You can't read them!");
pline_The("%s!",
Blind ? "Book seems to be ignoring you"
: "runes appear scrambled. You can't read them");
return;
}
@@ -251,7 +255,9 @@ struct obj *book2;
if (arti_cursed) {
pline_The("invocation fails!");
pline("At least one of your artifacts is cursed...");
/* this used to say "your artifacts" but the invocation tools
are not artifacts */
pline("At least one of your relics is cursed...");
} else if (arti1_primed && arti2_primed) {
unsigned soon =
(unsigned) d(2, 6); /* time til next intervene() */
@@ -265,7 +271,7 @@ struct obj *book2;
u.uevent.udemigod = 1; /* wizdead() */
if (!u.udg_cnt || u.udg_cnt > soon)
u.udg_cnt = soon;
} else { /* at least one artifact not prepared properly */
} else { /* at least one relic not prepared properly */
You("have a feeling that %s is amiss...", something);
goto raise_dead;
}
@@ -274,7 +280,7 @@ struct obj *book2;
/* when not an invocation situation */
if (book2->cursed) {
raise_dead:
raise_dead:
You("raised the dead!");
/* first maybe place a dangerous adversary */