]> granicus.if.org Git - nethack/commitdiff
fireproof containers catching fire in lava
authorcohrs <cohrs>
Sun, 24 Sep 2006 23:58:39 +0000 (23:58 +0000)
committercohrs <cohrs>
Sun, 24 Sep 2006 23:58:39 +0000 (23:58 +0000)
Recently reported to the list, a fireproof container dropped in lava would
catch fire and burn.  Add the missing check; this looks an oversight when
the idea of fireproof was added, since other fireproof objects get handled
later in the cascading if().

doc/fixes34.4
src/trap.c

index 58335f4fc1f0f02e18c8b1e5ba7d5f756e15c36e..381150816faa6b9f8e7bb087401a1ddcff2de944 100644 (file)
@@ -260,6 +260,7 @@ fix region timeout detection, caused strange display of stinking cloud
 try to keep migrating monsters from escaping the wizard tower
 affected monsters should always respect "Elbereth"
 try harder to keep dragged chain between ball and hero
+fireproof containers should not burn in lava
 
 
 Platform- and/or Interface-Specific Fixes
index 8813f457c17f5f80eefafb4a92701f410e8350bf..c0c15de4af826b5982db0308877d192c8de4c6f0 100644 (file)
@@ -2811,7 +2811,8 @@ xchar x, y;
                chance = 20;
                break;
            }
-           if (!force && (Luck + 5) > rn2(chance))
+           if ((!force && (Luck + 5) > rn2(chance)) ||
+               (is_flammable(obj) && obj->oerodeproof))
                continue;
            /* Container is burnt up - dump contents out */
            if (in_sight) pline("%s catches fire and burns.", Yname2(obj));