reject webs which interfere with solving Sokoban */
| 1249 | |
| 1250 | /* reject webs which interfere with solving Sokoban */ |
| 1251 | staticfn boolean |
| 1252 | soko_allow_web(struct monst *mon) |
| 1253 | { |
| 1254 | stairway *stway; |
| 1255 | |
| 1256 | /* for a non-Sokoban level or a solved Sokoban level, no restriction */ |
| 1257 | if (!Sokoban) |
| 1258 | return TRUE; |
| 1259 | /* not-yet-solved Sokoban level: allow web only when spinner can see |
| 1260 | the stairs up [we really want 'is in same chamber as stairs up'] */ |
| 1261 | stway = stairway_find_dir(TRUE); /* stairs up */ |
| 1262 | if (stway && m_cansee(mon, stway->sx, stway->sy)) |
| 1263 | return TRUE; |
| 1264 | return FALSE; |
| 1265 | } |
| 1266 | |
| 1267 | /* monster might spin a web */ |
| 1268 | staticfn void |
no test coverage detected