From a618b5ed030437cd006bab4c2736862628821e79 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Wed, 6 Mar 2002 00:22:37 +0000 Subject: [PATCH] 's potion of polymorph suggestion > Should a potion of polymorph autoidentify if the item dipped into it > polymorphs into (as far as you know) the same item? It just seemed > odd, choosing "Z - a wand of light" to dip into a potion, to get > "Z - a wand of light" returned, and the potion identified. > > (Ideally, I'd like to see it be "Nothing seems to happen.", as for > a failed-this-time unicorn horn.) --- src/potion.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/potion.c b/src/potion.c index e035954e8..f82c390c5 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)potion.c 3.4 2002/02/07 */ +/* SCCS Id: @(#)potion.c 3.4 2002/03/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1606,6 +1606,7 @@ dodip() pline(nothing_happens); } else { boolean was_wep = FALSE, was_swapwep = FALSE, was_quiver = FALSE; + short save_otyp = obj->otyp; /* KMH, conduct */ u.uconduct.polypiles++; @@ -1619,9 +1620,14 @@ dodip() else if (was_swapwep) setuswapwep(obj); else if (was_quiver) setuqwep(obj); - makeknown(POT_POLYMORPH); - useup(potion); - prinv((char *)0, obj, 0L); + if (obj->otyp != save_otyp) { + makeknown(POT_POLYMORPH); + useup(potion); + prinv((char *)0, obj, 0L); + } else { + pline("Nothing seems to happen."); + useup(potion); + } } return(1); } else if(obj->oclass == POTION_CLASS && obj->otyp != potion->otyp) {