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

Function botl_score

src/botl.c:418–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416
417#ifdef SCORE_ON_BOTL
418long
419botl_score(void)
420{
421 long deepest = (long) deepest_lev_reached(FALSE);
422 long umoney, depthbonus;
423
424 /* hidden_gold(False): only gold in containers whose contents are known */
425 umoney = money_cnt(gi.invent) + hidden_gold(FALSE);
426 /* don't include initial gold; don't impose penalty if it's all gone */
427 if ((umoney -= u.umoney0) < 0L)
428 umoney = 0L;
429 depthbonus = (50L * (deepest - 1L))
430 + ((deepest > 30L) ? 10000L
431 : (deepest > 20L) ? (1000L * (deepest - 20L))
432 : 0L);
433 /* neither umoney nor depthbonus can grow unusually big (gold due to
434 weight); u.urexp might */
435 return nowrap_add(u.urexp, umoney + depthbonus);
436}
437#endif /* SCORE_ON_BOTL */
438
439/* provide the name of the current level for display by various ports */

Callers 8

updateStatsMethod · 0.85
do_statusline1Function · 0.85
botl.cFile · 0.85
background_enlightenmentFunction · 0.85
updateStatsMethod · 0.85
FormatStatusStringFunction · 0.85

Calls 3

deepest_lev_reachedFunction · 0.85
money_cntFunction · 0.85
hidden_goldFunction · 0.85

Tested by

no test coverage detected