fix #H4047 - dipping inconsistency

Dip the scroll labeled LEP GEX VEN ZEA into the fountain?
Your scroll called light fades.

The first prompt deliberately avoided 'called', 'named', and other
attributes to keep it short, but the discrepancy here is blatant, so
increase the verbosity in order to have the reminder that's included
in the prompt be the same as object name in the followup message.

Bonus fix, noticed while testing it:  water_damage() was reporting
the "{blank,unlabeled} scroll fades" even though blank scrolls are
already as faded as they can get.  Likewise for blank spellbook.
This commit is contained in:
PatR
2015-12-12 19:41:35 -08:00
parent 637f4a4bd6
commit 807afa22b3
3 changed files with 20 additions and 10 deletions

View File

@@ -19,6 +19,9 @@ unlike in previous versions, an uncursed scroll of enchant armor failed to
uncurse the piece of armor being enchanted (change was unintentional)
slice of {pizza,cake,&} pluralized as "slouse of ..." due to false match
with "lice" (discovered pre-3.6.0-release)
change dipping prompt to not ignore 'called' and 'named' attributes of item
to be dipped
avoid 'the unlabeled {scroll,spellbook} fades' when blank item is hit by water
Platform- and/or Interface-Specific Fixes

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 potion.c $NHDT-Date: 1446861768 2015/11/07 02:02:48 $ $NHDT-Branch: master $:$NHDT-Revision: 1.121 $ */
/* NetHack 3.6 potion.c $NHDT-Date: 1449977945 2015/12/13 03:39:05 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.122 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1759,6 +1759,7 @@ dodip()
char allowall[2];
short mixture;
char qbuf[QBUFSZ], qtoo[QBUFSZ];
const char *shortestname; /* last resort obj name for prompt */
allowall[0] = ALL_CLASSES;
allowall[1] = '\0';
@@ -1767,13 +1768,13 @@ dodip()
if (inaccessible_equipment(obj, "dip", FALSE))
return 0;
Sprintf(qbuf, "dip %s into", thesimpleoname(obj));
shortestname = is_plural(obj) ? "them" : "it";
here = levl[u.ux][u.uy].typ;
/* Is there a fountain to dip into here? */
if (IS_FOUNTAIN(here)) {
/* "Dip <the object> into the fountain?" */
Sprintf(qtoo, "%s the fountain?", qbuf);
if (yn(upstart(qtoo)) == 'y') {
if (yn(safe_qbuf(qbuf, "Dip ", " into the fountain?", obj,
doname, thesimpleoname, shortestname)) == 'y') {
dipfountain(obj);
return 1;
}
@@ -1781,8 +1782,9 @@ dodip()
const char *pooltype = waterbody_name(u.ux, u.uy);
/* "Dip <the object> into the {pool, moat, &c}?" */
Sprintf(qtoo, "%s the %s?", qbuf, pooltype);
if (yn(upstart(qtoo)) == 'y') {
Sprintf(qtoo, " into the %s?", pooltype);
if (yn(safe_qbuf(qbuf, "Dip ", qtoo, obj,
doname, thesimpleoname, shortestname)) == 'y') {
if (Levitation) {
floating_above(pooltype);
} else if (u.usteed && !is_swimmer(u.usteed->data)
@@ -1799,6 +1801,9 @@ dodip()
}
/* "What do you want to dip <the object> into?" */
Strcpy(qbuf, safe_qbuf(qtoo, "What do you want to dip ", " into?", obj,
doname, thesimpleoname, shortestname)
+ sizeof "What do you want to " - sizeof "");
potion = getobj(beverages, qbuf); /* "dip into" */
if (!potion)
return 0;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 trap.c $NHDT-Date: 1448492213 2015/11/25 22:56:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.249 $ */
/* NetHack 3.6 trap.c $NHDT-Date: 1449977947 2015/12/13 03:39:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.250 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -3345,10 +3345,11 @@ boolean force;
*/
return ER_NOTHING;
} else if (obj->oclass == SCROLL_CLASS) {
if (obj->otyp == SCR_BLANK_PAPER
#ifdef MAIL
if (obj->otyp == SCR_MAIL)
return 0;
|| obj->otyp == SCR_MAIL
#endif
) return 0;
if (carried(obj))
pline("Your %s %s.", ostr, vtense(ostr, "fade"));
@@ -3362,8 +3363,9 @@ boolean force;
if (obj->otyp == SPE_BOOK_OF_THE_DEAD) {
pline("Steam rises from %s.", the(xname(obj)));
return 0;
} else if (obj->otyp == SPE_BLANK_PAPER) {
return 0;
}
if (carried(obj))
pline("Your %s %s.", ostr, vtense(ostr, "fade"));