* display_warning() * * This is also *not* a map_XXXX() function! Monster warnings float * above everything just like monsters do, but only if the monster * is not showing. * * Do not call for worm tails. */
| 631 | * Do not call for worm tails. |
| 632 | */ |
| 633 | staticfn void |
| 634 | display_warning(struct monst *mon) |
| 635 | { |
| 636 | coordxy x = mon->mx, y = mon->my; |
| 637 | int glyph; |
| 638 | |
| 639 | if (mon_warning(mon)) { |
| 640 | int wl = Hallucination ? rn2_on_display_rng(WARNCOUNT - 1) + 1 |
| 641 | : warning_of(mon); |
| 642 | |
| 643 | glyph = warning_to_glyph(wl); |
| 644 | } else if (MATCH_WARN_OF_MON(mon)) { |
| 645 | glyph = mon_to_glyph(mon, rn2_on_display_rng); |
| 646 | } else { |
| 647 | impossible("display_warning did not match warning type?"); |
| 648 | return; |
| 649 | } |
| 650 | show_mon_or_warn(x, y, glyph); |
| 651 | } |
| 652 | |
| 653 | int |
| 654 | warning_of(struct monst *mon) |
no test coverage detected