pet makes "I'm hungry" noises */
| 516 | |
| 517 | /* pet makes "I'm hungry" noises */ |
| 518 | void |
| 519 | beg(struct monst *mtmp) |
| 520 | { |
| 521 | if (helpless(mtmp) |
| 522 | || !(carnivorous(mtmp->data) || herbivorous(mtmp->data))) |
| 523 | return; |
| 524 | |
| 525 | /* presumably nearness and soundok checks have already been made */ |
| 526 | if (!is_silent(mtmp->data) && mtmp->data->msound <= MS_ANIMAL) { |
| 527 | (void) domonnoise(mtmp); |
| 528 | } else if (mtmp->data->msound >= MS_HUMANOID) { |
| 529 | if (!canspotmon(mtmp)) |
| 530 | map_invisible(mtmp->mx, mtmp->my); |
| 531 | SetVoice(mtmp, 0, 80, 0); |
| 532 | verbalize("I'm hungry."); |
| 533 | } else { |
| 534 | /* this is pretty lame but is better than leaving out the block |
| 535 | of speech types between animal and humanoid; this covers |
| 536 | MS_SILENT too (if caller lets that get this far) since it's |
| 537 | excluded by the first two cases */ |
| 538 | if (canspotmon(mtmp)) |
| 539 | pline("%s seems famished.", Monnam(mtmp)); |
| 540 | /* looking famished will be a good trick for a tame skeleton... */ |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | /* hero has attacked a peaceful monster within 'mon's view */ |
| 545 | const char * |
no test coverage detected