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

Function maybe_generate_rnd_mon

src/allmain.c:161–168  ·  view source on GitHub ↗

small chance of generating a new random monster */

Source from the content-addressed store, hash-verified

159
160/* small chance of generating a new random monster */
161staticfn void
162maybe_generate_rnd_mon(void)
163{
164 if (!rn2(u.uevent.udemigod ? 25
165 : (depth(&u.uz) > depth(&stronghold_level)) ? 50
166 : 70))
167 (void) makemon((struct permonst *) 0, 0, 0, NO_MM_FLAGS);
168}
169
170#if defined(MICRO) || defined(WIN32)
171static int mvl_abort_lev;

Callers 1

allmain.cFile · 0.85

Calls 3

rn2Function · 0.85
depthFunction · 0.85
makemonFunction · 0.85

Tested by

no test coverage detected