From 236984fc0e217264ab98093723fa7f8649cc3cf4 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Mon, 2 Nov 2009 23:33:53 -0800 Subject: arena: respawning slime creatures Deal with two respawning slime creatures merging and then splitting. --- crawl-ref/source/mon-abil.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/mon-abil.cc') 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 #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); } -- cgit v1.2.3-54-g00ecf