count the number of monsters on the level */
| 37 | |
| 38 | /* count the number of monsters on the level */ |
| 39 | int |
| 40 | monster_census(boolean spotted) /* seen|sensed vs all */ |
| 41 | { |
| 42 | struct monst *mtmp; |
| 43 | int count = 0; |
| 44 | |
| 45 | for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { |
| 46 | if (DEADMONSTER(mtmp)) |
| 47 | continue; |
| 48 | if (mtmp->isgd && mtmp->mx == 0) |
| 49 | continue; |
| 50 | if (spotted && !canspotmon(mtmp)) |
| 51 | continue; |
| 52 | ++count; |
| 53 | } |
| 54 | return count; |
| 55 | } |
| 56 | |
| 57 | /* mon summons a monster */ |
| 58 | int |
no outgoing calls
no test coverage detected