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

Function maybe_sdoor

src/mklev.c:1792–1796  ·  view source on GitHub ↗

do we want a secret door/corridor? */

Source from the content-addressed store, hash-verified

1790
1791/* do we want a secret door/corridor? */
1792boolean
1793maybe_sdoor(int chance)
1794{
1795 return (depth(&u.uz) > 2) && !rn2(max(2, chance));
1796}
1797
1798/* create a door at x,y in room aroom */
1799void

Callers 2

dodoorFunction · 0.85
dig_corridorFunction · 0.85

Calls 2

depthFunction · 0.85
rn2Function · 0.85

Tested by

no test coverage detected