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 <item> 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
This commit is contained in:
PatR
2020-04-23 16:54:51 -07:00
parent 3468129f5a
commit ff483694af
2 changed files with 8 additions and 0 deletions

View File

@@ -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

View File

@@ -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];