]> granicus.if.org Git - nethack/commitdiff
You_hear already checks deafness
authorPasi Kallinen <paxed@alt.org>
Fri, 6 Mar 2015 19:01:02 +0000 (21:01 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 17 Mar 2015 16:47:16 +0000 (18:47 +0200)
src/dig.c
src/lock.c
src/mon.c
src/music.c
src/pray.c
src/trap.c
src/zap.c

index 39791dde07e495147113cb334d0837e1c56a65a4..1c053ec734f40b1663bd8cad77b5d49f9da06873 100644 (file)
--- a/src/dig.c
+++ b/src/dig.c
@@ -1245,7 +1245,7 @@ register struct monst *mtmp;
 
        if (IS_WALL(here->typ)) {
            /* KMH -- Okay on arboreal levels (room walls are still stone) */
-           if (!Deaf && flags.verbose && !rn2(5))
+           if (flags.verbose && !rn2(5))
                You_hear("crashing rock.");
            if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE))
                add_damage(mtmp->mx, mtmp->my, 0L);
index 67a11a5452075c27342b6188cda5efd737bd5cc3..91e0f07288407a0196e624f792232f867aac3bd3 100644 (file)
@@ -888,7 +888,7 @@ int x, y;
                    else if (flags.verbose) {
                        if (cansee(x,y))
                            pline("KABOOM!!  You see a door explode.");
-                       else if (!Deaf)
+                       else
                            You_hear("a distant explosion.");
                    }
                    door->doormask = D_NODOOR;
@@ -901,7 +901,7 @@ int x, y;
                if (flags.verbose) {
                    if (cansee(x,y))
                        pline_The("door crashes open!");
-                   else if (!Deaf)
+                   else
                        You_hear("a crashing sound.");
                }
                unblock_point(x,y);
index 82457199a3b27b60f1e31a659a4a41b4bfa012ea..49f6282dceeb5eb9095b17aa48e75f311bc251e5 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -638,7 +638,7 @@ meatmetal(mtmp)
                    if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
                        pline("%s eats %s!", Monnam(mtmp),
                                distant_name(otmp,doname));
-                   else if (!Deaf && flags.verbose)
+                   else if (flags.verbose)
                        You_hear("a crunching sound.");
                    mtmp->meating = otmp->owt/2 + 1;
                    /* Heal up to the object's weight in hp */
@@ -758,7 +758,7 @@ meatobj(mtmp)               /* for gelatinous cubes */
                if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
                    pline("%s eats %s!", Monnam(mtmp),
                            distant_name(otmp, doname));
-               else if (!Deaf && flags.verbose)
+               else if (flags.verbose)
                    You_hear("a slurping sound.");
                /* Heal up to the object's weight in hp */
                if (mtmp->mhp < mtmp->mhpmax) {
@@ -803,7 +803,7 @@ meatobj(mtmp)               /* for gelatinous cubes */
        if (ecount > 0) {
            if (cansee(mtmp->mx, mtmp->my) && flags.verbose && buf[0])
                pline1(buf);
-           else if (!Deaf && flags.verbose)
+           else if (flags.verbose)
                You_hear("%s slurping sound%s.",
                        ecount == 1 ? "a" : "several",
                        ecount == 1 ? "" : "s");
@@ -1642,7 +1642,7 @@ boolean was_swallowed;                    /* digestion */
                                s_suffix(mdat->mname));
                        losehp(Maybe_Half_Phys(tmp), killer.name, KILLED_BY_AN);
                    } else {
-                       if (!Deaf) You_hear("an explosion.");
+                       You_hear("an explosion.");
                        magr->mhp -= tmp;
                        if (magr->mhp < 1) mondied(magr);
                        if (magr->mhp < 1) { /* maybe lifesaved */
@@ -3106,7 +3106,7 @@ register boolean silent;
                        else if(!Blind)
                                You_see("%sangry guard%s approaching!",
                                  sct == 1 ? "an " : "", sct > 1 ? "s" : "");
-               } else if(!Deaf)
+               } else
                        You_hear("the shrill sound of a guard's whistle.");
            }
            return(TRUE);
