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

Function cant_wield_corpse

src/wield.c:137–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137staticfn boolean
138cant_wield_corpse(struct obj *obj)
139{
140 char kbuf[BUFSZ];
141
142 if (uarmg || obj->otyp != CORPSE || !touch_petrifies(&mons[obj->corpsenm])
143 || Stone_resistance)
144 return FALSE;
145
146 /* Prevent wielding cockatrice when not wearing gloves --KAA */
147 You("wield %s in your bare %s.",
148 corpse_xname(obj, (const char *) 0, CXN_PFX_THE),
149 makeplural(body_part(HAND)));
150 Sprintf(kbuf, "wielding %s bare-handed", killer_xname(obj));
151 instapetrify(kbuf);
152 return TRUE;
153}
154
155/* description of hands when not wielding anything; also used
156 by #seeweapon (')'), #attributes (^X), and #takeoffall ('A') */

Callers 2

ready_weaponFunction · 0.85
can_twoweaponFunction · 0.85

Calls 6

YouFunction · 0.85
corpse_xnameFunction · 0.85
makepluralFunction · 0.85
body_partFunction · 0.85
killer_xnameFunction · 0.85
instapetrifyFunction · 0.85

Tested by

no test coverage detected