diff options
-rw-r--r-- | crawl-ref/source/command.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/describe.h | 5 |
3 files changed, 12 insertions, 9 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 5bd032902b..605c6de968 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -1316,8 +1316,7 @@ static bool _do_description(std::string key, std::string type, else mon.base_monster = MONS_PROGRAM_BUG; - const monsters m = mon; - describe_monsters(m); + describe_monsters(mon, true); return (false); } else 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); diff --git a/crawl-ref/source/describe.h b/crawl-ref/source/describe.h index 893fbff53c..7e661e61f1 100644 --- a/crawl-ref/source/describe.h +++ b/crawl-ref/source/describe.h @@ -87,8 +87,9 @@ void append_missile_info(std::string &description); /* *********************************************************************** * called from: command - direct * *********************************************************************** */ -void describe_monsters(const monsters &mons); -void get_monster_desc(const monsters &item, describe_info &inf); +void describe_monsters(const monsters &mons, bool force_seen = false); +void get_monster_desc(const monsters &item, describe_info &inf, + bool force_seen = false); // last updated 12 Jun 2008 {jpeg} /* *********************************************************************** |