monster uses spell (ranged) */
| 986 | |
| 987 | /* monster uses spell (ranged) */ |
| 988 | int |
| 989 | buzzmu(struct monst *mtmp, struct attack *mattk) |
| 990 | { |
| 991 | /* don't print constant stream of curse messages for 'normal' |
| 992 | spellcasting monsters at range */ |
| 993 | if (!BZ_VALID_ADTYP(mattk->adtyp)) |
| 994 | return M_ATTK_MISS; |
| 995 | |
| 996 | if (mtmp->mcan || m_seenres(mtmp, cvt_adtyp_to_mseenres(mattk->adtyp))) { |
| 997 | cursetxt(mtmp, FALSE); |
| 998 | return M_ATTK_MISS; |
| 999 | } |
| 1000 | if (lined_up(mtmp) && rn2(3)) { |
| 1001 | nomul(0); |
| 1002 | if (canseemon(mtmp)) |
| 1003 | pline_mon(mtmp, "%s zaps you with a %s!", Monnam(mtmp), |
| 1004 | flash_str(BZ_OFS_AD(mattk->adtyp), FALSE)); |
| 1005 | gb.buzzer = mtmp; |
| 1006 | buzz(BZ_M_SPELL(BZ_OFS_AD(mattk->adtyp)), (int) mattk->damn, |
| 1007 | mtmp->mx, mtmp->my, sgn(gt.tbx), sgn(gt.tby)); |
| 1008 | gb.buzzer = 0; |
| 1009 | return M_ATTK_HIT; |
| 1010 | } |
| 1011 | return M_ATTK_MISS; |
| 1012 | } |
| 1013 | |
| 1014 | /*mcastu.c*/ |
no test coverage detected