From e3e729a0259c4c89296ac368556563ca096cd3e9 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 20 Nov 2007 12:36:35 +0000 Subject: A few changes to shafts: * shafts cannot be created above level 3 in the main dungeon * intelligent fleeing monsters will jump into shafts -> this will reveal the shaft to the player * rename "shaft trap" to "shaft" * ask for confirmation before stepping into a shaft Also finally fix colour from post-death inventory bleeding into the highscore and prompt. (This has always bugged me.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2884 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 7e57b7433b..43e69cbf96 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -4968,7 +4968,11 @@ static bool is_trap_safe(const monsters *monster, const int trap_x, const trap_struct &trap = env.trap[trap_at_xy(trap_x,trap_y)]; if (trap.type == TRAP_SHAFT && monster->will_trigger_shaft()) + { + if (mons_is_fleeing(monster) && intel >= I_NORMAL) + return (true); return (false); + } // Monsters are not afraid of non-mechanical traps. XXX: If we add // any non-mechanical traps that can damage monsters, must add -- cgit v1.2.3-54-g00ecf