diff options
author | Samuel Bronson <naesten@gmail.com> | 2013-12-21 23:08:37 -0500 |
---|---|---|
committer | Samuel Bronson <naesten@gmail.com> | 2013-12-21 23:08:37 -0500 |
commit | 437c10e4b4cb5c5413c736b0bedae11b8a9ae5e4 (patch) | |
tree | 243a902ee9471f584aa55581ce05a6c91e78b1ce /crawl-ref/source/mon-info.cc | |
parent | c53f02819cf667c9654aa5561fc81ffc7aab0e01 (diff) | |
download | crawl-ref-437c10e4b4cb5c5413c736b0bedae11b8a9ae5e4.tar.gz crawl-ref-437c10e4b4cb5c5413c736b0bedae11b8a9ae5e4.zip |
Show correct descriptions for sensed monsters (#7896)
Thansk to Cedor, Basil and |amethyst for their help in deciphering how
monster_info for detected monsters is supposed to work.
Diffstat (limited to 'crawl-ref/source/mon-info.cc')
-rw-r--r-- | crawl-ref/source/mon-info.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc index 0980a62a5f..56de48c5cc 100644 --- a/crawl-ref/source/mon-info.cc +++ b/crawl-ref/source/mon-info.cc @@ -774,6 +774,9 @@ string monster_info::db_name() const ignore_flags); } + if (type == MONS_SENSED) + return get_monster_data(base_type)->name; + return get_monster_data(type)->name; } @@ -793,6 +796,7 @@ string monster_info::_core_name() const #endif case MONS_SPECTRAL_THING: case MONS_PILLAR_OF_SALT: case MONS_CHIMERA: + case MONS_SENSED: nametype = base_type; break; @@ -911,6 +915,9 @@ string monster_info::common_name(description_level_type desc) const if (type == MONS_SPECTRAL_THING && !is(MB_NAME_ZOMBIE) && !nocore) ss << "spectral "; + if (type == MONS_SENSED && !mons_is_sensed(base_type)) + ss << "sensed "; + if (type == MONS_BALLISTOMYCETE) ss << (number ? "active " : ""); |