From daef1e0a3b4ec37556eeedfcf0ed13ed71a3cd9d Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sat, 3 Jan 2009 00:54:59 +0000 Subject: Fire an AI_SEE_MONSTER activity interrupt if a non-safe monster un-submerges while the player is running, and provide a message if it's a trapdoor spider doing it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8147 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/delay.cc | 8 ++++++++ crawl-ref/source/mon-util.cc | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index e3fef159d0..67dd35a979 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -1806,6 +1806,14 @@ inline static bool _monster_warning(activity_interrupt_type ai, } else if (at.context.find("emerges") != std::string::npos) text += " emerges from the water."; + else if (at.context.find("leaps out") != std::string::npos) + { + if (mon->type == MONS_TRAPDOOR_SPIDER) + text += " leaps out from its hiding place under the " + "floor!"; + else + text += " leaps out from hiding!"; + } else text += " comes into view."; diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 58f1d51887..1965307dc2 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -6475,6 +6475,11 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet) seen_context = "bursts forth"; else seen_context = "surfaces"; + + // and fire activity interrupts + interrupt_activity(AI_SEE_MONSTER, + activity_interrupt_data(this, + seen_context)); } else if (!quiet) { -- cgit v1.2.3-54-g00ecf