summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/externs.h1
-rw-r--r--src/files.c4
-rw-r--r--src/melee2.c131
-rw-r--r--src/tables.c3
-rw-r--r--src/variable.c1
5 files changed, 50 insertions, 90 deletions
diff --git a/src/externs.h b/src/externs.h
index 5fdd41e0..45734ac1 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -222,7 +222,6 @@ extern bool_ view_bright_lite;
extern bool_ view_granite_lite;
extern bool_ view_special_lite;
extern bool_ plain_descriptions;
-extern bool_ stupid_monsters;
extern bool_ auto_destroy;
extern bool_ wear_confirm;
extern bool_ confirm_stairs;
diff --git a/src/files.c b/src/files.c
index cc209524..664c96d7 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2675,9 +2675,6 @@ errr file_character(cptr name, bool_ full)
if (PRACE_FLAGS(PR1_EXPERIMENTAL))
fprintf(fff, "\n You have done something experimental.");
- if (stupid_monsters)
- fprintf(fff, "\n Your opponents are behaving stupidly.");
-
{
char desc[80];
cptr mimic;
@@ -4286,7 +4283,6 @@ long total_points(void)
if (p_ptr->preserve) mult -= 1; /* Penalize preserve, maximize modes */
if (p_ptr->maximize) mult -= 1;
if (auto_scum) mult -= 4;
- if (stupid_monsters) mult -= 10;
if (small_levels) mult += ((always_small_level) ? 4 : 10);
if (empty_levels) mult += 2;
if (smart_learn) mult += 4;
diff --git a/src/melee2.c b/src/melee2.c
index 9dbdda86..4f63959d 100644
--- a/src/melee2.c
+++ b/src/melee2.c
@@ -2997,18 +2997,11 @@ bool_ make_attack_spell(int m_idx)
/* Not allowed to cast spells */
if (!chance) return (FALSE);
- if (stupid_monsters)
- {
- /* Only do spells occasionally */
- if (rand_int(100) >= chance) return (FALSE);
- }
- else
- {
- if (rand_int(100) >= chance) return (FALSE);
+ /* Only do spells occasionally */
+ if (rand_int(100) >= chance) return (FALSE);
- /* Sometimes forbid inate attacks (breaths) */
- if (rand_int(100) >= (chance * 2)) no_inate = TRUE;
- }
+ /* Sometimes forbid inate attacks (breaths) */
+ if (rand_int(100) >= (chance * 2)) no_inate = TRUE;
/* XXX XXX XXX Handle "track_target" option (?) */
@@ -3031,11 +3024,8 @@ bool_ make_attack_spell(int m_idx)
f5 = r_ptr->flags5;
f6 = r_ptr->flags6;
- if (!stupid_monsters)
- {
- /* Forbid inate attacks sometimes */
- if (no_inate) f4 = 0L;
- }
+ /* Forbid inate attacks sometimes */
+ if (no_inate) f4 = 0L;
/* Hack -- allow "desperate" spells */
if ((r_ptr->flags2 & (RF2_SMART)) &&
@@ -3057,36 +3047,33 @@ bool_ make_attack_spell(int m_idx)
/* No spells left */
if (!f4 && !f5 && !f6) return (FALSE);
- if (!stupid_monsters)
+ /* Check for a clean bolt shot */
+ if ((f4&(RF4_BOLT_MASK) || f5 & (RF5_BOLT_MASK) ||
+ f6&(RF6_BOLT_MASK)) &&
+ !(r_ptr->flags2 & (RF2_STUPID)) &&
+ !clean_shot(m_ptr->fy, m_ptr->fx, y, x))
{
- /* Check for a clean bolt shot */
- if ((f4&(RF4_BOLT_MASK) || f5 & (RF5_BOLT_MASK) ||
- f6&(RF6_BOLT_MASK)) &&
- !(r_ptr->flags2 & (RF2_STUPID)) &&
- !clean_shot(m_ptr->fy, m_ptr->fx, y, x))
- {
- /* Remove spells that will only hurt friends */
- f4 &= ~(RF4_BOLT_MASK);
- f5 &= ~(RF5_BOLT_MASK);
- f6 &= ~(RF6_BOLT_MASK);
- }
-
- /* Check for a possible summon */
- if ((f4 & (RF4_SUMMON_MASK) || f5 & (RF5_SUMMON_MASK) ||
- f6 & (RF6_SUMMON_MASK)) &&
- !(r_ptr->flags2 & (RF2_STUPID)) &&
- !(summon_possible(y, x)))
- {
- /* Remove summoning spells */
- f4 &= ~(RF4_SUMMON_MASK);
- f5 &= ~(RF5_SUMMON_MASK);
- f6 &= ~(RF6_SUMMON_MASK);
- }
+ /* Remove spells that will only hurt friends */
+ f4 &= ~(RF4_BOLT_MASK);
+ f5 &= ~(RF5_BOLT_MASK);
+ f6 &= ~(RF6_BOLT_MASK);
+ }
- /* No spells left */
- if (!f4 && !f5 && !f6) return (FALSE);
+ /* Check for a possible summon */
+ if ((f4 & (RF4_SUMMON_MASK) || f5 & (RF5_SUMMON_MASK) ||
+ f6 & (RF6_SUMMON_MASK)) &&
+ !(r_ptr->flags2 & (RF2_STUPID)) &&
+ !(summon_possible(y, x)))
+ {
+ /* Remove summoning spells */
+ f4 &= ~(RF4_SUMMON_MASK);
+ f5 &= ~(RF5_SUMMON_MASK);
+ f6 &= ~(RF6_SUMMON_MASK);
}
+ /* No spells left */
+ if (!f4 && !f5 && !f6) return (FALSE);
+
/* Extract the "inate" spells */
for (k = 0; k < 32; k++)
{
@@ -3117,32 +3104,25 @@ bool_ make_attack_spell(int m_idx)
/* Get the monster name (or "it") */
monster_desc(m_name, m_ptr, 0x00);
- if (stupid_monsters)
- {
- /* Choose a spell to cast */
- thrown_spell = spell[rand_int(num)];
- }
- else
- {
- thrown_spell = choose_attack_spell(m_idx, spell, num);
+ /* Choose a spell to cast */
+ thrown_spell = choose_attack_spell(m_idx, spell, num);
- /* Abort if no spell was chosen */
- if (!thrown_spell) return (FALSE);
+ /* Abort if no spell was chosen */
+ if (!thrown_spell) return (FALSE);
- /* Calculate spell failure rate */
- failrate = 25 - (rlev + 3) / 4;
+ /* Calculate spell failure rate */
+ failrate = 25 - (rlev + 3) / 4;
- /* Hack -- Stupid monsters will never fail (for jellies and such) */
- if (r_ptr->flags2 & (RF2_STUPID)) failrate = 0;
+ /* Hack -- Stupid monsters will never fail (for jellies and such) */
+ if (r_ptr->flags2 & (RF2_STUPID)) failrate = 0;
- /* Check for spell failure (inate attacks never fail) */
- if ((thrown_spell >= 128) && (rand_int(100) < failrate))
- {
- /* Message */
- msg_format("%^s tries to cast a spell, but fails.", m_name);
+ /* Check for spell failure (inate attacks never fail) */
+ if ((thrown_spell >= 128) && (rand_int(100) < failrate))
+ {
+ /* Message */
+ msg_format("%^s tries to cast a spell, but fails.", m_name);
- return (TRUE);
- }
+ return (TRUE);
}
/* Can the player disrupt its puny attempts? */
@@ -5170,7 +5150,7 @@ static bool_ get_moves(int m_idx, int *mm)
}
}
- if (!stupid_monsters && (is_friend(m_ptr) < 0))
+ if (is_friend(m_ptr) < 0)
{
int tx = x2, ty = y2;
@@ -5243,7 +5223,7 @@ static bool_ get_moves(int m_idx, int *mm)
}
/* Apply fear if possible and necessary */
- if ((stupid_monsters) || (is_friend(m_ptr) > 0))
+ if (is_friend(m_ptr) > 0)
{
if (mon_will_run(m_idx))
{
@@ -5275,11 +5255,8 @@ static bool_ get_moves(int m_idx, int *mm)
}
- if (!stupid_monsters)
- {
- /* Check for no move */
- if (!x && !y) return (FALSE);
- }
+ /* Check for no move */
+ if (!x && !y) return (FALSE);
/* Extract the "absolute distances" */
ax = ABS(x);
@@ -6523,16 +6500,8 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Normal movement */
else
{
- if (stupid_monsters)
- {
- /* Logical moves */
- get_moves(m_idx, mm);
- }
- else
- {
- /* Logical moves, may do nothing */
- if (!get_moves(m_idx, mm)) return;
- }
+ /* Logical moves, may do nothing */
+ if (!get_moves(m_idx, mm)) return;
}
/* Paranoia -- quest code could delete it */
@@ -7233,7 +7202,7 @@ static void process_monster(int m_idx, bool_ is_frien)
/* If we haven't done anything, try casting a spell again */
- if (!do_turn && !do_move && !m_ptr->monfear && !stupid_monsters &&
+ if (!do_turn && !do_move && !m_ptr->monfear &&
(is_friend(m_ptr) < 0))
{
/* Cast spell */
diff --git a/src/tables.c b/src/tables.c
index 2087c64e..dec13e70 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -1498,9 +1498,6 @@ option_type option_info[] =
{ &smart_cheat, FALSE, 3, 15,
"smart_cheat", "Monsters exploit players weaknesses" },
- { &stupid_monsters, FALSE, 3, 16,
- "stupid_monsters", "Monsters behave stupidly" },
-
{ &small_levels, TRUE, 3, 17,
"small_levels", "Allow unusually small dungeon levels" },
diff --git a/src/variable.c b/src/variable.c
index 08cabd39..ac67e308 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -223,7 +223,6 @@ bool_ empty_levels; /* Allow empty 'arena' levels */
bool_ always_small_level; /* Small levels */
bool_ player_symbols; /* Use varying symbols for the player char */
bool_ plain_descriptions; /* Plain object descriptions */
-bool_ stupid_monsters; /* Monsters use old AI */
bool_ auto_destroy; /* Known worthless items are destroyed without confirmation */
bool_ confirm_stairs; /* Prompt before staircases... */
bool_ wear_confirm; /* Confirm before putting on known cursed items */