summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/food.cc6
-rw-r--r--crawl-ref/source/it_use2.cc17
2 files changed, 12 insertions, 11 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 64f46dc71e..aa654a761d 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -1686,7 +1686,7 @@ void chunk_nutrition_message(int nutrition)
mpr("That was not very filling.");
}
-int apply_herbivore_nutrition_effects(int nutrition)
+static int _apply_herbivore_nutrition_effects(int nutrition)
{
int how_herbivorous = player_mutation_level(MUT_HERBIVOROUS);
@@ -1709,7 +1709,7 @@ static int _chunk_nutrition(bool likes_chunks)
if (likes_chunks || you.hunger_state < HS_SATIATED)
{
return (likes_chunks ? nutrition
- : apply_herbivore_nutrition_effects(nutrition));
+ : _apply_herbivore_nutrition_effects(nutrition));
}
const int gourmand =
@@ -1724,7 +1724,7 @@ static int _chunk_nutrition(bool likes_chunks)
gourmand, nutrition, effective_nutrition, epercent);
#endif
- return (apply_herbivore_nutrition_effects(effective_nutrition));
+ return (_apply_herbivore_nutrition_effects(effective_nutrition));
}
static void _say_chunk_flavour(bool likes_chunks)
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index b162f5a1fd..935f670a7c 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -98,28 +98,29 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
}
else
{
- const bool ur_herbivorous =
- player_mutation_level(MUT_HERBIVOROUS) == 3;
+ int value = 100;
+ if (pot_eff == POT_BLOOD)
+ value += 100;
- int nutrition = apply_herbivore_nutrition_effects(200);
+ const int herbivorous = player_mutation_level(MUT_HERBIVOROUS);
- if (!ur_herbivorous && player_likes_chunks(true))
+ if (herbivorous < 3 && player_likes_chunks(true))
{
// Likes it.
mpr("This tastes like blood.");
- lessen_hunger(nutrition, true);
+ lessen_hunger(value, true);
}
else
{
mpr("Blech - this tastes like blood!");
- if (!ur_herbivorous && one_chance_in(3))
- lessen_hunger(nutrition, true);
- else
+ if (x_chance_in_y(herbivorous + 1, 4))
{
// Full herbivores always become ill from blood.
disease_player(50 + random2(100));
xom_is_stimulated(32);
}
+ else
+ lessen_hunger(value, true);
}
}
did_god_conduct(DID_DRINK_BLOOD, 1 + random2(3), was_known);