index 94f6282d142e7276f40cdc62fe717c6d80971d2d..0912d78cc245b7cd49e13e1603cc522c21d3c5b5 100644 (file)
@@ -334,7 +334,7 @@ do_pit:                 chasm = maketrap(x,y,PIT);
                            if (!m_already_trapped) { /* suppress messages */
                                if(cansee(x,y))
                                    pline("%s falls into a chasm!", Monnam(mtmp));
-                               else if (!Deaf && humanoid(mtmp->data))
+                               else if (humanoid(mtmp->data))
                                    You_hear("a scream!");
                            }
                            /* Falling is okay for falling down
index a91782c722614b079fc2d7a017b9414a3e2a254d..d2b24c00a8474c158f4e47b4a73af57b64a674a7 100644 (file)
@@ -1386,8 +1386,7 @@ verbalize("In return for thy service, I grant thee the gift of Immortality!");
 
     if (otmp->otyp == FAKE_AMULET_OF_YENDOR) {
            if (!highaltar && !otmp->known) goto too_soon;
-           if (!Deaf)
-               You_hear("a nearby thunderclap.");
+           You_hear("a nearby thunderclap.");
            if (!otmp->known) {
                You("realize you have made a %s.",
                    Hallucination ? "boo-boo" : "mistake");
index 7efe8db0048b813f776a083a6952de62cc9a1e36..911aafdc5762bb1ae600608ccf5a4e4ad5037de3 100644 (file)
@@ -2062,10 +2062,9 @@ register struct monst *mtmp;
                                pline("%s stops momentarily and appears to cringe.",
                                        Monnam(mtmp));
                            }
-                       } else if (!Deaf) {
+                       } else
                           You_hear("a distant %s squeak.",
                                trapnote(trap,1));
-                       }
                        /* wake up nearby monsters */
                        wake_nearto(mtmp->mx, mtmp->my, 40);
                        break;
@@ -2080,9 +2079,8 @@ register struct monst *mtmp;
                                      Monnam(mtmp), a_your[trap->madeby_u]);
                                seetrap(trap);
                            } else {
-                               if((mptr == &mons[PM_OWLBEAR]
+                               if(mptr == &mons[PM_OWLBEAR]
                                    || mptr == &mons[PM_BUGBEAR])
-                                  && !Deaf)
                                    You_hear("the roaring of an angry bear!");
                            }
                        } else if (force_mintrap) {
@@ -2923,9 +2921,8 @@ domagictrap()
                if (!Blind) Your1(vision_clears);
          } else if (!Blind) {
                You_see("a flash of light!");
-         } else if (!Deaf) {
+         } else
                You_hear("a deafening roar!");
-         }
          incr_itimeout(&HDeaf, rn1(20,30));
          while(cnt--)
                (void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS);
index 95b9760a39c9ea3283b45a46b6826deba26710ff..38b8831151d0e01f5703cc97017c3153f2ddd0e7 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -1790,7 +1790,7 @@ struct obj *obj, *otmp;
                if (obj->otyp == BOULDER) {
                        if (cansee(obj->ox, obj->oy))
                                pline_The("boulder falls apart.");
-                       else if (!Deaf)
+                       else
                                You_hear("a crumbling sound.");
                        fracture_rock(obj);
                }
@@ -1801,9 +1801,8 @@ struct obj *obj, *otmp;
                                pline_The("%s shatters.", rndmonnam());
                            else 
                                pline_The("statue shatters.");
-                       } else if (!Deaf) {
+                       } else
                            You_hear("a crumbling sound.");
-                       }
                    }
                } else {
                    if (context.mon_moving ?
@@ -3025,7 +3024,7 @@ struct obj **pobj;                        /* object tossed/used, set to NULL
                        if (!Blind) pline("%s %s%s.", Yname2(obj),
                                          otense(obj, "skip"),
                                          skipcount ? " again" : "");
-                       else if (!Deaf) You_hear("%s skip.", yname(obj));
+                       else You_hear("%s skip.", yname(obj));
                        skipcount++;
                } else if (skiprange_start > skiprange_end + 1) {
                        --skiprange_start;
@@ -4047,7 +4046,7 @@ short exploding_wand_typ;
                        else
                            Norep("The water freezes.");
                        newsym(x,y);
-                   } else if(!Deaf && !lava)
+                   } else if(!lava)
                        You_hear("a crackling sound.");
 
                    if (x == u.ux && y == u.uy) {
@@ -4214,9 +4213,8 @@ short exploding_wand_typ;
                        newsym(x, y);
                    } else if (sense_txt) {
                        You1(sense_txt);
-                   } else if (hear_txt) {
-                       if (!Deaf) You_hear1(hear_txt);
-                   }
+                   } else if (hear_txt)
+                       You_hear1(hear_txt);
                    if (picking_at(x, y)) {
                        stop_occupation();
                        reset_pick();