for checking troubles during prayer; is hero at risk? */
| 1338 | |
| 1339 | /* for checking troubles during prayer; is hero at risk? */ |
| 1340 | boolean |
| 1341 | region_danger(void) |
| 1342 | { |
| 1343 | int i, f_indx, n = 0; |
| 1344 | |
| 1345 | for (i = 0; i < svn.n_regions; i++) { |
| 1346 | /* only care about regions that hero is in */ |
| 1347 | if (!hero_inside(gr.regions[i])) |
| 1348 | continue; |
| 1349 | f_indx = gr.regions[i]->inside_f; |
| 1350 | /* the only type of region we understand is gas_cloud */ |
| 1351 | if (f_indx == INSIDE_GAS_CLOUD) { |
| 1352 | /* completely harmless if you don't need to breathe */ |
| 1353 | if (nonliving(gy.youmonst.data) || Breathless) |
| 1354 | continue; |
| 1355 | /* minor inconvenience if you're poison resistant; |
| 1356 | not harmful enough to be a prayer-level trouble */ |
| 1357 | if (Poison_resistance) |
| 1358 | continue; |
| 1359 | ++n; |
| 1360 | } |
| 1361 | } |
| 1362 | return n ? TRUE : FALSE; |
| 1363 | } |
| 1364 | |
| 1365 | /* for fixing trouble at end of prayer; |
| 1366 | danger detected at start of prayer might have expired by now */ |
no outgoing calls
no test coverage detected