]> granicus.if.org Git - nethack/commitdiff
more precise dipping prompt (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 21 Jun 2007 01:32:41 +0000 (01:32 +0000)
committernethack.rankin <nethack.rankin>
Thu, 21 Jun 2007 01:32:41 +0000 (01:32 +0000)
     Someone in the newsgroup accidentally dipped the wrong item into a
fountain and wants the second prompt to be "Dip <obj> into the fountain?"
instead of just "Dip _it_ into the fountain?", hoping that he would have
noticed that he had selected the wrong object.  I think he's fooling
himself there, but this gives a brief object name for fountain, pool, and
potion prompts.

doc/fixes35.0
src/potion.c

index 3763fd1d3b6d9e4fbef4e7f930d46514f7354fe6..b99fba3657a771b094883885d975c11e97327c10 100644 (file)
@@ -360,6 +360,7 @@ add `#vanquished' debug mode command
 C and #name commands are now same and use menu to choose monster vs object
 hallucination provides partial protection against gaze attacks
 attempting to read "dull" spellbook might cause hero to fall asleep
+dipping prompt is more precise
 
 
 Platform- and/or Interface-Specific New Features
index 932046cfb372927f6ea92996f798a94b604117a6..9c701ddc1d54967f48a9164a882cb2c646117c89 100644 (file)
@@ -1699,17 +1699,19 @@ dodip()
                return(0);
        if (inaccessible_equipment(obj, "dip", FALSE)) return 0;
 
+       Sprintf(qbuf, "dip %s into", thesimpleoname(obj));
        here = levl[u.ux][u.uy].typ;
        /* Is there a fountain to dip into here? */
        if (IS_FOUNTAIN(here)) {
-               if(yn("Dip it into the fountain?") == 'y') {
+               Strcat(qbuf, " the fountain?");
+               if (yn(upstart(qbuf)) == 'y') {
                        dipfountain(obj);
                        return(1);
                }
        } else if (is_pool(u.ux,u.uy)) {
                tmp = waterbody_name(u.ux,u.uy);
-               Sprintf(qbuf, "Dip it into the %s?", tmp);
-               if (yn(qbuf) == 'y') {
+               Sprintf(eos(qbuf), " the %s?", tmp);
+               if (yn(upstart(qbuf)) == 'y') {
                    if (Levitation) {
                        floating_above(tmp);
 #ifdef STEED
@@ -1726,8 +1728,8 @@ dodip()
                }
        }
 
-       if(!(potion = getobj(beverages, "dip into")))
-               return(0);
+       potion = getobj(beverages, qbuf);       /* "dip into" */
+       if (!potion) return 0;
        if (potion == obj && potion->quan == 1L) {
                pline("That is a potion bottle, not a Klein bottle!");
                return 0;