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

Function noveltitle

src/do_name.c:1610–1623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1608#define NVL_THUD 33
1609
1610const char *
1611noveltitle(int *novidx)
1612{
1613 int j, k = SIZE(sir_Terry_novels);
1614
1615 j = rn2(k);
1616 if (novidx) {
1617 if (*novidx == -1)
1618 *novidx = j;
1619 else if (*novidx >= 0 && *novidx < k)
1620 j = *novidx;
1621 }
1622 return sir_Terry_novels[j];
1623}
1624
1625/* figure out canonical novel title from player-specified one */
1626const char *

Callers 3

domonnoiseFunction · 0.85
mksobjFunction · 0.85
study_bookFunction · 0.85

Calls 1

rn2Function · 0.85

Tested by

no test coverage detected