shared by monster probing (via query_objlist!) as well as lookat() */
| 105 | |
| 106 | /* shared by monster probing (via query_objlist!) as well as lookat() */ |
| 107 | char * |
| 108 | self_lookat(char *outbuf) |
| 109 | { |
| 110 | char race[QBUFSZ], trapbuf[QBUFSZ]; |
| 111 | |
| 112 | /* include race with role unless polymorphed */ |
| 113 | race[0] = '\0'; |
| 114 | if (!Upolyd) |
| 115 | Sprintf(race, "%s ", gu.urace.adj); |
| 116 | Sprintf(outbuf, "%s%s%s called %s", |
| 117 | /* being blinded may hide invisibility from self */ |
| 118 | (Invis && (senseself() || !Blind)) ? "invisible " : "", race, |
| 119 | pmname(&mons[u.umonnum], Ugender), svp.plname); |
| 120 | if (u.usteed) |
| 121 | Sprintf(eos(outbuf), ", mounted on %s", y_monnam(u.usteed)); |
| 122 | if (u.uundetected || (Upolyd && U_AP_TYPE) |
| 123 | || visible_region_at(u.ux, u.uy)) |
| 124 | mhidden_description(&gy.youmonst, |
| 125 | MHID_PREFIX | MHID_ARTICLE | MHID_REGION, |
| 126 | eos(outbuf)); |
| 127 | if (Punished) |
| 128 | Sprintf(eos(outbuf), ", chained to %s", |
| 129 | uball ? ansimpleoname(uball) : "nothing?"); |
| 130 | if (u.utrap) /* bear trap, pit, web, in-floor, in-lava, tethered */ |
| 131 | Sprintf(eos(outbuf), ", %s", trap_predicament(trapbuf, 0, FALSE)); |
| 132 | return outbuf; |
| 133 | } |
| 134 | |
| 135 | /* format a description of 'mon's health for look_at_monster(), done_in_by(); |
| 136 | result isn't Healer-specific (not trained for arbitrary creatures) */ |
no test coverage detected