From: Pasi Kallinen Date: Fri, 11 Feb 2022 18:05:04 +0000 (+0200) Subject: Give a sound message when thrown item lands in water or lava X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ce3e08d00031dbe21c0ae97f06993490a8feb80;p=nethack Give a sound message when thrown item lands in water or lava --- diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index e4384ccff..8b31320bc 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/dothrow.c b/src/dothrow.c index 9225fcaa0..f4b5aaead 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -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;