* Bad if: * pos is occupied OR * pos is inside restricted region (nlx,nly,nhx,nhy) OR * NOT (pos is corridor and a maze level OR pos is a room OR pos is air) */
| 338 | * NOT (pos is corridor and a maze level OR pos is a room OR pos is air) |
| 339 | */ |
| 340 | boolean |
| 341 | bad_location( |
| 342 | coordxy x, coordxy y, |
| 343 | coordxy nlx, coordxy nly, coordxy nhx, coordxy nhy) |
| 344 | { |
| 345 | return (boolean) (occupied(x, y) |
| 346 | || within_bounded_area(x, y, nlx, nly, nhx, nhy) |
| 347 | || !((levl[x][y].typ == CORR |
| 348 | && svl.level.flags.is_maze_lev) |
| 349 | || levl[x][y].typ == ROOM |
| 350 | || levl[x][y].typ == AIR)); |
| 351 | } |
| 352 | |
| 353 | /* pick a location in area (lx, ly, hx, hy) but not in (nlx, nly, nhx, nhy) |
| 354 | and place something (based on rtype) in that region */ |
no test coverage detected