summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-03 09:49:19 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-03 09:49:19 +0000
commit1e6c29fcdad466fe9bbae6326ef19bcad8e73707 (patch)
treed4600a8098234fc850c34323ac212e403e31a4b8 /crawl-ref/source/itemname.cc
parentbc72da21789d32c6c7cce104f51c50348997b58a (diff)
downloadcrawl-ref-1e6c29fcdad466fe9bbae6326ef19bcad8e73707.tar.gz
crawl-ref-1e6c29fcdad466fe9bbae6326ef19bcad8e73707.zip
Bug/FR 1947001: For damaging cards add "You draw card xy" to the prompt,
so you can reread it while targetting, and add a targetting subcommand "show prompt" that'll do just that. (Though you can already do that by looking at the help.) Fix plain coloured items highlighted in grey in prompts, and add two new colouring prefixes: evil_item (/draining, necromancy books, etc.) and evil_eating (cannibalism, intelligent being) that only apply for the good gods. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5455 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 96069237a5..9f2444089d 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -40,6 +40,7 @@
#include "player.h"
#include "quiver.h"
#include "randart.h"
+#include "religion.h"
#include "skills2.h"
#include "state.h"
#include "stuff.h"
@@ -2193,6 +2194,9 @@ const std::string menu_colour_item_prefix(const item_def &item)
}
}
+ if (is_good_god(you.religion) && is_evil_item(item))
+ prefixes.push_back("evil_item");
+
switch (item.base_type)
{
case OBJ_CORPSES:
@@ -2204,6 +2208,14 @@ const std::string menu_colour_item_prefix(const item_def &item)
}
// intentional fall-through
case OBJ_FOOD:
+ if ((item.base_type == OBJ_CORPSES || item.sub_type == FOOD_CHUNK)
+ && (is_good_god(you.religion) && is_player_same_species(item.plus)
+ || you.religion == GOD_ZIN
+ && mons_intel(item.plus) >= I_NORMAL))
+ {
+ prefixes.push_back("evil_eating");
+ }
+
if (item.base_type != OBJ_CORPSES
&& !can_ingest(item.base_type, item.sub_type, true, true, false)
|| you.species == SP_VAMPIRE && !mons_has_blood(item.plus)
@@ -2254,7 +2266,7 @@ const std::string get_menu_colour_prefix_tags(item_def &item,
std::string item_name = item.name(desc);
int col = menu_colour(item_name, cprf, "pickup");
- if (col != LIGHTGRAY)
+ if (col != -1)
colour = colour_to_str( col );
if (!colour.empty())