diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 7558e4648..f673d44a9 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/potion.c b/src/potion.c index 7484d29d2..566eb7bfc 100644 --- a/src/potion.c +++ b/src/potion.c @@ -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 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 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 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; diff --git a/src/trap.c b/src/trap.c index b8944eea9..747f626e6 100644 --- a/src/trap.c +++ b/src/trap.c @@ -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"));