]> granicus.if.org Git - nethack/commitdiff
buglist: splashing
authornethack.allison <nethack.allison>
Fri, 10 Oct 2003 15:53:27 +0000 (15:53 +0000)
committernethack.allison <nethack.allison>
Fri, 10 Oct 2003 15:53:27 +0000 (15:53 +0000)
> Not all objects say "Splash!" when they fall in the
> water. When levitating/flying and dropping things they
> don't, but when polymorphing and forced to drop items
> they do. [<email deleted>]

when floating over the water, things dropped always
make some sort of sound. Also fix up some messages
when Underwater that previously said things like
"feel what is lying on the water" by adjusting
surface() in that situation to return "bottom."

While looking into this, I noticed that if you
are polymorphed into a Flyer and you then polymorph
back into your normal form, you don't end up in
the water until you move, so this attempts to
correct that too.

doc/fixes34.3
src/do.c
src/engrave.c
src/polyself.c

index 78061640ffcfb5a8b4b0ed3e9bc93b5e103fe477..5ac1d09972bfea840422ab7aa1c86989c0f790e8 100644 (file)
@@ -42,6 +42,8 @@ couldn't insert gold into a container using full menu style if no other
        objects in inventory unless compiling with GOLDOBJ
 nagas eat
 always have warriors on the Valkyrie quest be female
+be more consistent with sounds when dropping into water
+surface() returns "bottom" when Underwater
 
 
 Platform- and/or Interface-Specific Fixes
index 49ef8cada6c31d8725c42dc6209da56d42147180..4e06a45bb0110d9a0dc533a57abc2aea16ce1559 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -183,10 +183,17 @@ const char *verb;
                return fire_damage(obj, FALSE, FALSE, x, y);
        } else if (is_pool(x, y)) {
                /* Reasonably bulky objects (arbitrary) splash when dropped.
+                * If you're floating above the water even small things make noise.
                 * Stuff dropped near fountains always misses */
-               if (Blind && !Deaf && ((x == u.ux) && (y == u.uy)) &&
-                   weight(obj) > 9) {
-                   pline("Splash!");
+               if ((Blind || (Levitation || Flying)) && !Deaf &&
+                   ((x == u.ux) && (y == u.uy))) {
+                   if (!Underwater) {
+                       if (weight(obj) > 9) {
+                               pline("Splash!");
+                       } else if (Levitation || Flying) {
+                               pline("Plop!");
+                       }
+                   }
                    map_background(x, y, 0);
                    newsym(x, y);
                }
index 9221974047d20733bca7876aa1eb75faa1bcfdc3..058e2c504a2e7609db41a023fe84efb958b9a732 100644 (file)
@@ -153,7 +153,7 @@ register int x, y;
        else if (IS_AIR(lev->typ) && Is_airlevel(&u.uz))
            return "air";
        else if (is_pool(x,y))
-           return "water";
+           return (Underwater && !Is_waterlevel(&u.uz)) ? "bottom" : "water";
        else if (is_ice(x,y))
            return "ice";
        else if (is_lava(x,y))
index d5c55c0d5551c46752cca0f3b30f9d92313a331d..3952f8125bfaec8c43f329a7764aa1bb98f38f93 100644 (file)
@@ -234,6 +234,7 @@ boolean forcecontrol;
                                uarm->otyp <= YELLOW_DRAGON_SCALES);
        boolean iswere = (u.ulycn >= LOW_PM || is_were(youmonst.data));
        boolean isvamp = (youmonst.data->mlet == S_VAMPIRE || u.umonnum == PM_VAMPIRE_BAT);
+       boolean was_floating = (Levitation || Flying);
 
         if(!Polymorph_control && !forcecontrol && !draconian && !iswere && !isvamp) {
            if (rn2(20) > ACURR(A_CON)) {
@@ -323,6 +324,9 @@ boolean forcecontrol;
                new_light_source(u.ux, u.uy, new_light,
                                 LS_MONSTER, (genericptr_t)&youmonst);
        }
+       if (is_pool(u.ux,u.uy) && was_floating && !(Levitation || Flying) &&
+               !breathless(youmonst.data) && !amphibious(youmonst.data) &&
+               !Swimming) drown();
 }
 
 /* (try to) make a mntmp monster out of the player */