From 2cd32d9940652f0467301ffd387e0c8e277fb6cc Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 11 Jun 2009 15:29:17 +0000 Subject: Backport trunk r9960 to 0.5. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9961 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mon-util.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 5bc02bd5f3..c7fa1b26d1 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -6591,26 +6591,30 @@ void monsters::add_enchantment_effect(const mon_enchant &ench, bool quiet) if (type == MONS_AIR_ELEMENTAL) { mprf("%s merges itself into the air.", - name(DESC_CAP_A, true).c_str() ); + name(DESC_CAP_A, true).c_str()); } else if (type == MONS_TRAPDOOR_SPIDER) { mprf("%s hides itself under the floor.", - name(DESC_CAP_A, true).c_str() ); + name(DESC_CAP_A, true).c_str()); } else if (seen_context == "surfaces" || seen_context == "bursts forth" || seen_context == "emerges") { - // The monster surfaced and submerged in the same turn without - // doing anything else. + // The monster surfaced and submerged in the same turn + // without doing anything else. interrupt_activity(AI_SEE_MONSTER, activity_interrupt_data(this, "surfaced")); } else if (crawl_state.arena) - mprf("%s submerges.", name(DESC_CAP_A, true).c_str() ); + mprf("%s submerges.", name(DESC_CAP_A, true).c_str()); } + + // Pacified monsters leave the level when they submerge. + if (mons_is_pacified(this)) + make_mons_leave_level(this); break; case ENCH_CONFUSION: @@ -6631,8 +6635,8 @@ void monsters::add_enchantment_effect(const mon_enchant &ench, bool quiet) if (is_patrolling()) { - // Enslaved monsters stop patrolling and forget their patrol point, - // they're supposed to follow you now. + // Enslaved monsters stop patrolling and forget their patrol + // point; they're supposed to follow you now. patrol_point.reset(); } if (you.can_see(this)) -- cgit v1.2.3-54-g00ecf