MCPcopy Index your code
hub / github.com/NetHack/NetHack / the_unique_obj

Function the_unique_obj

src/objnam.c:1105–1117  ·  view source on GitHub ↗

used for naming "the unique_item" instead of "a unique_item" */

Source from the content-addressed store, hash-verified

1103
1104/* used for naming "the unique_item" instead of "a unique_item" */
1105boolean
1106the_unique_obj(struct obj *obj)
1107{
1108 boolean known = (obj->known || iflags.override_ID);
1109
1110 if (!obj->dknown && !iflags.override_ID)
1111 return FALSE;
1112 else if (obj->otyp == FAKE_AMULET_OF_YENDOR && !known)
1113 return TRUE; /* lie */
1114 else
1115 return (boolean) (objects[obj->otyp].oc_unique
1116 && (known || obj->otyp == AMULET_OF_YENDOR));
1117}
1118
1119/* should monster type be prefixed with "the"? (mostly used for corpses) */
1120boolean

Callers 4

artifact_scoreFunction · 0.85
doname_baseFunction · 0.85
killer_xnameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected