returns True iff the branch 'lev' is in a branch which builds up */
| 1474 | |
| 1475 | /* returns True iff the branch 'lev' is in a branch which builds up */ |
| 1476 | boolean |
| 1477 | builds_up(d_level *lev) |
| 1478 | { |
| 1479 | dungeon *dptr = &svd.dungeons[lev->dnum]; |
| 1480 | branch *br; |
| 1481 | if (dptr->num_dunlevs > 1) |
| 1482 | return (boolean) (dptr->entry_lev == dptr->num_dunlevs); |
| 1483 | /* else, single-level branch; find branch connection that connects this |
| 1484 | * dungeon from a parent dungeon and determine whether it builds up from |
| 1485 | * that */ |
| 1486 | for (br = svb.branches; br; br = br->next) { |
| 1487 | if (on_level(lev, &br->end2)) { |
| 1488 | return br->end1_up; |
| 1489 | } |
| 1490 | } |
| 1491 | impossible("builds_up: can't find branch for dungeon %d", lev->dnum); |
| 1492 | return FALSE; |
| 1493 | } |
| 1494 | |
| 1495 | /* goto the next level (or appropriate dungeon) */ |
| 1496 | void |
no test coverage detected