From: PatR Date: Thu, 23 Apr 2020 23:54:51 +0000 (-0700) Subject: fix issue #319 - whip can fetch underwater items X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff483694af2cc02c49602656e4af542e68a1df82;p=nethack fix issue #319 - whip can fetch underwater items Applying a bullwhip down while levitating or riding gives a chance to pick up items from the unreachable floor. Doing so over water yields "you wrap your bullwhip around on the water" when that item is actually on the bottom. Same for lava. Don't fetch items from beneath the surface. Also, for the lava case subject the whip to fire damage. This has actually broken the seal on a can of worms. Every item at a water location sinks to the bottom even if it should float. I'm not opening that can.... Fixes #319 --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index a92f238bc..570f79a17 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -158,6 +158,8 @@ monster or object detection found semi-dead vault guard at <0,0> while squadprob[] in mkroom.c was defined with 5 elements but initialized only 4 resulting in giant ants sometimes allow nurses heal attack when wielding a non-weapon/weaptool +if riding or levitating, hero could apply bullwhip downward to pull up things + from underwater or lava; feedback implied the item was on the surface Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/apply.c b/src/apply.c index 57671fa7b..45c2c7b54 100644 --- a/src/apply.c +++ b/src/apply.c @@ -2668,6 +2668,12 @@ struct obj *obj; kick_steed(); return 1; } + if (is_pool_or_lava(u.ux, u.uy)) { + You("cause a small splash."); + if (is_lava(u.ux, u.uy)) + (void) fire_damage(uwep, FALSE, u.ux, u.uy); + return 1; + } if (Levitation || u.usteed) { /* Have a shot at snaring something on the floor */ otmp = g.level.objects[u.ux][u.uy];