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

Function bare_artifactname

src/objnam.c:2501–2515  ·  view source on GitHub ↗

artifact's name without any object type or known/dknown/&c feedback */

Source from the content-addressed store, hash-verified

2499
2500/* artifact's name without any object type or known/dknown/&c feedback */
2501char *
2502bare_artifactname(struct obj *obj)
2503{
2504 char *outbuf;
2505
2506 if (obj->oartifact) {
2507 outbuf = nextobuf();
2508 Strcpy(outbuf, artiname(obj->oartifact));
2509 if (!strncmp(outbuf, "The ", 4))
2510 outbuf[0] = lowc(outbuf[0]);
2511 } else {
2512 outbuf = xname(obj);
2513 }
2514 return outbuf;
2515}
2516
2517static const char *const wrp[] = {
2518 "wand", "ring", "potion", "scroll", "gem",

Callers 12

onameFunction · 0.85
hmon_hitmon_do_hitFunction · 0.85
first_weapon_hitFunction · 0.85
killer_xnameFunction · 0.85
find_artifactFunction · 0.85
Sting_effectsFunction · 0.85
domove_fight_webFunction · 0.85
bestow_artifactFunction · 0.85
from_whatFunction · 0.85
disarm_holdingtrapFunction · 0.85
lightdamageFunction · 0.85
monfleeFunction · 0.85

Calls 4

nextobufFunction · 0.85
artinameFunction · 0.85
xnameFunction · 0.85
lowcFunction · 0.70

Tested by

no test coverage detected