summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-10-24 18:34:36 -0400
committerCharles Otto <ottochar@gmail.com>2009-10-30 20:31:27 -0400
commitd0f35e86de825119d5fa255f6075a55a89f2f20b (patch)
tree577616aaf6a9dc4e6a3f8f3e632a095343ef8551 /crawl-ref/source/monplace.cc
parent387e5d2db125d6306f6eed6901ce3b504ce44072 (diff)
downloadcrawl-ref-d0f35e86de825119d5fa255f6075a55a89f2f20b.tar.gz
crawl-ref-d0f35e86de825119d5fa255f6075a55a89f2f20b.zip
Preliminary support for slime creatures merging and splitting.
A slime creatures will merge onto an adjacent slime creature if the merge brings it closer to its target, merging only happens when slime creatures aren't wandering, sleeping, or fleeing. A slime creature will split (if it merged previously) if it is at full hp and is resting or wandering. I added a hack to make the experienced gained for merged slime creatures approximately equal to killing however many were merged individually, exp from merged slimes may be too low now. For now the number of slime creatures merged into one J is given explicitly in their description (one-blob slime creature), that should get changed at some point. Damage and maxHP for merged slime creatures are linear with the number merged, an arbitrary cap of 8 is currently in place.
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index be27711eef..a340ff226a 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1221,6 +1221,10 @@ 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;
+
// Set attitude, behaviour and target.
menv[id].attitude = ATT_HOSTILE;
menv[id].behaviour = mg.behaviour;