Implemented in PWMAngband and works very well. Apart from a few "fixed" staircases in vaults and rooms, stairs are now generated in convenient places. Here's my changes:
- SQUARE_NO_STAIRS flag added to floor tiles inside starburst and chamber rooms
- square_num_walls_adjacent() using feat_is_wall()
- square_suits_stairs() using similar code as _find_in_range() that accepts locations that are empty squares, not in a vault or flagged with SQUARE_NO_STAIRS, where square_num_walls_adjacent() is equal to the "walls" parameter (the old code was using "greater or equal", which allowed locations with 4 adjacent walls, leading to stairs placed in checkerboards -- too dangerous for stair placement IMO)
- alloc_stairs() strongly simplified by just calling square_suits_stairs() with walls = 3 and decreasing "walls" if no staircase could be generated
Since PWMAngband is based off MAngband, which has wide corridors to allow easier navigation for parties in real time mode, I also added little "holes" in long corridors to allow stair placement:
This is not really needed in case of usual wide-1 corridors, as there are plenty of dead ends to place the stairs.
- SQUARE_NO_STAIRS flag added to floor tiles inside starburst and chamber rooms
- square_num_walls_adjacent() using feat_is_wall()
- square_suits_stairs() using similar code as _find_in_range() that accepts locations that are empty squares, not in a vault or flagged with SQUARE_NO_STAIRS, where square_num_walls_adjacent() is equal to the "walls" parameter (the old code was using "greater or equal", which allowed locations with 4 adjacent walls, leading to stairs placed in checkerboards -- too dangerous for stair placement IMO)
- alloc_stairs() strongly simplified by just calling square_suits_stairs() with walls = 3 and decreasing "walls" if no staircase could be generated
Since PWMAngband is based off MAngband, which has wide corridors to allow easier navigation for parties in real time mode, I also added little "holes" in long corridors to allow stair placement:
Code:
### ###.### ....... ....... #######
Comment