* @brief プレイヤーの現在の広域マップ座標から得た地勢を元にモンスターの生成条件関数を返す
* @return 地勢にあったモンスターの生成条件関数
*/
-monsterrace_hook_type get_monster_hook(void)
+monsterrace_hook_type get_monster_hook(player_type *player_ptr)
{
- if (!p_ptr->current_floor_ptr->dun_level && !p_ptr->current_floor_ptr->inside_quest)
+ if (!player_ptr->current_floor_ptr->dun_level && !player_ptr->current_floor_ptr->inside_quest)
{
- switch (wilderness[p_ptr->wilderness_y][p_ptr->wilderness_x].terrain)
+ switch (wilderness[player_ptr->wilderness_y][player_ptr->wilderness_x].terrain)
{
case TERRAIN_TOWN:
return (monsterrace_hook_type)mon_hook_town;
* @brief 指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す
* @return 地勢にあったモンスターの生成条件関数
*/
-monsterrace_hook_type get_monster_hook2(POSITION y, POSITION x)
+monsterrace_hook_type get_monster_hook2(player_type *player_ptr, POSITION y, POSITION x)
{
- feature_type *f_ptr = &f_info[p_ptr->current_floor_ptr->grid_array[y][x].feat];
+ feature_type *f_ptr = &f_info[player_ptr->current_floor_ptr->grid_array[y][x].feat];
/* Set the monster list */
/*!
* @brief モンスターをペットにする
+ * @param player_type プレーヤーへの参照ポインタ
* @param m_ptr モンスター情報構造体の参照ポインタ
* @return なし
*/
-void set_pet(monster_type *m_ptr)
+void set_pet(player_type *player_ptr, monster_type *m_ptr)
{
- check_quest_completion(p_ptr, m_ptr);
+ check_quest_completion(player_ptr, m_ptr);
m_ptr->smart |= SM_PET;
if (!(r_info[m_ptr->r_idx].flags3 & (RF3_EVIL | RF3_GOOD)))
* @param m_ptr モンスター情報構造体の参照ポインタ
* @return なし
*/
-void anger_monster(monster_type *m_ptr)
+void anger_monster(player_type *player_ptr, monster_type *m_ptr)
{
- if (p_ptr->phase_out) return;
+ if (player_ptr->phase_out) return;
if (is_friendly(m_ptr))
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, 0);
+ monster_desc(player_ptr, m_name, m_ptr, 0);
msg_format(_("%^sは怒った!", "%^s gets angry!"), m_name);
set_hostile(m_ptr);
- chg_virtue(p_ptr, V_INDIVIDUALISM, 1);
- chg_virtue(p_ptr, V_HONOUR, -1);
- chg_virtue(p_ptr, V_JUSTICE, -1);
- chg_virtue(p_ptr, V_COMPASSION, -1);
+ chg_virtue(player_ptr, V_INDIVIDUALISM, 1);
+ chg_virtue(player_ptr, V_HONOUR, -1);
+ chg_virtue(player_ptr, V_JUSTICE, -1);
+ chg_virtue(player_ptr, V_COMPASSION, -1);
}
}
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+ monster_desc(player_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
exe_write_diary(player_ptr, DIARY_NAMED_PET, 3, m_name);
}
if (m_ptr->mflag2 & MFLAG2_CHAMELEON)
{
- choose_new_monster(m_idx, TRUE, MON_CHAMELEON);
+ choose_new_monster(player_ptr, m_idx, TRUE, MON_CHAMELEON);
r_ptr = &r_info[m_ptr->r_idx];
}
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, MD_WRONGDOER_NAME);
+ monster_desc(player_ptr, m_name, m_ptr, MD_WRONGDOER_NAME);
exe_write_diary(player_ptr, DIARY_ARENA, player_ptr->arena_number, m_name);
}
if (pet) mode |= PM_FORCE_PET;
- if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode))
+ if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode))
{
if (player_can_see_bold(player_ptr, wy, wx)) notice = TRUE;
}
BIT_FLAGS mode = 0L;
if (pet) mode |= PM_FORCE_PET;
- if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode))
+ if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode))
{
if (player_can_see_bold(player_ptr, wy, wx))
msg_print(_("新たな戦士が現れた!", "A new warrior steps forth!"));