}
}
- if ((floor_ptr->dun_level > DUN_CAVERN) && !dd_ptr->empty_level && dungeon_ptr->flags.has(DungeonFeatureType::CAVERN) && !dd_ptr->laketype && !dd_ptr->destroyed && (randint1(1000) < floor_ptr->dun_level)) {
+ constexpr auto can_become_cavern = 20;
+ auto should_build_cavern = floor_ptr->dun_level > can_become_cavern;
+ should_build_cavern &= !dd_ptr->empty_level;
+ should_build_cavern &= dungeon_ptr->flags.has(DungeonFeatureType::CAVERN);
+ should_build_cavern &= dd_ptr->laketype == 0;
+ should_build_cavern &= !dd_ptr->destroyed;
+ should_build_cavern &= randint1(1000) < floor_ptr->dun_level;
+ if (should_build_cavern) {
dd_ptr->cavern = true;
msg_print_wizard(player_ptr, CHEAT_DUNGEON, _("洞窟を生成。", "Cavern on level."));
build_cavern(player_ptr);
#define MAX_VAMPIRIC_DRAIN 50 /*!< 吸血処理の最大回復HP */
/*
- * Dungeon generation values
- */
-#define DUN_CAVERN 20 /*!< 洞窟状のダンジョンが生成される基本確率(1/定数) / 1/chance of having a cavern level */
-
-/*
* Dungeon streamer generation values
*/
#define DUN_STR_DEN 5 /* Density of streamers */