]> granicus.if.org Git - nethack/commitdiff
Give a sound message when thrown item lands in water or lava
authorPasi Kallinen <paxed@alt.org>
Fri, 11 Feb 2022 18:05:04 +0000 (20:05 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 11 Feb 2022 18:05:46 +0000 (20:05 +0200)
doc/fixes3-7-0.txt
src/dothrow.c

index e4384ccffdbb6171dfe2817f7b9a3bcf5108db9d..8b31320bcb1d32810e28742acbb6815efb151353 100644 (file)
@@ -775,6 +775,7 @@ Death attacking a monster does drain life attack
 add unique Rider revival messages
 don't dereference NULL u.ustuck in dobuzz() when hero has been swallowed
 monsters should growl even if you can't hear it
+give a sound effect message when thrown item lands in water or lava
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 9225fcaa0763fd20c7c9764cef7ec6a18c2f673f..f4b5aaead319e29d119f3d065b20a99c0be43320 100644 (file)
@@ -1590,6 +1590,12 @@ throwit(struct obj *obj,
             clear_thrownobj = TRUE;
             goto throwit_return;
         }
+        if (!Deaf && !Underwater) {
+            /* Some sound effects when item lands in water or lava */
+            if (is_pool(g.bhitpos.x, g.bhitpos.y)
+                || (is_lava(g.bhitpos.x, g.bhitpos.y) && !is_flammable(obj)))
+                pline((weight(obj) > 9) ? "Splash!" : "Plop!");
+        }
         if (flooreffects(obj, g.bhitpos.x, g.bhitpos.y, "fall")) {
             clear_thrownobj = TRUE;
             goto throwit_return;