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

Function zombify_mon

src/do.c:2298–2315  ·  view source on GitHub ↗

Timeout callback. Revive the corpse as a zombie. */

Source from the content-addressed store, hash-verified

2296
2297/* Timeout callback. Revive the corpse as a zombie. */
2298void
2299zombify_mon(anything *arg, long timeout)
2300{
2301 struct obj *body = arg->a_obj;
2302 int zmon = zombie_form(&mons[body->corpsenm]);
2303
2304 if (zmon != NON_PM && !(svm.mvitals[zmon].mvflags & G_GENOD)) {
2305 if (has_omid(body))
2306 free_omid(body);
2307 if (has_omonst(body))
2308 free_omonst(body);
2309
2310 set_corpsenm(body, zmon);
2311 revive_mon(arg, timeout);
2312 } else {
2313 rot_corpse(arg, timeout);
2314 }
2315}
2316
2317/* return TRUE if hero properties are dangerous to hero */
2318staticfn boolean

Callers

nothing calls this directly

Calls 6

zombie_formFunction · 0.85
set_corpsenmFunction · 0.85
revive_monFunction · 0.85
rot_corpseFunction · 0.85
free_omidFunction · 0.70
free_omonstFunction · 0.70

Tested by

no test coverage detected