summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-31 02:59:27 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-31 02:59:27 -0700
commit1eb5294b8716ec5a15a24600919f1a82b10a860f (patch)
treee3b5cb3e7b237e4c39e0df300dce671426ae4eb8 /crawl-ref/source/monplace.cc
parentec58c7bd888c8cf5b6014fe283c9c280cf114fb4 (diff)
downloadcrawl-ref-1eb5294b8716ec5a15a24600919f1a82b10a860f.tar.gz
crawl-ref-1eb5294b8716ec5a15a24600919f1a82b10a860f.zip
Can specify size in slime creature monster spec
You can now use monster specs like "titanic slime creature". The initial HP given to them in _place_monster_aux() might need tweaking.
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index a340ff226a..f253d18204 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1221,9 +1221,19 @@ static int _place_monster_aux(const mgen_data &mg,
if (mg.cls == MONS_MANTICORE)
menv[id].number = 8 + random2(9);
- // Slime creatures start off as only a single merged blob.
if (mg.cls == MONS_SLIME_CREATURE)
- menv[id].number = 1;
+ {
+ if (mg.number == 0)
+ // Slime creatures start off as only a single un-merged blob.
+ menv[id].number = 1;
+ else
+ {
+ // Boost HP to what it would have been if it grown this big
+ // by merging.
+ menv[id].hit_points *= mg.number;
+ menv[id].max_hit_points *= mg.number;
+ }
+ }
// Set attitude, behaviour and target.
menv[id].attitude = ATT_HOSTILE;