]> granicus.if.org Git - nethack/commitdiff
Juiblex' frozen "moat"
authorcohrs <cohrs>
Fri, 26 Mar 2004 18:20:49 +0000 (18:20 +0000)
committercohrs <cohrs>
Fri, 26 Mar 2004 18:20:49 +0000 (18:20 +0000)
<Someone> reported that freezing the swamp on Juiblex' level would result
in message about a frozen moat.  Avoid this by using waterbody_name
to to determine if it's a moat or not.

doc/fixes35.0
src/zap.c

index d50051fd113a4400d4e0edf1e541ebcbeb470171..50b83f873117850456a9c6faaf538e8f634ded81 100644 (file)
@@ -59,6 +59,7 @@ try to restrict whistles and musical instruments to monsters that can blow
 thrown potions can sometimes hit a steed's saddle
 sync default documentation of "null" option with the code
 tripping over a cockatrice corpse didn't petrify, even when not wearing boots
+do not call swamps on the Juiblex level "moat" when freezing
 
 
 Platform- and/or Interface-Specific Fixes
index 7e160bd081794aa9c22b1bd75ee60ee61ad9ecae..e6f884bbdb53a5772e760769f70ca1529e31faa7 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -3645,10 +3645,7 @@ boolean *shopdamage;
        }
        else if(abstype == ZT_COLD && (is_pool(x,y) || is_lava(x,y))) {
                boolean lava = is_lava(x,y);
-               boolean moat = (!lava && (lev->typ != POOL) &&
-                               (lev->typ != WATER) &&
-                               !Is_medusa_level(&u.uz) &&
-                               !Is_waterlevel(&u.uz));
+               const char *moat = waterbody_name(x, y);
 
                if (lev->typ == WATER) {
                    /* For now, don't let WATER freeze. */
@@ -3670,12 +3667,12 @@ boolean *shopdamage;
                    }
                    bury_objs(x,y);
                    if(cansee(x,y)) {
-                       if(moat)
-                               Norep("The moat is bridged with ice!");
-                       else if(lava)
-                               Norep("The lava cools and solidifies.");
+                       if(lava)
+                           Norep("The lava cools and solidifies.");
+                       else if(strcmp(moat, "moat") == 0)
+                           Norep("The %s is bridged with ice!", moat);
                        else
-                               Norep("The water freezes.");
+                           Norep("The water freezes.");
                        newsym(x,y);
                    } else if(!Deaf && !lava)
                        You_hear("a crackling sound.");