attempt to screen out locations where a mimic-as-boulder shouldn't occur */
| 1861 | |
| 1862 | /* attempt to screen out locations where a mimic-as-boulder shouldn't occur */ |
| 1863 | staticfn boolean |
| 1864 | m_bad_boulder_spot(coordxy x, coordxy y) |
| 1865 | { |
| 1866 | struct rm *lev; |
| 1867 | |
| 1868 | /* avoid trap locations */ |
| 1869 | if (t_at(x, y)) |
| 1870 | return TRUE; |
| 1871 | /* try to avoid locations which already have a boulder (this won't |
| 1872 | actually work; we get called before objects have been placed...) */ |
| 1873 | if (sobj_at(BOULDER, x, y)) |
| 1874 | return TRUE; |
| 1875 | /* avoid closed doors */ |
| 1876 | lev = &levl[x][y]; |
| 1877 | if (IS_DOOR(lev->typ) && (lev->doormask & (D_CLOSED | D_LOCKED)) != 0) |
| 1878 | return TRUE; |
| 1879 | /* spot is ok */ |
| 1880 | return FALSE; |
| 1881 | } |
| 1882 | |
| 1883 | staticfn int |
| 1884 | pm_to_humidity(struct permonst *pm) |
no test coverage detected