wishing for "paperback book"

Something I noticed recently:  a wish request for "paperback book"
yielded "Nothing fitting that description exists in the game."
Asking for "paperback spellbook" worked though.

I'm not sure whether this is the best way to handle this particular
exception but wishing for "paperback book" now works.
This commit is contained in:
PatR
2021-07-09 19:40:52 -07:00
parent 4567457ec5
commit 2c3b9d1d2d
2 changed files with 10 additions and 2 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.586 $ $NHDT-Date: 1625838646 2021/07/09 13:50:46 $ NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.588 $ $NHDT-Date: 1625884843 2021/07/10 02:40:43 $
General Fixes and Modified Features General Fixes and Modified Features
----------------------------------- -----------------------------------
@@ -560,6 +560,8 @@ allow using rush/run prefix key in getloc to fastmove the cursor
avoid "it" in messages "Wait! There's an it hiding under <an object>!" (hero avoid "it" in messages "Wait! There's an it hiding under <an object>!" (hero
moving) and "It was hidden under <an object>!" (unseen monster moving) moving) and "It was hidden under <an object>!" (unseen monster moving)
don't extinguish burning objects when engulfed by a fire vortex don't extinguish burning objects when engulfed by a fire vortex
allow wishing for a novel via description "paperback book" (previously only
worked when specifying "paperback spellbook")
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
+7 -1
View File
@@ -1,4 +1,4 @@
/* NetHack 3.7 objnam.c $NHDT-Date: 1620348711 2021/05/07 00:51:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.315 $ */ /* NetHack 3.7 objnam.c $NHDT-Date: 1625884843 2021/07/10 02:40:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.324 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -3826,6 +3826,12 @@ readobjnam_postparse1(struct _readobjnam_data *d)
d->typ = SPE_BLANK_PAPER; d->typ = SPE_BLANK_PAPER;
return 2; /*goto typfnd;*/ return 2; /*goto typfnd;*/
} }
/* without this, player would need to specify "paperback spellbook" to
get a novel using its description */
if (!BSTRCMPI(d->bp, d->p - 14, "paperback book")) {
d->typ = SPE_NOVEL;
return 2; /*goto typfnd;*/
}
/* specific food rather than color of gem/potion/spellbook[/scales] */ /* specific food rather than color of gem/potion/spellbook[/scales] */
if (!BSTRCMPI(d->bp, d->p - 6, "orange") && d->mntmp == NON_PM) { if (!BSTRCMPI(d->bp, d->p - 6, "orange") && d->mntmp == NON_PM) {
d->typ = ORANGE; d->typ = ORANGE;