can be used as ranged_attk_assessed() callback. Returns TRUE if monster is avoiding use of this attack */
| 2390 | /* can be used as ranged_attk_assessed() callback. |
| 2391 | Returns TRUE if monster is avoiding use of this attack */ |
| 2392 | boolean |
| 2393 | mon_avoiding_this_attack( |
| 2394 | struct monst *mtmp, |
| 2395 | int attkidx) |
| 2396 | { |
| 2397 | struct permonst *ptr = mtmp->data; |
| 2398 | int typ = -1; |
| 2399 | |
| 2400 | if (attkidx >= 0 |
| 2401 | && (typ = get_atkdam_type(ptr->mattk[attkidx].adtyp)) >= 0 |
| 2402 | && m_seenres(mtmp, cvt_adtyp_to_mseenres(typ))) |
| 2403 | return TRUE; |
| 2404 | return FALSE; |
| 2405 | } |
| 2406 | |
| 2407 | /* |
| 2408 | * This would be equivalent to: |
nothing calls this directly
no test coverage detected