From 85699d8241f73ca404e215fac0e6e1883ee7fcdf Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 5 Mar 2009 10:56:46 +0000 Subject: Fix [2664479]: handle monster lookups from ?/M better. Handle mimics better. Note that the monster pane will unify two mimics if you see both at once; I think this is not because of what I just changed but it might be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9336 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/describe.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/describe.cc') diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 69255be804..1f0f006e4c 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2711,10 +2711,10 @@ static std::string _monster_stat_description(const monsters& mon) return result.str(); } -void get_monster_desc(const monsters& mons, describe_info &inf) +void get_monster_desc(const monsters& mons, describe_info &inf, bool force_seen) { // For undetected mimics describe mimicked item instead. - if (mons_is_mimic(mons.type) && !(mons.flags & MF_KNOWN_MIMIC)) + if (!force_seen && mons_is_unknown_mimic(&mons)) { item_def item; get_mimic_item(&mons, item); @@ -2724,9 +2724,12 @@ void get_monster_desc(const monsters& mons, describe_info &inf) inf.title = mons.full_name(DESC_CAP_A, true); - std::string db_name = mons.base_name(DESC_DBNAME); + std::string db_name = mons.base_name(DESC_DBNAME, force_seen); if (mons_is_mimic(mons.type) && mons.type != MONS_GOLD_MIMIC) + { db_name = "mimic"; + inf.title = "A mimic"; + } // Don't get description for player ghosts. if (mons.type != MONS_PLAYER_GHOST) @@ -2914,10 +2917,10 @@ void get_monster_desc(const monsters& mons, describe_info &inf) #endif } -void describe_monsters(const monsters& mons) +void describe_monsters(const monsters& mons, bool force_seen) { describe_info inf; - get_monster_desc(mons, inf); + get_monster_desc(mons, inf, force_seen); print_description(inf); mouse_control mc(MOUSE_MODE_MORE); -- cgit v1.2.3-54-g00ecf