From 9112dd81fb46fbeeec6f46fe40ecaf1bcae42da3 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 10 Mar 2008 16:07:30 +0000 Subject: Fix 1920778: mons_open_door() not respecting gates Also fixed several cases where secret doors would be described as rock walls regardless of their actual type, and gates are now described correctly as well. This means that viewing them also prints, e.g. "An open gate." or "A closed large door." without further information since there are no database entries for these specific cases. (Not the entries for simple doors are any more exhaustive.) Fix 1910729: Yredelmnul's Drain Life not waking monsters, using ncampion's solution. Also default greedy_explore to true. (FR 1911112) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3584 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/direct.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crawl-ref/source/direct.cc') diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index d46ad84239..d59f2a2f9b 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -1429,6 +1429,9 @@ static void describe_feature(int mx, int my, bool oos) return; dungeon_feature_type grid = grd[mx][my]; + if ( grid == DNGN_SECRET_DOOR ) + grid = grid_secret_door_appearance(mx, my); + std::string desc = feature_description(grid); if (desc.length()) { @@ -1810,6 +1813,20 @@ std::string feature_description(int mx, int my, bool bloody, if ( grid == DNGN_SECRET_DOOR ) grid = grid_secret_door_appearance(mx, my); + if ( grid == DNGN_OPEN_DOOR || grid == DNGN_CLOSED_DOOR ) + { + std::string desc = (grid == DNGN_OPEN_DOOR) ? "open " : "closed "; + + std::set all_door; + _find_connected_identical(coord_def(mx, my), grd[mx][my], all_door); + desc += get_door_noun(all_door.size()).c_str(); + + if (bloody) + desc += ", spattered with blood"; + + return feature_do_grammar(dtype, add_stop, false, desc); + } + switch (grid) { case DNGN_TRAP_MECHANICAL: -- cgit v1.2.3-54-g00ecf