| 1705 | } |
| 1706 | |
| 1707 | void |
| 1708 | notice_mon(struct monst *mtmp) |
| 1709 | { |
| 1710 | if (a11y.mon_notices && !a11y.mon_notices_blocked) { |
| 1711 | boolean spot = canspotmon(mtmp) |
| 1712 | && !(is_hider(mtmp->data) |
| 1713 | && (mtmp->mundetected |
| 1714 | || M_AP_TYPE(mtmp) == M_AP_FURNITURE |
| 1715 | || M_AP_TYPE(mtmp) == M_AP_OBJECT)); |
| 1716 | |
| 1717 | if (spot && !mtmp->mspotted && !DEADMONSTER(mtmp)) { |
| 1718 | mtmp->mspotted = TRUE; |
| 1719 | set_msg_xy(mtmp->mx, mtmp->my); |
| 1720 | You("%s %s.", canseemon(mtmp) ? "see" : "notice", |
| 1721 | x_monnam(mtmp, |
| 1722 | mtmp->mtame ? ARTICLE_YOUR |
| 1723 | : (!has_mgivenname(mtmp) |
| 1724 | && !type_is_pname(mtmp->data)) ? ARTICLE_A |
| 1725 | : ARTICLE_NONE, |
| 1726 | (mtmp->mpeaceful && !mtmp->mtame) ? "peaceful" : 0, |
| 1727 | has_mgivenname(mtmp) ? SUPPRESS_SADDLE : 0, FALSE)); |
| 1728 | } else if (!spot) { |
| 1729 | mtmp->mspotted = FALSE; |
| 1730 | } |
| 1731 | } |
| 1732 | } |
| 1733 | |
| 1734 | staticfn int QSORTCALLBACK |
| 1735 | notice_mons_cmp(const genericptr ptr1, const genericptr ptr2) |
no test coverage detected