diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-10 16:07:30 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-10 16:07:30 +0000 |
commit | 9112dd81fb46fbeeec6f46fe40ecaf1bcae42da3 (patch) | |
tree | 42a9689b56051fccb17889328a4a542e6351cc64 /crawl-ref/source/direct.cc | |
parent | 4fdf65ba2dcb33d11e73742fe31ce4f85a27baf2 (diff) | |
download | crawl-ref-9112dd81fb46fbeeec6f46fe40ecaf1bcae42da3.tar.gz crawl-ref-9112dd81fb46fbeeec6f46fe40ecaf1bcae42da3.zip |
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
Diffstat (limited to 'crawl-ref/source/direct.cc')
-rw-r--r-- | crawl-ref/source/direct.cc | 17 |
1 files changed, 17 insertions, 0 deletions
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<coord_def> 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: |