hostile monster has another hostile next to it */
| 1368 | |
| 1369 | /* hostile monster has another hostile next to it */ |
| 1370 | staticfn boolean |
| 1371 | mon_has_friends(struct monst *mtmp) |
| 1372 | { |
| 1373 | coordxy dx, dy; |
| 1374 | struct monst *mon2; |
| 1375 | |
| 1376 | if (mtmp->mtame || mtmp->mpeaceful) |
| 1377 | return FALSE; |
| 1378 | |
| 1379 | for (dx = -1; dx <= 1; dx++) |
| 1380 | for (dy = -1; dy <= 1; dy++) { |
| 1381 | coordxy x = mtmp->mx + dx; |
| 1382 | coordxy y = mtmp->my + dy; |
| 1383 | |
| 1384 | if (isok(x, y) && (mon2 = m_at(x, y)) != 0 |
| 1385 | && mon2 != mtmp |
| 1386 | && !mon2->mtame && !mon2->mpeaceful) |
| 1387 | return TRUE; |
| 1388 | } |
| 1389 | |
| 1390 | return FALSE; |
| 1391 | } |
| 1392 | |
| 1393 | /* does monster like object pile at x,y? */ |
| 1394 | staticfn boolean |
no test coverage detected