summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-abil.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-02 23:33:53 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-02 23:33:53 -0800
commit236984fc0e217264ab98093723fa7f8649cc3cf4 (patch)
tree307e14216db42718fb6e9baf8783580bb5199bf4 /crawl-ref/source/mon-abil.cc
parent27c812572cca68a61a9d0450dabcfb209e3bae7c (diff)
downloadcrawl-ref-236984fc0e217264ab98093723fa7f8649cc3cf4.tar.gz
crawl-ref-236984fc0e217264ab98093723fa7f8649cc3cf4.zip
arena: respawning slime creatures
Deal with two respawning slime creatures merging and then splitting.
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r--crawl-ref/source/mon-abil.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index ed8b22d55c..6cd1f2961e 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -13,6 +13,7 @@
#include <conio.h>
#endif
+#include "arena.h"
#include "beam.h"
#include "colour.h"
#include "directn.h"
@@ -196,14 +197,14 @@ static bool _do_split(monsters *thing, coord_def & target)
monsters *new_slime = &env.mons[slime_idx];
+ if (!new_slime)
+ return (false);
+
// Inflict the new slime with any enchantments on the parent.
_split_ench_durations(thing, new_slime);
new_slime->attitude = thing->attitude;
new_slime->flags = thing->flags;
- if (!new_slime)
- return (false);
-
if (you.can_see(thing))
mprf("%s splits.", thing->name(DESC_CAP_A).c_str());
@@ -218,6 +219,9 @@ static bool _do_split(monsters *thing, coord_def & target)
_stats_from_blob_count(thing, hp_per_blob);
_stats_from_blob_count(new_slime, hp_per_blob);
+ if (crawl_state.arena)
+ arena_split_monster(thing, new_slime);
+
return (true);
}