the sounds of distressed pets */
| 476 | |
| 477 | /* the sounds of distressed pets */ |
| 478 | void |
| 479 | whimper(struct monst *mtmp) |
| 480 | { |
| 481 | const char *whimper_verb = 0; |
| 482 | enum sound_effect_entries se = se_canine_whine; |
| 483 | if (helpless(mtmp) || !mtmp->data->msound) |
| 484 | return; |
| 485 | |
| 486 | /* presumably nearness and soundok checks have already been made */ |
| 487 | if (Hallucination) |
| 488 | whimper_verb = ROLL_FROM(h_sounds); |
| 489 | else |
| 490 | switch (mtmp->data->msound) { |
| 491 | case MS_MEW: |
| 492 | case MS_GROWL: |
| 493 | whimper_verb = "whimper"; |
| 494 | break; |
| 495 | case MS_BARK: |
| 496 | whimper_verb = "whine"; |
| 497 | break; |
| 498 | case MS_SQEEK: |
| 499 | se = se_squeal; |
| 500 | whimper_verb = "squeal"; |
| 501 | break; |
| 502 | } |
| 503 | if (whimper_verb) { |
| 504 | if (!Hallucination) { |
| 505 | Soundeffect(se, 50); |
| 506 | } |
| 507 | pline("%s %s.", Monnam(mtmp), vtense((char *) 0, whimper_verb)); |
| 508 | if (svc.context.run) |
| 509 | nomul(0); |
| 510 | wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 6); |
| 511 | } |
| 512 | #ifndef SND_LIB_INTEGRATED |
| 513 | nhUse(se); |
| 514 | #endif |
| 515 | } |
| 516 | |
| 517 | /* pet makes "I'm hungry" noises */ |
| 518 | void |
no test coverage detected