From ecdff56d9ff3bba10dc8d45994c3374e02e9454d Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 14 Jan 2008 16:48:41 +0000 Subject: Fix 1871029: really lose beogh_water_walk() upon penance -> Beogh worshipper now will fall into water and drown Fix 1871027: no autosacrifice of restricted items (!p or rune/orb) Fix 1870495: make RAP_ANGRY actually call go_berserk() from time to time Fix 1849181: fix mimic description to match item (undetected mimic) or mimic database entry (detected mimic) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3272 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/describe.cc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/describe.cc') diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 0015d51be2..0f89e244b6 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -47,6 +47,7 @@ #include "macro.h" #include "menu.h" #include "message.h" +#include "monstuff.h" #include "mon-util.h" #include "player.h" #include "randart.h" @@ -1919,8 +1920,17 @@ static std::string describe_draconian(const monsters *mon) //--------------------------------------------------------------- void describe_monsters(monsters& mons) { + // for undetected mimics describe mimicked item instead + if (mons_is_mimic(mons.type) && !(mons.flags & MF_KNOWN_MIMIC)) + { + item_def item; + const monsters *mon = &mons; + get_mimic_item( mon, item ); + describe_item(item); + return; + } + std::ostringstream description; - description << mons.name(DESC_CAP_A) << "$$"; // Note: Nearly all of the "long" descriptions have moved to @@ -1938,7 +1948,11 @@ void describe_monsters(monsters& mons) // than what we have today. // // -peterb 4/14/07 - description << getLongDescription(mons.name(DESC_PLAIN)); + + if (mons_is_mimic(mons.type) && mons.type != MONS_GOLD_MIMIC) + description << getLongDescription("mimic"); + else + description << getLongDescription(mons.name(DESC_PLAIN)); std::string symbol = ""; symbol += get_monster_data(mons.type)->showchar; @@ -1950,10 +1964,7 @@ void describe_monsters(monsters& mons) symbol_prefix += "_prefix"; description << getLongDescription(symbol_prefix); - // Now that the player has examined it, he knows it's a mimic. - if (mons_is_mimic(mons.type)) - mons.flags |= MF_KNOWN_MIMIC; - + switch (mons.type) { case MONS_ZOMBIE_SMALL: case MONS_ZOMBIE_LARGE: -- cgit v1.2.3-54-g00ecf