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.]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user