diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-05 10:56:46 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-05 10:56:46 +0000 |
commit | 85699d8241f73ca404e215fac0e6e1883ee7fcdf (patch) | |
tree | 95595c1f22cae5bfc48d022317d61d5c769b4251 /crawl-ref/source/describe.cc | |
parent | f847b239329f96f86df53a98b8675e1fc818e7b4 (diff) | |
download | crawl-ref-85699d8241f73ca404e215fac0e6e1883ee7fcdf.tar.gz crawl-ref-85699d8241f73ca404e215fac0e6e1883ee7fcdf.zip |
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
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r-- | crawl-ref/source/describe.cc | 13 |
1 files changed, 8 insertions, 5 deletions
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); |