Give a sound message when thrown item lands in water or lava

This commit is contained in:
Pasi Kallinen
2022-02-11 20:05:04 +02:00
parent 86cfbb7325
commit 8ce3e08d00
2 changed files with 7 additions and 0 deletions

View 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;