From 1e6c29fcdad466fe9bbae6326ef19bcad8e73707 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 3 Jun 2008 09:49:19 +0000 Subject: 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 --- crawl-ref/source/itemname.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/itemname.cc') 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()) -- cgit v1.2.3-54-g00ecf