summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-07 00:21:19 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-07 00:21:19 +0000
commit108ddcb271866c11e8c980977e50009594d11e4e (patch)
tree6a3c0fd27aa8e6812b22fbb4743a661a4dd7e895 /crawl-ref/source/mon-util.cc
parent95581358c4008d1f3ca346db4045e2c4ab4dcef9 (diff)
downloadcrawl-ref-108ddcb271866c11e8c980977e50009594d11e4e.tar.gz
crawl-ref-108ddcb271866c11e8c980977e50009594d11e4e.zip
Expand monster speed handling to work on the level of individual
monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7166 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 807b37b010..312e5ae795 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1351,7 +1351,7 @@ int mons_difficulty(int mtype)
+ me->hpdice[3]);
}
-int exper_value( const struct monsters *monster )
+int exper_value(const monsters *monster)
{
long x_val = 0;
@@ -1361,7 +1361,7 @@ int exper_value( const struct monsters *monster )
const int maxhp = monster->max_hit_points;
// These are some values we care about.
- const int speed = mons_speed(mclass);
+ const int speed = mons_speed(monster);
const int modifier = _mons_exp_mod(mclass);
const int item_usage = mons_itemuse(monster);
@@ -2011,12 +2011,17 @@ static int _mons_exp_mod(int mc)
return (smc->exp_mod);
}
-int mons_speed(int mc)
+int mons_class_speed(int mc)
{
ASSERT(smc);
return (smc->speed);
}
+int mons_speed(const monsters *mon)
+{
+ return (mons_class_speed(mon->type));
+}
+
mon_intel_type mons_class_intel(int mc)
{
ASSERT(smc);