From de8f4030ab16a4d839e67096aa45c89de5b0d9ab Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 28 Mar 2008 00:04:30 +0000 Subject: Clean up vampire biting attack, and call the new method whenever a vampire successfully stabs one of those walking blood replenishers. All in all, vampires will bite monsters that don't yield blood less often (1/3 chance), though their overall biting chance has been slightly increases, and much so when stabbing. Weapons of vampiricism are now a distinct case, so vampiric biting (that also is signified by SPWPN_VAMPIRICISM, occasionally) consistently doesn't check for life protection (though that might be added) and instead always respects the mons_has_blood checks. Also, food messages ("You are very hungry.") are now displayed in green if your food level has increased. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3904 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/message.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/message.cc') diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 1509bf7a5c..754d7047ba 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -266,7 +266,10 @@ int channel_to_colour( msg_channel_type channel, int param ) break; case MSGCH_FOOD: - ret = YELLOW; + if (param) // positive change + ret = GREEN; + else + ret = YELLOW; break; case MSGCH_INTRINSIC_GAIN: @@ -589,8 +592,8 @@ static int prepare_message(const std::string& imsg, msg_channel_type channel, int colour = channel_to_colour( channel, param ); - const std::vector& mcm = - Options.message_colour_mappings; + const std::vector& mcm + = Options.message_colour_mappings; typedef std::vector::const_iterator mcmci; for ( mcmci ci = mcm.begin(); ci != mcm.end(); ++ci ) -- cgit v1.2.3-54-g00ecf