summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-14 16:48:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-14 16:48:41 +0000
commitecdff56d9ff3bba10dc8d45994c3374e02e9454d (patch)
tree305bfb9ff471b901915fdc21fd96e06113063d2f /crawl-ref/source/describe.cc
parentb79623e1153c424d61004bb0e5a85d3bba454c98 (diff)
downloadcrawl-ref-ecdff56d9ff3bba10dc8d45994c3374e02e9454d.tar.gz
crawl-ref-ecdff56d9ff3bba10dc8d45994c3374e02e9454d.zip
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
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc23
1 files changed, 17 insertions, 6 deletions
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: