summaryrefslogtreecommitdiff
path: root/src/melee2.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:56 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:56 +0100
commitc67bb95861c02f01988205c0879c72c53fc3c92e (patch)
tree741d945e8d5ef3a550c0b7c621ec4abf758f052f /src/melee2.cc
parent65cf7c8566d814e0564ef86db698bd52fc6bc788 (diff)
Remove speak_unique option
Diffstat (limited to 'src/melee2.cc')
-rw-r--r--src/melee2.cc53
1 files changed, 25 insertions, 28 deletions
diff --git a/src/melee2.cc b/src/melee2.cc
index f3dc1301..8479f68b 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -6405,42 +6405,39 @@ static void process_monster(int m_idx, bool_ is_frien)
if (ai_multiply(m_idx)) return;
}
- if (speak_unique)
+ if (randint(SPEAK_CHANCE) == 1)
{
- if (randint(SPEAK_CHANCE) == 1)
+ if (player_has_los_bold(oy, ox) && (r_ptr->flags2 & RF2_CAN_SPEAK))
{
- if (player_has_los_bold(oy, ox) && (r_ptr->flags2 & RF2_CAN_SPEAK))
- {
- char m_name[80];
- char monmessage[80];
+ char m_name[80];
+ char monmessage[80];
- /* Acquire the monster name/poss */
- if (m_ptr->ml)
- monster_desc(m_name, m_ptr, 0);
- else
- strcpy(m_name, "It");
+ /* Acquire the monster name/poss */
+ if (m_ptr->ml)
+ monster_desc(m_name, m_ptr, 0);
+ else
+ strcpy(m_name, "It");
- /* xtra_line function by Matt Graham--allow uniques to */
- /* say "unique" things based on their monster index. */
- /* Try for the unique's lines in "monspeak.txt" first. */
- /* 0 is SUCCESS, of course.... */
+ /* xtra_line function by Matt Graham--allow uniques to */
+ /* say "unique" things based on their monster index. */
+ /* Try for the unique's lines in "monspeak.txt" first. */
+ /* 0 is SUCCESS, of course.... */
- struct hook_mon_speak_in in = { m_idx, m_name };
- if (!process_hooks_new(HOOK_MON_SPEAK, &in, NULL))
+ struct hook_mon_speak_in in = { m_idx, m_name };
+ if (!process_hooks_new(HOOK_MON_SPEAK, &in, NULL))
+ {
+ if (get_xtra_line("monspeak.txt", m_ptr, monmessage) != 0)
{
- if (get_xtra_line("monspeak.txt", m_ptr, monmessage) != 0)
- {
- /* Get a message from old defaults if new don't work */
+ /* Get a message from old defaults if new don't work */
- if (is_friend(m_ptr) > 0)
- get_rnd_line("speakpet.txt", monmessage);
- else if (m_ptr->monfear)
- get_rnd_line("monfear.txt", monmessage);
- else
- get_rnd_line("bravado.txt", monmessage);
- }
- msg_format("%^s %s", m_name, monmessage);
+ if (is_friend(m_ptr) > 0)
+ get_rnd_line("speakpet.txt", monmessage);
+ else if (m_ptr->monfear)
+ get_rnd_line("monfear.txt", monmessage);
+ else
+ get_rnd_line("bravado.txt", monmessage);
}
+ msg_format("%^s %s", m_name, monmessage);
}
}
}