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

Function the_unique_pm

src/objnam.c:1120–1140  ·  view source on GitHub ↗

should monster type be prefixed with "the"? (mostly used for corpses) */

Source from the content-addressed store, hash-verified

1118
1119/* should monster type be prefixed with "the"? (mostly used for corpses) */
1120boolean
1121the_unique_pm(struct permonst *ptr)
1122{
1123 boolean uniq;
1124
1125 /* even though monsters with personal names are unique, we want to
1126 describe them as "Name" rather than "the Name" */
1127 if (type_is_pname(ptr))
1128 return FALSE;
1129
1130 uniq = (ptr->geno & G_UNIQ) ? TRUE : FALSE;
1131 /* high priest is unique if it includes "of <deity>", otherwise not
1132 (caller needs to handle the 1st possibility; we assume the 2nd);
1133 worm tail should be irrelevant but is included for completeness */
1134 if (ptr == &mons[PM_HIGH_CLERIC] || ptr == &mons[PM_LONG_WORM_TAIL])
1135 uniq = FALSE;
1136 /* Wizard no longer needs this; he's flagged as unique these days */
1137 if (ptr == &mons[PM_WIZARD_OF_YENDOR])
1138 uniq = TRUE;
1139 return uniq;
1140}
1141
1142staticfn void
1143add_erosion_words(struct obj *obj, char *prefix)

Callers 9

end.cFile · 0.85
death_inflicted_byFunction · 0.85
xname_flagsFunction · 0.85
corpse_xnameFunction · 0.85
polyselfFunction · 0.85
consume_tinFunction · 0.85
eatcorpseFunction · 0.85
shk_yourFunction · 0.85
init_CapMonsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected