general "damage monster" routine; return True if mon still alive */
| 816 | |
| 817 | /* general "damage monster" routine; return True if mon still alive */ |
| 818 | boolean |
| 819 | hmon(struct monst *mon, |
| 820 | struct obj *obj, |
| 821 | int thrown, /* HMON_xxx (0 => hand-to-hand, other => ranged) */ |
| 822 | int dieroll) |
| 823 | { |
| 824 | boolean result, anger_guards; |
| 825 | |
| 826 | anger_guards = (mon->mpeaceful |
| 827 | && (mon->ispriest || mon->isshk || is_watch(mon->data))); |
| 828 | result = hmon_hitmon(mon, obj, thrown, dieroll); |
| 829 | if (mon->ispriest && !rn2(2)) |
| 830 | ghod_hitsu(mon); |
| 831 | if (anger_guards) |
| 832 | (void) angry_guards(!!Deaf); |
| 833 | return result; |
| 834 | } |
| 835 | |
| 836 | /* hero hits monster bare handed */ |
| 837 | staticfn void |
no test coverage detected