MCPcopy Create free account
hub / github.com/NetHack/NetHack / distant_monnam

Function distant_monnam

src/do_name.c:1169–1186  ·  view source on GitHub ↗

used for monster ID by the '/', ';', and 'C' commands to block remote identification of the endgame altars via their attending priests */

Source from the content-addressed store, hash-verified

1167/* used for monster ID by the '/', ';', and 'C' commands to block remote
1168 identification of the endgame altars via their attending priests */
1169char *
1170distant_monnam(
1171 struct monst *mon,
1172 int article, /* only ARTICLE_NONE and ARTICLE_THE are handled here */
1173 char *outbuf)
1174{
1175 /* high priest(ess)'s identity is concealed on the Astral Plane,
1176 unless you're adjacent (overridden for hallucination which does
1177 its own obfuscation) */
1178 if (mon->data == &mons[PM_HIGH_CLERIC] && !Hallucination
1179 && Is_astralevel(&u.uz) && !m_next2u(mon)) {
1180 Strcpy(outbuf, article == ARTICLE_THE ? "the " : "");
1181 Strcat(outbuf, mon->female ? "high priestess" : "high priest");
1182 } else {
1183 Strcpy(outbuf, x_monnam(mon, article, (char *) 0, 0, TRUE));
1184 }
1185 return outbuf;
1186}
1187
1188/* returns mon_nam(mon) relative to other_mon; normal name unless they're
1189 the same, in which case the reference is to {him|her|it} self */

Callers 2

do_mgivennameFunction · 0.85
look_at_monsterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected