unicorn horn dipping

Implement <Someone>'s suggestion for addressing <Someone>'s
complaint about the inadequate feedback given when dipping a unicorn
horn into a potion to convert it into water.  (Mainly, if the potion
has already been given a name, you won't be prompted to give it one
when dipping transforms it; if that was the last one you had, getting
"The potion clears." isn't sufficient to let you keep track of what
type of potion was cleared.  You still have to keep track of such
stuff yourself, but now you'll get "The swirly potion clears." so you
at least don't have to start remembering or recording the type prior
to dipping.)

     The hallucination handling isn't very useful; the description is
given will full accuracy by the immediately following inventory update.
This commit is contained in:
nethack.rankin
2002-10-02 21:33:08 +00:00
parent b541bbef1d
commit 075425a9ac
2 changed files with 21 additions and 18 deletions

View File

@@ -264,6 +264,7 @@ only include unknown gems as likely choices when applying known touchstone
prevent mbodypart() from returning animal parts for lights
removing a ring might relearn what it is after amnesia
sleeping shopkeeper shouldn't talk to digging player
give more specific feedback when dipping unicorn horns into potions
Platform- and/or Interface-Specific Fixes

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)potion.c 3.4 2002/09/08 */
/* SCCS Id: @(#)potion.c 3.4 2002/10/02 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1857,7 +1857,13 @@ dodip()
potion->in_use = FALSE; /* didn't go poof */
if ((obj->otyp == UNICORN_HORN || obj->otyp == AMETHYST) &&
(mixture = mixtype(obj, potion)) != 0) {
char oldbuf[BUFSZ], newbuf[BUFSZ];
boolean more_than_one = potion->quan > 1;
oldbuf[0] = '\0';
if (potion->dknown)
Sprintf(oldbuf, "%s ",
hcolor(OBJ_DESCR(objects[potion->otyp])));
/* with multiple merged potions, split off one and
just clear it */
if (potion->quan > 1L) {
@@ -1875,24 +1881,20 @@ dodip()
else
singlepotion->cursed = obj->cursed; /* odiluted left as-is */
singlepotion->bknown = FALSE;
if (Blind)
singlepotion->dknown = FALSE;
else {
if (mixture == POT_WATER &&
#ifdef DCC30_BUG
(singlepotion->dknown = !Hallucination,
singlepotion->dknown != 0))
#else
(singlepotion->dknown = !Hallucination) != 0)
#endif
pline_The("potion%s clears.",
more_than_one ? " that you dipped into" : "");
else
pline_The("potion%s turns %s.",
more_than_one ? " that you dipped into" : "",
hcolor(OBJ_DESCR(objects[mixture])));
if (Blind) {
singlepotion->dknown = FALSE;
} else {
singlepotion->dknown = !Hallucination;
if (mixture == POT_WATER && singlepotion->dknown)
Sprintf(newbuf, "clears");
else
Sprintf(newbuf, "turns %s",
hcolor(OBJ_DESCR(objects[mixture])));
pline_The("%spotion%s %s.", oldbuf,
more_than_one ? " that you dipped into" : "",
newbuf);
}
obj_extract_self(singlepotion);
obj_extract_self(singlepotion);
singlepotion = hold_another_object(singlepotion,
"You juggle and drop %s!",
doname(singlepotion), (const char *)0);