summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-28 00:04:30 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-28 00:04:30 +0000
commitde8f4030ab16a4d839e67096aa45c89de5b0d9ab (patch)
tree18290573c22137d17c4738045a4d524e9c8be1fc /crawl-ref/source/message.cc
parentd492483ffce1744f3bfb0812c6aef470a7aa36c6 (diff)
downloadcrawl-ref-de8f4030ab16a4d839e67096aa45c89de5b0d9ab.tar.gz
crawl-ref-de8f4030ab16a4d839e67096aa45c89de5b0d9ab.zip
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
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r--crawl-ref/source/message.cc9
1 files changed, 6 insertions, 3 deletions
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<message_colour_mapping>& mcm =
- Options.message_colour_mappings;
+ const std::vector<message_colour_mapping>& mcm
+ = Options.message_colour_mappings;
typedef std::vector<message_colour_mapping>::const_iterator mcmci;
for ( mcmci ci = mcm.begin(); ci != mcm.end(); ++ci )