From 7a084228847d76af3af4a4b81eed1cb8534ce65d Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Tue, 17 Apr 2007 03:13:08 +0000 Subject: [PATCH] fix water handling in the #H260 lava fix The patch made a month ago to handle remaining at a lava or pool location without moving had a problem with being in pools of water. It was yielding "But you don't drown. You touch bottom." if you had magical breathing and took actions other than moves. I think it's fixed now. [New bug, or rather newly noticed old bug: slowly sinking while being stuck in lava doesn't notice if you lose fire resistance and ought to be burned up immediately. Also, fully sinking into lava doesn't appear to burn up equipment--unless it's done in the bones handling--the way that falling directly in without fire resistance does.] --- src/hack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hack.c b/src/hack.c index 2f474f5f5..cbd5bd217 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)hack.c 3.5 2007/03/12 */ +/* SCCS Id: @(#)hack.c 3.5 2007/04/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1618,7 +1618,8 @@ boolean newspot; /* true if called by spoteffects */ location while surviving the problem */ if (is_lava(u.ux, u.uy)) { if (lava_effects()) return TRUE; - } else if (!Wwalking) { + } else if (!Wwalking && + (newspot || !u.uinwater || !(Swimming || Amphibious))) { if (drown()) return TRUE; } }