summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 00:54:59 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 00:54:59 +0000
commitdaef1e0a3b4ec37556eeedfcf0ed13ed71a3cd9d (patch)
treec78df1819f8346c08b44375642f815697dadab11
parent316e842f2d3fa51ae74cfed90d6f9d17a8b043ee (diff)
downloadcrawl-ref-daef1e0a3b4ec37556eeedfcf0ed13ed71a3cd9d.tar.gz
crawl-ref-daef1e0a3b4ec37556eeedfcf0ed13ed71a3cd9d.zip
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
-rw-r--r--crawl-ref/source/delay.cc8
-rw-r--r--crawl-ref/source/mon-util.cc5
2 files changed, 13 insertions, 0 deletions
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)
{