if (!n_ptr->name) break;
/* Ignore excessive depth */
- if (n_ptr->level > dun_level) continue;
+ if (n_ptr->level > current_floor_ptr->dun_level) continue;
/* Not matched with pit/nest flag */
if (!(allow_flag_mask & (1L << count))) continue;
/* Count this possibility */
- total += n_ptr->chance * MAX_DEPTH / (MIN(dun_level, MAX_DEPTH - 1) - n_ptr->level + 5);
+ total += n_ptr->chance * MAX_DEPTH / (MIN(current_floor_ptr->dun_level, MAX_DEPTH - 1) - n_ptr->level + 5);
}
/* Pick a random type */
if (!n_ptr->name) break;
/* Ignore excessive depth */
- if (n_ptr->level > dun_level) continue;
+ if (n_ptr->level > current_floor_ptr->dun_level) continue;
/* Not matched with pit/nest flag */
if (!(allow_flag_mask & (1L << count))) continue;
/* Count this possibility */
- total += n_ptr->chance * MAX_DEPTH / (MIN(dun_level, MAX_DEPTH - 1) - n_ptr->level + 5);
+ total += n_ptr->chance * MAX_DEPTH / (MIN(current_floor_ptr->dun_level, MAX_DEPTH - 1) - n_ptr->level + 5);
/* Found the type */
if (tmp < total) break;
* @param v 未使用
* @param a 比較対象参照ID1
* @param b 比較対象参照ID2
+* TODO: to sort.c
*/
static bool ang_sort_comp_nest_mon_info(vptr u, vptr v, int a, int b)
{
* @param v 未使用
* @param a スワップ対象参照ID1
* @param b スワップ対象参照ID2
+* TODO: to sort.c
*/
static void ang_sort_swap_nest_mon_info(vptr u, vptr v, int a, int b)
{
while (attempts--)
{
/* Get a (hard) monster type */
- r_idx = get_mon_num(dun_level + 11);
+ r_idx = get_mon_num(current_floor_ptr->dun_level + 11);
r_ptr = &r_info[r_idx];
/* Decline incorrect alignment */
if (cheat_room)
{
- ang_sort_comp = ang_sort_comp_nest_mon_info;
- ang_sort_swap = ang_sort_swap_nest_mon_info;
- ang_sort(nest_mon_info, NULL, NUM_NEST_MON_TYPE);
+ ang_sort(nest_mon_info, NULL, NUM_NEST_MON_TYPE, ang_sort_comp_nest_mon_info, ang_sort_swap_nest_mon_info);
/* Dump the entries (prevent multi-printing) */
for (i = 0; i < NUM_NEST_MON_TYPE; i++)
while (attempts--)
{
/* Get a (hard) monster type */
- r_idx = get_mon_num(dun_level + 11);
+ r_idx = get_mon_num(current_floor_ptr->dun_level + 11);
r_ptr = &r_info[r_idx];
/* Decline incorrect alignment */
while (attempts--)
{
/* Get a (hard) monster type */
- r_idx = get_mon_num(dun_level + 0);
+ r_idx = get_mon_num(current_floor_ptr->dun_level + 0);
r_ptr = &r_info[r_idx];
/* Decline incorrect alignment */