summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-13 15:32:03 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-13 15:32:03 +0000
commit14548892e26d872d3e51d7e6a4ba05deae29d4b0 (patch)
tree6566e73489ff2a31587830a363f3e2bba9989a39 /crawl-ref/source/effects.cc
parent2a9689ff31d9b420120db477c7121e6d3fa114f3 (diff)
downloadcrawl-ref-14548892e26d872d3e51d7e6a4ba05deae29d4b0.tar.gz
crawl-ref-14548892e26d872d3e51d7e6a4ba05deae29d4b0.zip
If the player is a vampire, and something in their inventory is rotting,
display the message for a level 1 or level 2 saprovore. (They shouldn't be touchy about rotting meat because they don't eat.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3622 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 22428a647f..3b3782c087 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -2236,15 +2236,17 @@ static void rot_inventory_food(long time_delta)
if (!rotten_items.empty())
{
std::string msg = "";
-
+
// Races that can't smell don't care, and trolls are stupid and
// don't care.
if (player_can_smell() && you.species != SP_TROLL)
{
int temp_rand = 0; // Grr.
- switch (you.mutation[MUT_SAPROVOROUS])
+ int level = (you.species == SP_VAMPIRE) ? 1 : you.mutation[MUT_SAPROVOROUS];
+
+ switch (level)
{
- // level 1 and level 2 saprovores aren't so touchy
+ // level 1 and level 2 saprovores, as well as vampires, aren't so touchy
case 1:
case 2:
temp_rand = random2(8);
@@ -2274,7 +2276,7 @@ static void rot_inventory_food(long time_delta)
}
else if (Options.list_rotten)
msg = "Something in your inventory has become rotten.";
-
+
if (Options.list_rotten)
{
mprf(MSGCH_ROTTEN_MEAT, "%s (slot%s %s)",
@@ -2285,7 +2287,7 @@ static void rot_inventory_food(long time_delta)
}
else if (!msg.empty())
mpr(msg.c_str(), MSGCH_ROTTEN_MEAT);
-
+
learned_something_new(TUT_ROTTEN_FOOD);
}
if (burden_changed_by_rot)