summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-26 16:31:22 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-26 16:31:22 +0000
commitc96ad74301106bbc2163c96ae96590c23feb4a59 (patch)
treef75dc7bee9ed7ebe65990b1a01ce2a61e243f9f9 /crawl-ref/source/newgame.cc
parent2f6db23aaa3fcd1984982e0962151ef2003a9b4a (diff)
downloadcrawl-ref-c96ad74301106bbc2163c96ae96590c23feb4a59.tar.gz
crawl-ref-c96ad74301106bbc2163c96ae96590c23feb4a59.zip
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
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r--crawl-ref/source/newgame.cc35
1 files changed, 32 insertions, 3 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 7e4ee7bb53..bbe57dbb40 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -736,16 +736,42 @@ static void initialise_branch_depths()
branches[BRANCH_TOMB].startdepth = random_range(2, 3);
}
+static int _get_random_coagulated_blood_desc()
+{
+ potion_description_qualifier_type qualifier = PDQ_NONE;
+ switch (random2(4))
+ {
+ case 0:
+ qualifier = PDQ_GLUGGY;
+ break;
+ case 1:
+ qualifier = PDQ_LUMPY;
+ break;
+ case 2:
+ qualifier = PDQ_SEDIMENTED;
+ break;
+ case 3:
+ qualifier = PDQ_VISCOUS;
+ break;
+ }
+
+ potion_description_colour_type colour = (coinflip() ? PDC_RED : PDC_BROWN);
+
+ return PDESCQ(qualifier, colour);
+}
+
static void initialise_item_descriptions()
{
// must remember to check for already existing colours/combinations
you.item_description.init(255);
- you.item_description[IDESC_POTIONS][POT_PORRIDGE] =
- PDESCQ(PDQ_GLUGGY, PDC_WHITE);
+ you.item_description[IDESC_POTIONS][POT_PORRIDGE]
+ = PDESCQ(PDQ_GLUGGY, PDC_WHITE);
you.item_description[IDESC_POTIONS][POT_WATER] = PDESCS(PDC_CLEAR);
you.item_description[IDESC_POTIONS][POT_BLOOD] = PDESCS(PDC_RED);
+ you.item_description[IDESC_POTIONS][POT_BLOOD_COAGULATED]
+ = _get_random_coagulated_blood_desc();
// The order here must match that of IDESC in describe.h
// (I don't really know about scrolls, which is why I left the height value.)
@@ -2331,8 +2357,11 @@ static void give_basic_mutations(species_type speci)
static void give_basic_knowledge(job_type which_job)
{
if (you.species == SP_VAMPIRE)
+ {
set_ident_type( OBJ_POTIONS, POT_BLOOD, ID_KNOWN_TYPE );
-
+ set_ident_type( OBJ_POTIONS, POT_BLOOD_COAGULATED, ID_KNOWN_TYPE );
+ }
+
switch (which_job)
{
case JOB_PRIEST: