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

Function rndcolor

src/do_name.c:1469–1477  ·  view source on GitHub ↗

return a random real color unless hallucinating */

Source from the content-addressed store, hash-verified

1467
1468/* return a random real color unless hallucinating */
1469const char *
1470rndcolor(void)
1471{
1472 int k = rn2(CLR_MAX);
1473
1474 return Hallucination ? hcolor((char *) 0)
1475 : (k == NO_COLOR) ? "colorless"
1476 : c_obj_colors[k];
1477}
1478
1479static NEARDATA const char *const hliquids[] = {
1480 "yoghurt", "oobleck", "clotted blood", "diluted water", "purified water",

Callers 1

chest_trapFunction · 0.85

Calls 2

rn2Function · 0.85
hcolorFunction · 0.85

Tested by

no test coverage detected