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

Function mshot_xname

src/objnam.c:1089–1102  ·  view source on GitHub ↗

xname() output augmented for multishot missile feedback */

Source from the content-addressed store, hash-verified

1087
1088/* xname() output augmented for multishot missile feedback */
1089char *
1090mshot_xname(struct obj *obj)
1091{
1092 char tmpbuf[BUFSZ];
1093 char *onm = xname(obj);
1094
1095 if (gm.m_shot.n > 1 && gm.m_shot.o == obj->otyp) {
1096 /* "the Nth arrow"; value will eventually be passed to an() or
1097 The(), both of which correctly handle this "the " prefix */
1098 Sprintf(tmpbuf, "the %d%s ", gm.m_shot.i, ordin(gm.m_shot.i));
1099 onm = strprepend(onm, tmpbuf);
1100 }
1101 return onm;
1102}
1103
1104/* used for naming "the unique_item" instead of "a unique_item" */
1105boolean

Callers 5

hmon_hitmon_do_hitFunction · 0.85
hmon_hitmon_msg_hitFunction · 0.85
tmissFunction · 0.85
thituFunction · 0.85
mthrowu.cFile · 0.85

Calls 3

xnameFunction · 0.85
ordinFunction · 0.85
strprependFunction · 0.85

Tested by

no test coverage detected