From 4870ee52815a2086bcccaaab88a346339f89bec1 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 22 Jun 2020 18:19:11 -0700 Subject: [PATCH] failing to read a novel while blind Adopt the contribution to use "you can't read the words" when trying to read a novel when blind rather than defaulting to spellbooks' "you can't read the mystic runes." An unseen novel is already described as "a book" instead of "a spellbook" so the alternate feedback doesn't give away any information. --- doc/fixes37.0 | 4 +++- src/read.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index c54a07214..ad76100bc 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.231 $ $NHDT-Date: 1591476281 2020/06/06 20:44:41 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.233 $ $NHDT-Date: 1592875138 2020/06/23 01:18:58 $ General Fixes and Modified Features ----------------------------------- @@ -194,6 +194,8 @@ thieving monster could be killed while hero was removing armor, triggering warning "stealarm(): dead monster stealing" when taking-off finished petrifying a long worm and then reanimating it handled tail incorrectly; with sanity_check On, X coordinate of head segment was reported as 0 +attempting to read a novel while blind reported "you can't read the mystic + runes" like for a spellbook; use "you can't read the words" for novel Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/read.c b/src/read.c index 353f9bac2..5ff54c5cb 100644 --- a/src/read.c +++ b/src/read.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 read.c $NHDT-Date: 1590343774 2020/05/24 18:09:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.197 $ */ +/* NetHack 3.6 read.c $NHDT-Date: 1592875138 2020/06/23 01:18:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.198 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -324,7 +324,11 @@ doread() } else if (Blind && (scroll->otyp != SPE_BOOK_OF_THE_DEAD)) { const char *what = 0; - if (scroll->oclass == SPBOOK_CLASS) + if (scroll->otyp == SPE_NOVEL) + /* unseen novels are already distinguishable from unseen + spellbooks so this isn't revealing any extra information */ + what = "words"; + else if (scroll->oclass == SPBOOK_CLASS) what = "mystic runes"; else if (!scroll->dknown) what = "formula on the scroll";