diff --git a/src/monster/melee2.c b/src/monster/melee2.c index 5b1a14b..e67ce8d 100644 --- a/src/monster/melee2.c +++ b/src/monster/melee2.c @@ -3648,6 +3648,7 @@ static void process_monster(int m_idx) /* Possible disturb */ if (m_ptr->ml && + (OPT(disturb_town) || r_info[m_ptr->r_idx].level != 0) && (OPT(disturb_move) || ((m_ptr->mflag & (MFLAG_VIEW)) && OPT(disturb_near)))) diff --git a/src/monster/monster2.c b/src/monster/monster2.c index 96648d5..7ef1f7d 100644 --- a/src/monster/monster2.c +++ b/src/monster/monster2.c @@ -1150,9 +1150,11 @@ void lore_treasure(int m_idx, int num_item, int num_gold) * or viewed directly, but old targets will remain set. XXX XXX * * The player can choose to be disturbed by several things, including - * "OPT(disturb_move)" (monster which is viewable moves in some way), and + * "OPT(disturb_move)" (monster which is viewable moves in some way), * "OPT(disturb_near)" (monster which is "easily" viewable moves in some - * way). Note that "moves" includes "appears" and "disappears". + * way), and "OPT(disturb_town)" (combines disturb_move and disturb_near + * but only for town monsters). + * Note that "moves" includes "appears" and "disappears". */ void update_mon(int m_idx, bool full) { @@ -1320,7 +1322,11 @@ void update_mon(int m_idx, bool full) if (l_ptr->sights < MAX_SHORT) l_ptr->sights++; /* Disturb on appearance */ - if (OPT(disturb_move)) disturb(1, 0); + if (OPT(disturb_move) && + (OPT(disturb_town) || r_info[m_ptr->r_idx].level != 0)) + { + disturb(1, 0); + } /* Window stuff */ p_ptr->redraw |= PR_MONLIST; @@ -1343,7 +1349,11 @@ void update_mon(int m_idx, bool full) if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH); /* Disturb on disappearance */ - if (OPT(disturb_move)) disturb(1, 0); + if (OPT(disturb_move) && + (OPT(disturb_town) || r_info[m_ptr->r_idx].level != 0)) + { + disturb(1, 0); + } /* Window stuff */ p_ptr->redraw |= PR_MONLIST; @@ -1361,8 +1371,9 @@ void update_mon(int m_idx, bool full) m_ptr->mflag |= (MFLAG_VIEW); /* Disturb on appearance */ - if (OPT(disturb_near)) disturb(1, 0); - + if (OPT(disturb_near) && + (OPT(disturb_town) || r_info[m_ptr->r_idx].level != 0)) + disturb(1, 0); /* Re-draw monster window */ p_ptr->redraw |= PR_MONLIST; } @@ -1378,7 +1389,9 @@ void update_mon(int m_idx, bool full) m_ptr->mflag &= ~(MFLAG_VIEW); /* Disturb on disappearance */ - if (OPT(disturb_near)) disturb(1, 0); + if (OPT(disturb_near) && + (OPT(disturb_town) || r_info[m_ptr->r_idx].level != 0)) + disturb(1, 0); /* Re-draw monster list window */ p_ptr->redraw |= PR_MONLIST; diff --git a/src/option.c b/src/option.c index a35d8ca..31c4fac 100644 --- a/src/option.c +++ b/src/option.c @@ -67,6 +67,7 @@ const int option_page[OPT_PAGE_MAX][OPT_PAGE_PER] = { OPT_disturb_move, OPT_disturb_near, + OPT_disturb_town, OPT_disturb_detect, OPT_disturb_state, OPT_quick_messages, @@ -156,9 +157,9 @@ static option_entry options[OPT_MAX] = { NULL, NULL, FALSE }, /* 19 */ { "disturb_move", "Disturb whenever any monster moves", FALSE }, /* 20 */ { "disturb_near", "Disturb whenever viewable monster moves", TRUE }, /* 21 */ -{ "disturb_detect", "Disturb whenever leaving trap detected area", TRUE }, /* 22 */ -{ "disturb_state", "Disturb whenever player state changes", TRUE }, /* 23 */ -{ NULL, NULL, FALSE }, /* 24 */ +{ "disturb_town", "Disturb whenever townspeople move", TRUE }, /* 22 */ +{ "disturb_detect", "Disturb whenever leaving trap detected area", TRUE }, /* 23 */ +{ "disturb_state", "Disturb whenever player state changes", TRUE }, /* 24 */ { NULL, NULL, FALSE }, /* 25 */ { NULL, NULL, FALSE }, /* 26 */ { NULL, NULL, FALSE }, /* 27 */ diff --git a/src/option.h b/src/option.h index b89cbf1..c907ab0 100644 --- a/src/option.h +++ b/src/option.h @@ -56,9 +56,10 @@ extern const int option_page[OPT_PAGE_MAX][OPT_PAGE_PER]; #define OPT_disturb_move 20 #define OPT_disturb_near 21 -#define OPT_disturb_detect 22 -#define OPT_disturb_state 23 -#define OPT_disturb_minor 24 +#define OPT_disturb_town 22 +#define OPT_disturb_detect 23 +#define OPT_disturb_state 24 +#define OPT_disturb_minor 25 #define OPT_view_perma_grids 38 #define OPT_view_torch_grids 39