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

Function water_has_kelp

src/mklev.c:1431–1440  ·  view source on GitHub ↗

return TRUE if water location at (x,y) should have kelp. */

Source from the content-addressed store, hash-verified

1429
1430/* return TRUE if water location at (x,y) should have kelp. */
1431staticfn boolean
1432water_has_kelp(coordxy x, coordxy y, int kelp_pool, int kelp_moat)
1433{
1434 if ((kelp_pool && (levl[x][y].typ == POOL
1435 || (levl[x][y].typ == WATER && !Is_waterlevel(&u.uz)))
1436 && !rn2(kelp_pool))
1437 || (kelp_moat && levl[x][y].typ == MOAT && !rn2(kelp_moat)))
1438 return TRUE;
1439 return FALSE;
1440}
1441
1442/*
1443 * Place deposits of minerals (gold and misc gems) in the stone

Callers 1

mineralizeFunction · 0.85

Calls 1

rn2Function · 0.85

Tested by

no test coverage detected