diff -uwr nethack-linux/include/extern.h nethack-acid-C343-179/include/extern.h --- nethack-linux/include/extern.h 2008-05-26 19:47:02.000000000 +0200 +++ nethack-acid-C343-179/include/extern.h 2008-12-28 22:10:02.000000000 +0100 @@ -2016,7 +2016,7 @@ E void FDECL(fill_pit, (int,int)); E int FDECL(float_down, (long, long)); E int FDECL(fire_damage, (struct obj *,BOOLEAN_P,BOOLEAN_P,XCHAR_P,XCHAR_P)); -E void FDECL(water_damage, (struct obj *,BOOLEAN_P,BOOLEAN_P)); +E boolean FDECL(water_damage, (struct obj *,BOOLEAN_P,BOOLEAN_P)); E boolean NDECL(drown); E void FDECL(drain_en, (int)); E int NDECL(dountrap); diff -uwr nethack-linux/src/do.c nethack-acid-C343-179/src/do.c --- nethack-linux/src/do.c 2008-05-26 19:47:02.000000000 +0200 +++ nethack-acid-C343-179/src/do.c 2008-12-28 22:10:02.000000000 +0100 @@ -208,7 +208,7 @@ map_background(x, y, 0); newsym(x, y); } - water_damage(obj, FALSE, FALSE); + return water_damage(obj, FALSE, FALSE); } else if (u.ux == x && u.uy == y && (!u.utrap || u.utraptype != TT_PIT) && (t = t_at(x,y)) != 0 && t->tseen && diff -uwr nethack-linux/src/trap.c nethack-acid-C343-179/src/trap.c --- nethack-linux/src/trap.c 2008-05-26 19:47:02.000000000 +0200 +++ nethack-acid-C343-179/src/trap.c 2008-12-28 23:08:03.000000000 +0100 @@ -2678,12 +2678,15 @@ return retval; } -void +/* returns TRUE if obj is destroyed */ +boolean water_damage(obj, force, here) register struct obj *obj; register boolean force, here; { struct obj *otmp; + struct obj *obj_original = obj; + boolean obj_destroyed = FALSE; /* Scrolls, spellbooks, potions, weapons and pieces of armor may get affected by the water */ @@ -2724,6 +2727,7 @@ /* damage player/monster? */ pline("A potion explodes!"); delobj(obj); + obj_destroyed = (obj == obj_original); continue; } else if (obj->odiluted) { obj->otyp = POT_WATER; @@ -2740,7 +2744,9 @@ (uarmc->cursed && !rn2(3))) obj->oeroded++; } + obj_destroyed = FALSE; } + return obj_destroyed; } /*