MCPcopy Create free account
hub / github.com/NetHack/NetHack / growl

Function growl

src/sounds.c:401–423  ·  view source on GitHub ↗

the sounds of a seriously abused pet, including player attacking it */

Source from the content-addressed store, hash-verified

399
400/* the sounds of a seriously abused pet, including player attacking it */
401void
402growl(struct monst *mtmp)
403{
404 const char *growl_verb = 0;
405
406 if (helpless(mtmp) || mtmp->data->msound == MS_SILENT)
407 return;
408
409 /* presumably nearness and soundok checks have already been made */
410 if (Hallucination)
411 growl_verb = ROLL_FROM(h_sounds);
412 else
413 growl_verb = growl_sound(mtmp);
414 if (growl_verb) {
415 if (canseemon(mtmp) || !Deaf) {
416 pline("%s %s!", Monnam(mtmp), vtense((char *) 0, growl_verb));
417 iflags.last_msg = PLNMSG_GROWL;
418 if (svc.context.run)
419 nomul(0);
420 }
421 wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 18);
422 }
423}
424
425/* the sounds of mistreated pets */
426void

Callers 7

abuse_dogFunction · 0.85
peacefuls_respondFunction · 0.85
setmangryFunction · 0.85
wakeupFunction · 0.85
check_leashFunction · 0.85
shopdigFunction · 0.85
pay_for_damageFunction · 0.85

Calls 7

growl_soundFunction · 0.85
canseemonFunction · 0.85
MonnamFunction · 0.85
vtenseFunction · 0.85
nomulFunction · 0.85
wake_neartoFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected