MCPcopy Index your code
hub / github.com/NetHack/NetHack / warning_of

Function warning_of

src/display.c:653–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651}
652
653int
654warning_of(struct monst *mon)
655{
656 int wl = 0, tmp = 0;
657
658 if (mon_warning(mon)) {
659 tmp = (int) (mon->m_lev / 4); /* match display.h */
660 wl = (tmp > WARNCOUNT - 1) ? WARNCOUNT - 1 : tmp;
661 }
662 return wl;
663}
664
665/* used by newsym() to decide whether to show a monster or a visible gas
666 cloud region when both are at the same spot; caller deals with region */

Callers 3

mfind0Function · 0.85
warnrevealFunction · 0.85
display_warningFunction · 0.85

Calls 1

mon_warningFunction · 0.85

Tested by

no test coverage detected