| 1410 | |
| 1411 | /* is there a monster at <x,y> that can see the hero and react? */ |
| 1412 | staticfn struct monst * |
| 1413 | responsive_mon_at(int x, int y) |
| 1414 | { |
| 1415 | struct monst *mtmp = isok(x, y) ? m_at(x, y) : 0; |
| 1416 | |
| 1417 | if (mtmp && (helpless(mtmp) /* immobilized monst */ |
| 1418 | || !mtmp->mcansee || !haseyes(mtmp->data) /* blind monst */ |
| 1419 | || (Invis && !perceives(mtmp->data)) /* unseen hero */ |
| 1420 | || (x != mtmp->mx || y != mtmp->my))) /* worm tail */ |
| 1421 | mtmp = (struct monst *) 0; |
| 1422 | return mtmp; |
| 1423 | } |
| 1424 | |
| 1425 | /* player chose 'uarmh' for #tip (pickup.c); visual #chat, sort of... */ |
| 1426 | int |