From c96ad74301106bbc2163c96ae96590c23feb4a59 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 26 Mar 2008 16:31:22 +0000 Subject: Split potions of blood and potions of coagulated blood into two distinct potion types to make stacking easier. Coagulated blood is not created randomly, and aging potions of blood turn into potions of coagulated blood, so none of that changed. Well, except the name: congealed -> coagulated. This also means that they now have distinct descriptions, though seeing potions in your inventory coagulate will identify both of them. And I checked: potions in shops will coagulate as well and disappear. Coagulated blood is cheaper, but if you need it you won't want to wait around, right? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3884 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/it_use2.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/it_use2.cc') diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index 39993815a1..26a9c2c091 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -44,10 +44,9 @@ #include "xom.h" // From an actual potion, pow == 40 -- bwr -bool potion_effect( potion_type pot_eff, int pow ) +bool potion_effect( potion_type pot_eff, int pow, bool was_known ) { bool effect = true; // current behaviour is all potions id on quaffing - bool was_known = item_type_known(OBJ_POTIONS, (int) pot_eff); if (pow > 150) pow = 150; @@ -88,13 +87,14 @@ bool potion_effect( potion_type pot_eff, int pow ) break; case POT_BLOOD: + case POT_BLOOD_COAGULATED: if (you.species == SP_VAMPIRE) { - const char* names[] = { "human", "rat", "goblin", - "elf", "goat", "sheep", - "sheep", "gnoll", "yak" }; - - mprf("Yummy - fresh %s blood!", RANDOM_ELEMENT(names)); + if (pot_eff == POT_BLOOD) + mpr("Yummy - fresh blood!"); + else // coagulated + mpr("This tastes delicious!"); + lessen_hunger(1000, true); // healing depends on hunger @@ -126,8 +126,10 @@ bool potion_effect( potion_type pot_eff, int pow ) if (!you.mutation[MUT_HERBIVOROUS] && one_chance_in(3)) lessen_hunger(100, true); else + { disease_player( 50 + random2(100) ); - xom_is_stimulated(32); + xom_is_stimulated(32); + } } } did_god_conduct(DID_DRINK_BLOOD, 1 + random2(3), was_known); -- cgit v1.2.3-54-g00ecf