summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-08 14:30:42 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-08 14:30:42 -0600
commit0d955f64378f7a6a913e5fcecec4114dc66bae52 (patch)
treea449a2013d15e8563947046a098ea145b8856c05 /crawl-ref/source/monster.cc
parente4ed21470a29b0f88424ee48a44d166666c36609 (diff)
downloadcrawl-ref-0d955f64378f7a6a913e5fcecec4114dc66bae52.tar.gz
crawl-ref-0d955f64378f7a6a913e5fcecec4114dc66bae52.zip
Make monsters::body_size() take merged slime creatures into account.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 511951499c..cf1e224d29 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -281,7 +281,22 @@ bool monsters::can_drown() const
size_type monsters::body_size(size_part_type /* psize */, bool /* base */) const
{
const monsterentry *e = get_monster_data(type);
- return (e ? e->size : SIZE_MEDIUM);
+ size_type ret = (e ? e->size : SIZE_MEDIUM);
+
+ // Slime creature size is increased by the number merged.
+ if (type == MONS_SLIME_CREATURE)
+ {
+ if (number == 2)
+ ret = SIZE_MEDIUM;
+ else if (number == 3)
+ ret = SIZE_LARGE;
+ else if (number == 4)
+ ret = SIZE_BIG;
+ else if (number == 5)
+ ret = SIZE_GIANT;
+ }
+
+ return (ret);
}
int monsters::body_weight() const