/*!
* @brief クエストに関わるモンスターの配置を行う / Place quest monsters
+ * @param floor_ptr 配置するフロアの参照ポインタ
+ * @param subject_ptr 近隣への即出現を避けるためのプレイヤークリーチャー参照ポインタ
* @return 成功したならばTRUEを返す
*/
-bool place_quest_monsters(floor_type *floor_ptr)
+bool place_quest_monsters(floor_type *floor_ptr, player_type *creature_ptr)
{
int i;
(quest[i].type != QUEST_TYPE_KILL_LEVEL &&
quest[i].type != QUEST_TYPE_RANDOM) ||
quest[i].level != floor_ptr->dun_level ||
- p_ptr->dungeon_idx != quest[i].dungeon ||
+ creature_ptr->dungeon_idx != quest[i].dungeon ||
(quest[i].flags & QUEST_FLAG_PRESET))
{
/* Ignore it */
if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) continue;
if (!monster_can_enter(y, x, r_ptr, 0)) continue;
- if (distance(y, x, p_ptr->y, p_ptr->x) < 10) continue;
+ if (distance(y, x, creature_ptr->y, creature_ptr->x) < 10) continue;
if (g_ptr->info & CAVE_ICKY) continue;
else break;
}
/* Determine the character location */
if (!new_player_spot()) return FALSE;
- if (!place_quest_monsters(floor_ptr)) return FALSE;
+ if (!place_quest_monsters(floor_ptr, p_ptr)) return FALSE;
/* Basic "amount" */
k = (floor_ptr->dun_level / 3);
extern dun_data *dun;
-extern bool place_quest_monsters(floor_type *floor_ptr);
+extern bool place_quest_monsters(floor_type *floor_ptr, player_type *creature_ptr);
extern void wipe_generate_random_floor_flags(floor_type *floor_ptr);
extern void clear_cave(floor_type *floor_ptr);
extern void generate_floor(floor_type *floor_ptr);
}
}
- (void)place_quest_monsters(creature_ptr->current_floor_ptr);
+ (void)place_quest_monsters(creature_ptr->current_floor_ptr, creature_ptr);
/* Place some random monsters */
alloc_times = absence_ticks / alloc_chance;