| 555 | } |
| 556 | |
| 557 | void |
| 558 | priest_talk(struct monst *priest) |
| 559 | { |
| 560 | boolean coaligned = p_coaligned(priest); |
| 561 | boolean strayed = (u.ualign.record < 0); |
| 562 | unsigned *cheapskate = NULL; |
| 563 | if (EPRI(priest)) cheapskate = &EPRI(priest)->cheapskate_count; |
| 564 | |
| 565 | /* |
| 566 | * Note: we won't be called if hero is Deaf [since dochat() will |
| 567 | * return before calling domonnoise()], so we don't need to check |
| 568 | * for that before the various calls to verbalize() here. |
| 569 | */ |
| 570 | |
| 571 | /* KMH, conduct */ |
| 572 | if (!u.uconduct.gnostic++) |
| 573 | livelog_printf(LL_CONDUCT, |
| 574 | "rejected atheism by consulting with %s", |
| 575 | mon_nam(priest)); |
| 576 | |
| 577 | if (priest->mflee || (!priest->ispriest && coaligned && strayed)) { |
| 578 | pline("%s doesn't want anything to do with you!", Monnam(priest)); |
| 579 | priest->mpeaceful = 0; |
| 580 | return; |
| 581 | } |
| 582 | |
| 583 | /* priests don't chat unless peaceful and in their own temple */ |
| 584 | if (!inhistemple(priest) || !priest->mpeaceful || helpless(priest)) { |
| 585 | static const char *const cranky_msg[3] = { |
| 586 | "Thou wouldst have words, eh? I'll give thee a word or two!", |
| 587 | "Talk? Here is what I have to say!", |
| 588 | "Pilgrim, I would speak no longer with thee." |
| 589 | }; |
| 590 | |
| 591 | if (helpless(priest)) { |
| 592 | pline("%s breaks out of %s reverie!", Monnam(priest), |
| 593 | mhis(priest)); |
| 594 | priest->mfrozen = priest->msleeping = 0; |
| 595 | priest->mcanmove = 1; |
| 596 | } |
| 597 | priest->mpeaceful = 0; |
| 598 | SetVoice(priest, 0, 80, 0); |
| 599 | verbalize1(cranky_msg[rn2(3)]); |
| 600 | return; |
| 601 | } |
| 602 | |
| 603 | /* you desecrated the temple and now you want to chat? */ |
| 604 | if (priest->mpeaceful && *in_rooms(priest->mx, priest->my, TEMPLE) |
| 605 | && !has_shrine(priest)) { |
| 606 | SetVoice(priest, 0, 80, 0); |
| 607 | verbalize( |
| 608 | "Begone! Thou desecratest this holy place with thy presence."); |
| 609 | priest->mpeaceful = 0; |
| 610 | return; |
| 611 | } |
| 612 | if (!money_cnt(gi.invent)) { |
| 613 | if (coaligned && !strayed) { |
| 614 | long pmoney = money_cnt(priest->minvent); |
no test coverage detected