the sounds of mistreated pets */
| 424 | |
| 425 | /* the sounds of mistreated pets */ |
| 426 | void |
| 427 | yelp(struct monst *mtmp) |
| 428 | { |
| 429 | const char *yelp_verb = 0; |
| 430 | enum sound_effect_entries se = se_yelp; |
| 431 | |
| 432 | if (helpless(mtmp) || !mtmp->data->msound) |
| 433 | return; |
| 434 | |
| 435 | /* presumably nearness and soundok checks have already been made */ |
| 436 | if (Hallucination) |
| 437 | yelp_verb = ROLL_FROM(h_sounds); |
| 438 | else |
| 439 | switch (mtmp->data->msound) { |
| 440 | case MS_MEW: |
| 441 | se = se_feline_yelp; |
| 442 | yelp_verb = (!Deaf) ? "yowl" : "arch"; |
| 443 | break; |
| 444 | case MS_BARK: |
| 445 | case MS_GROWL: |
| 446 | se = se_canine_yelp; |
| 447 | yelp_verb = (!Deaf) ? "yelp" : "recoil"; |
| 448 | break; |
| 449 | case MS_ROAR: |
| 450 | yelp_verb = (!Deaf) ? "snarl" : "bluff"; |
| 451 | break; |
| 452 | case MS_SQEEK: |
| 453 | se = se_squeal; |
| 454 | yelp_verb = (!Deaf) ? "squeal" : "quiver"; |
| 455 | break; |
| 456 | case MS_SQAWK: |
| 457 | se = se_avian_screak; |
| 458 | yelp_verb = (!Deaf) ? "screak" : "thrash"; |
| 459 | break; |
| 460 | case MS_WAIL: |
| 461 | se = se_wail; |
| 462 | yelp_verb = (!Deaf) ? "wail" : "cringe"; |
| 463 | break; |
| 464 | } |
| 465 | if (yelp_verb) { |
| 466 | Soundeffect(se, 70); /* Soundeffect() handles Deaf or not Deaf */ |
| 467 | pline("%s %s!", Monnam(mtmp), vtense((char *) 0, yelp_verb)); |
| 468 | if (svc.context.run) |
| 469 | nomul(0); |
| 470 | wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 12); |
| 471 | } |
| 472 | #ifndef SND_LIB_INTEGRATED |
| 473 | nhUse(se); |
| 474 | #endif |
| 475 | } |
| 476 | |
| 477 | /* the sounds of distressed pets */ |
| 478 | void |
no test coverage detected