Monsters should growl even if you can't hear it
Call growl even if you are deaf, because growling also wakes up nearby monsters. Just make growl not show the message if you can't hear or see the monster.
This commit is contained in:
10
src/mon.c
10
src/mon.c
@@ -3509,11 +3509,11 @@ setmangry(struct monst* mtmp, boolean via_attack)
|
||||
adjalign(2);
|
||||
} else
|
||||
adjalign(-1); /* attacking peaceful monsters is bad */
|
||||
if (couldsee(mtmp->mx, mtmp->my)) {
|
||||
if (humanoid(mtmp->data) || mtmp->isshk || mtmp->isgd)
|
||||
if (humanoid(mtmp->data) || mtmp->isshk || mtmp->isgd) {
|
||||
if (couldsee(mtmp->mx, mtmp->my))
|
||||
pline("%s gets angry!", Monnam(mtmp));
|
||||
else if (flags.verbose && !Deaf)
|
||||
growl(mtmp);
|
||||
} else {
|
||||
growl(mtmp);
|
||||
}
|
||||
|
||||
/* attacking your own quest leader will anger his or her guardians */
|
||||
@@ -3613,7 +3613,7 @@ setmangry(struct monst* mtmp, boolean via_attack)
|
||||
} else if (mon->data->mlet == mtmp->data->mlet
|
||||
&& big_little_match(mndx, monsndx(mon->data))
|
||||
&& !rn2(3)) {
|
||||
if (!Deaf && !rn2(4)) {
|
||||
if (!rn2(4)) {
|
||||
growl(mon);
|
||||
exclaimed = (iflags.last_msg == PLNMSG_GROWL);
|
||||
}
|
||||
|
||||
12
src/sounds.c
12
src/sounds.c
@@ -348,7 +348,7 @@ growl(register struct monst* mtmp)
|
||||
{
|
||||
register const char *growl_verb = 0;
|
||||
|
||||
if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
|
||||
if (mtmp->msleeping || !mtmp->mcanmove || mtmp->data->msound == MS_SILENT)
|
||||
return;
|
||||
|
||||
/* presumably nearness and soundok checks have already been made */
|
||||
@@ -357,10 +357,12 @@ growl(register struct monst* mtmp)
|
||||
else
|
||||
growl_verb = growl_sound(mtmp);
|
||||
if (growl_verb) {
|
||||
pline("%s %s!", Monnam(mtmp), vtense((char *) 0, growl_verb));
|
||||
iflags.last_msg = PLNMSG_GROWL;
|
||||
if (g.context.run)
|
||||
nomul(0);
|
||||
if (canseemon(mtmp) || !Deaf) {
|
||||
pline("%s %s!", Monnam(mtmp), vtense((char *) 0, growl_verb));
|
||||
iflags.last_msg = PLNMSG_GROWL;
|
||||
if (g.context.run)
|
||||
nomul(0);
|
||||
}
|
||||
wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 18);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user