diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-23 10:41:10 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-23 10:41:10 +0000 |
commit | 9f2e3b0645145749d8cb550a7b8df9abb91b5c10 (patch) | |
tree | d8dbf0a131c2b24253afb81408ede45409ca9a1f /crawl-ref/source/describe.cc | |
parent | c91a4805805c06664b965290541ca3eb98909c15 (diff) | |
download | crawl-ref-9f2e3b0645145749d8cb550a7b8df9abb91b5c10.tar.gz crawl-ref-9f2e3b0645145749d8cb550a7b8df9abb91b5c10.zip |
Fix 2024087: @_generic_orc_speech@.
Fix 2024560: Selective Amnesia crash.
Fix 2024701: claws/ankus not being handled in the weapon options.
Implement 2025076: give an indication of monsters seeing/sensing
invisible in their description.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6638 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r-- | crawl-ref/source/describe.cc | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 1e72b06d1f..765b17c950 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2328,9 +2328,9 @@ static std::string _describe_draconian(const monsters *mon) // Contains sketchy descriptions of every monster in the game. // //--------------------------------------------------------------- -void describe_monsters(monsters& mons) +void describe_monsters(const monsters& mons) { - // for undetected mimics describe mimicked item instead + // For undetected mimics describe mimicked item instead. if (mons_is_mimic(mons.type) && !(mons.flags & MF_KNOWN_MIMIC)) { item_def item; @@ -2433,7 +2433,7 @@ void describe_monsters(monsters& mons) break; } case MONS_PLAYER_GHOST: - body << "The apparition of " << get_ghost_description(mons) + body << "$The apparition of " << get_ghost_description(mons) << ".$"; break; @@ -2456,6 +2456,21 @@ void describe_monsters(monsters& mons) break; } + if (mons_behaviour_perceptible(&mons) && !mons_is_sleeping(&mons) + && !mons_is_confused(&mons) + && (mons_see_invis(&mons) || mons_sense_invis(&mons))) + { + if (you.invisible() && mons.foe == MHITYOU && !mons_is_fleeing(&mons)) + { + if (mons_see_invis(&mons)) + body << "$$It is watching you carefully."; + else + body << "$$It is looking in your general direction."; + } + else if (mons.foe == MHITNOT || mons_is_fleeing(&mons)) + body << "$$It seems to be peering into the shadows."; + } + std::string symbol_suffix = "__"; symbol_suffix += symbol; symbol_suffix += "_suffix"; @@ -2507,11 +2522,11 @@ void describe_monsters(monsters& mons) mouse_control mc(MOUSE_MODE_MORE); if (Options.tutorial_left) - tutorial_describe_monster(static_cast<const monsters*>(&mons)); + tutorial_describe_monster(&mons); if (getch() == 0) getch(); -} // end describe_monsters +} // Describes the current ghost's previous owner. The caller must // prepend "The apparition of" or whatever and append any trailing |