You_hear already checks deafness

This commit is contained in:
Pasi Kallinen
2015-03-06 21:01:02 +02:00
parent 7d8d8ad1f5
commit 7fa05c6311
7 changed files with 19 additions and 25 deletions

View File

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

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

View File

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

View 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

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

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

View File

@@ -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();