summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-20 08:12:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-20 08:12:03 +0000
commitd7f1dd21aacab1548caf9315b035a5cedab29c5f (patch)
tree9d7fc4f95a503ed189a5af39a4d36c8b903518c7 /crawl-ref/source/mon-util.cc
parent1733067254ea91e95f1e77015ec3fd71c6424186 (diff)
downloadcrawl-ref-d7f1dd21aacab1548caf9315b035a5cedab29c5f.tar.gz
crawl-ref-d7f1dd21aacab1548caf9315b035a5cedab29c5f.zip
Ignore non-spellcasting monsters behind glass walls for the purpose of
resting and exploring. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5147 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 1b4f701b60..0906dbd7e9 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1333,9 +1333,7 @@ int exper_value( const struct monsters *monster )
// cause the experience value to be overly large... this tries
// to reduce the inappropriate amount of XP that results. -- bwr
if (speed < 10 && !spellcaster && item_usage < MONUSE_STARTING_EQUIPMENT)
- {
x_val /= 2;
- }
// Apply the modifier in the monster's definition
if (modifier > 0)
@@ -2366,7 +2364,11 @@ bool mons_is_magic_user( const monsters *mon )
bool mons_has_ranged_spell( const monsters *mon )
{
- const int mclass = mon->type;
+ const int mclass = mon->type;
+
+ // These two have Torment, but are handled specially.
+ if (mclass == MONS_FIEND || mclass == MONS_PIT_FIEND)
+ return (true);
if (mons_class_flag( mclass, M_SPELLCASTER ))
{