fix #H4179 - lava vs boots

Stepping onto lava destroyed water walking boots if they weren't
fireproof but didn't do that for other types of boots unless hero
was not fire resistant and got killed by the lava.  Burn up all
non-fireproof leather boots when stepping onto lava.
This commit is contained in:
PatR
2016-01-05 16:17:38 -08:00
parent fd709d6840
commit d598cf536b
2 changed files with 8 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 trap.c $NHDT-Date: 1451176031 2015/12/27 00:27:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.252 $ */
/* NetHack 3.6 trap.c $NHDT-Date: 1452039453 2016/01/06 00:17:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.253 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -4999,13 +4999,13 @@ lava_effects()
&& objects[obj->otyp].oc_oprop != FIRE_RES
&& obj->otyp != SCR_FIRE && obj->otyp != SPE_FIREBALL
&& !obj_resists(obj, 0, 0)) /* for invocation items */
obj->in_use = TRUE;
obj->in_use = 1;
/* Check whether we should burn away boots *first* so we know whether to
* make the player sink into the lava. Assumption: water walking only
* comes from boots.
*/
if (Wwalking && uarmf && is_organic(uarmf) && !uarmf->oerodeproof) {
if (uarmf && is_organic(uarmf) && !uarmf->oerodeproof) {
obj = uarmf;
pline("%s into flame!", Yobjnam2(obj, "burst"));
iflags.in_lava_effects++; /* (see above) */
@@ -5119,6 +5119,9 @@ sink_into_lava()
You("sink below the surface and die.");
burn_away_slime(); /* add insult to injury? */
done(DISSOLVED);
/* can only get here via life-saving; try to get away from lava */
u.utrap = 0;
(void) safe_teleds(TRUE);
} else if (!u.umoved) {
/* can't fully turn into slime while in lava, but might not
have it be burned away until you've come awfully close */