]> granicus.if.org Git - nethack/commitdiff
B14008 splash when dropping things in pools
authorcohrs <cohrs>
Sun, 27 Oct 2002 16:13:17 +0000 (16:13 +0000)
committercohrs <cohrs>
Sun, 27 Oct 2002 16:13:17 +0000 (16:13 +0000)
Added code to flooreffects() to implement this suggestion from <Someone>.
It kicks in while blind, only affects objects of some bulk, and also only
things dropped at your location.  The map_background currently doesn't
do anything since the dropped object is remembered on top, but this will
avoid a bug if we ever add invisible objects.

src/do.c

index 72a14043ead906813a2762ab089a0ee6146c0e17..d0de64dac80060f185e333e178e587c14a7f5021 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -197,6 +197,14 @@ const char *verb;
        } else if (is_lava(x, y)) {
                return fire_damage(obj, FALSE, FALSE, x, y);
        } else if (is_pool(x, y)) {
+               /* Reasonably bulky objects (arbitrary) splash when dropped.
+                * Stuff dropped near fountains always misses */
+               if (Blind && flags.soundok && ((x == u.ux) && (y == u.uy)) &&
+                   weight(obj) > 9) {
+                   pline("Splash!");
+                   map_background(x, y, 0);
+                   newsym(x, y);
+               }
                water_damage(obj, FALSE, FALSE);
        }
        return FALSE;