summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/clua.cc5
-rw-r--r--crawl-ref/source/debug.cc5
-rw-r--r--crawl-ref/source/effects.cc84
-rw-r--r--crawl-ref/source/food.cc17
-rw-r--r--crawl-ref/source/food.h2
-rw-r--r--crawl-ref/source/it_use2.cc18
-rw-r--r--crawl-ref/source/it_use2.h9
-rw-r--r--crawl-ref/source/item_use.cc8
-rw-r--r--crawl-ref/source/itemname.cc24
-rw-r--r--crawl-ref/source/itemprop.cc6
-rw-r--r--crawl-ref/source/itemprop.h26
-rw-r--r--crawl-ref/source/items.cc15
-rw-r--r--crawl-ref/source/makeitem.cc12
-rw-r--r--crawl-ref/source/misc.cc4
-rw-r--r--crawl-ref/source/monstuff.cc3
-rw-r--r--crawl-ref/source/newgame.cc35
-rw-r--r--crawl-ref/source/rltiles/dc-item.txt3
-rw-r--r--crawl-ref/source/rltiles/item/potion/i-blood.bmpbin2102 -> 2102 bytes
-rw-r--r--crawl-ref/source/rltiles/item/potion/i-coagulated-blood.bmpbin0 -> 2102 bytes
-rw-r--r--crawl-ref/source/shopping.cc3
-rw-r--r--crawl-ref/source/spells3.cc3
21 files changed, 176 insertions, 106 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index de0f492f7d..3b606499d4 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -1208,6 +1208,8 @@ static int l_item_subtype(lua_State *ls)
{
if (item->sub_type == POT_BLOOD)
s = "blood";
+ else if (item->sub_type == POT_BLOOD_COAGULATED)
+ s = "coagulated blood";
else if (item->sub_type == POT_WATER)
s = "water";
else if (item->sub_type == POT_PORRIDGE)
@@ -1217,7 +1219,9 @@ static int l_item_subtype(lua_State *ls)
else if (item->sub_type == POT_GAIN_STRENGTH
|| item->sub_type == POT_GAIN_DEXTERITY
|| item->sub_type == POT_GAIN_INTELLIGENCE)
+ {
s = "gain ability";
+ }
else if (item->sub_type == POT_CURE_MUTATION)
s = "cure mutation";
}
@@ -1281,6 +1285,7 @@ static int l_item_potion_type(lua_State *ls)
// need more refined handling:
// for eating habits
case POT_BLOOD:
+ case POT_BLOOD_COAGULATED:
case POT_WATER:
case POT_PORRIDGE:
// for undead
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index ae71901a4b..2e1833e795 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -1238,7 +1238,10 @@ void create_spec_object()
case OBJ_POTIONS:
if (mitm[thing_created].sub_type == POT_BLOOD)
mitm[thing_created].special = 1200;
- // fall-through
+ else if (mitm[thing_created].sub_type == POT_BLOOD_COAGULATED)
+ mitm[thing_created].special = 200;
+ // intentional fall-through
+
case OBJ_FOOD:
case OBJ_SCROLLS:
mitm[thing_created].quantity = 12;
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index a0962fd34f..03293442c4 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -23,6 +23,7 @@
#include "cloud.h"
#include "decks.h"
#include "delay.h"
+#include "describe.h"
#include "direct.h"
#include "dgnevent.h"
#include "food.h"
@@ -1543,9 +1544,14 @@ bool acquirement(object_class_type class_wanted, int agent,
else if (quant > 1)
thing.quantity = quant;
- if (thing.base_type == OBJ_POTIONS && thing.sub_type == POT_BLOOD)
- thing.special = 1200;
-
+ if (thing.base_type == OBJ_POTIONS)
+ {
+ if (thing.sub_type == POT_BLOOD)
+ thing.special = 1200;
+ else if (thing.sub_type == POT_BLOOD_COAGULATED)
+ thing.special = 200;
+ }
+
// remove curse flag from item
do_uncurse_item( thing );
@@ -2191,7 +2197,8 @@ static bool food_item_needs_time_check(item_def &item)
return false;
}
- if (item.base_type == OBJ_POTIONS && item.sub_type != POT_BLOOD)
+ if (item.base_type == OBJ_POTIONS && item.sub_type != POT_BLOOD
+ && item.sub_type != POT_BLOOD_COAGULATED)
{
return false;
}
@@ -2204,8 +2211,9 @@ static void rot_inventory_food(long time_delta)
// Update all of the corpses and food chunks in the player's
// inventory {should be moved elsewhere - dlb}
bool burden_changed_by_rot = false;
- int blood_num = 0, congealed_blood_num = 0;
- int affected_potion = -1;
+ int num_total_blood = 0, num_blood_coagulates = 0;
+ int affected_potion = -1; // stack of coagulating blood potions
+ // (only one possible at a time)
std::vector<char> rotten_items;
for (int i = 0; i < ENDOFPACK; i++)
{
@@ -2215,6 +2223,7 @@ static void rot_inventory_food(long time_delta)
if (!food_item_needs_time_check(you.inv[i]))
continue;
+ // food item timed out -> make it disappear
if ((time_delta / 20) >= you.inv[i].special)
{
if (you.inv[i].base_type == OBJ_FOOD
@@ -2249,15 +2258,16 @@ static void rot_inventory_food(long time_delta)
continue;
}
+ // if it hasn't disappeared, reduce the rotting timer
you.inv[i].special -= (time_delta / 20);
- if (you.inv[i].base_type == OBJ_POTIONS)
+ if (you.inv[i].base_type == OBJ_POTIONS
+ && you.inv[i].sub_type == POT_BLOOD)
{
- blood_num += you.inv[i].quantity;
- if (you.inv[i].special < 200
- && you.inv[i].special + (time_delta / 20) >= 200)
+ num_total_blood += you.inv[i].quantity;
+ if (you.inv[i].special < 200)
{
- congealed_blood_num += you.inv[i].quantity;
+ num_blood_coagulates += you.inv[i].quantity;
affected_potion = i;
}
}
@@ -2327,20 +2337,16 @@ static void rot_inventory_food(long time_delta)
learned_something_new(TUT_ROTTEN_FOOD);
}
- if (congealed_blood_num)
+ if (num_blood_coagulates)
{
ASSERT(affected_potion != -1);
std::string msg = "";
- // create a dummy stack of potions for message output
- item_def tmp = you.inv[affected_potion];
- tmp.quantity = blood_num; // number of all blood potions
- tmp.special = 200; // non-congealed
- if (blood_num == congealed_blood_num)
- {
- msg += tmp.name(DESC_CAP_YOUR, false);
- }
+ if (num_total_blood == num_blood_coagulates)
+ msg += you.inv[affected_potion].name(DESC_CAP_YOUR, false);
+/*
+ // this is for later, when part of a stack can coagulate
else
{
if (congealed_blood_num == 1)
@@ -2348,14 +2354,31 @@ static void rot_inventory_food(long time_delta)
else
msg += "Some of ";
- msg += tmp.name(DESC_NOCAP_YOUR, false);
+ msg += you.inv[affected_potion].name(DESC_NOCAP_YOUR, false);
}
- msg += " congeal";
- if (congealed_blood_num == 1)
+*/
+ msg += " coagulate";
+ if (num_blood_coagulates == 1)
msg += "s";
msg += ".";
mpr(msg.c_str(), MSGCH_ROTTEN_MEAT);
+
+ const bool known_blood = item_type_known(you.inv[affected_potion]);
+ you.inv[affected_potion].sub_type = POT_BLOOD_COAGULATED;
+ you.inv[affected_potion].plus
+ = you.item_description[IDESC_POTIONS][POT_BLOOD_COAGULATED];
+ const bool known_coag_blood = item_type_known(you.inv[affected_potion]);
+
+ // identify both blood and coagulated blood, if necessary
+ if (!known_blood)
+ set_ident_type( OBJ_POTIONS, POT_BLOOD, ID_KNOWN_TYPE );
+ if (!known_coag_blood)
+ {
+ set_ident_flags( you.inv[affected_potion], ISFLAG_IDENT_MASK );
+ set_ident_type( OBJ_POTIONS, POT_BLOOD_COAGULATED, ID_KNOWN_TYPE );
+ mpr(you.inv[affected_potion].name(DESC_INVENTORY, false).c_str());
+ }
}
if (burden_changed_by_rot)
@@ -2922,12 +2945,21 @@ void update_corpses(double elapsedTime)
else
{
// potions of blood have a longer rot time
- if (it.base_type == OBJ_POTIONS)
- ASSERT(rot_time < 1500);
- else
+ if (it.base_type != OBJ_POTIONS)
ASSERT(rot_time < 256);
it.special -= rot_time;
+
+ if (it.base_type == OBJ_POTIONS
+ && it.sub_type == POT_BLOOD
+ && it.special < 200)
+ {
+ ASSERT(rot_time < 1200);
+ it.sub_type = POT_BLOOD_COAGULATED;
+
+ it.plus
+ = you.item_description[IDESC_POTIONS][POT_BLOOD_COAGULATED];
+ }
}
}
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index c2d929401a..79b577551a 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -1324,16 +1324,18 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid,
if (you.species == SP_VAMPIRE)
{
- if (what_isit == OBJ_CORPSES && kindof_thing == CORPSE_BODY
- || what_isit == OBJ_POTIONS && kindof_thing == POT_BLOOD)
+ if (what_isit == OBJ_CORPSES && kindof_thing == CORPSE_BODY)
+ return true;
+
+ if (what_isit == OBJ_POTIONS && (kindof_thing == POT_BLOOD
+ || kindof_thing == POT_BLOOD_COAGULATED))
{
return (true);
}
- else
- {
- if (!suppress_msg)
- mpr("Blech - you need blood!");
- }
+
+ if (!suppress_msg)
+ mpr("Blech - you need blood!");
+
return (false);
}
@@ -1430,6 +1432,7 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid,
switch (kindof_thing)
{
case POT_BLOOD:
+ case POT_BLOOD_COAGULATED:
if (ur_herbivorous)
{
if (!suppress_msg)
diff --git a/crawl-ref/source/food.h b/crawl-ref/source/food.h
index 74d9a91992..e925531f28 100644
--- a/crawl-ref/source/food.h
+++ b/crawl-ref/source/food.h
@@ -38,7 +38,7 @@ enum food_type
FOOD_CHEESE,
FOOD_SAUSAGE, // 20
FOOD_CHUNK,
- NUM_FOODS
+ NUM_FOODS // 22
};
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);
diff --git a/crawl-ref/source/it_use2.h b/crawl-ref/source/it_use2.h
index e8f8b1c541..110a5eeaa7 100644
--- a/crawl-ref/source/it_use2.h
+++ b/crawl-ref/source/it_use2.h
@@ -42,17 +42,18 @@ enum potion_type
POT_BERSERK_RAGE,
POT_CURE_MUTATION,
POT_MUTATION,
- POT_BLOOD,
POT_RESISTANCE,
- NUM_POTIONS
+ POT_BLOOD, // 25
+ POT_BLOOD_COAGULATED,
+ NUM_POTIONS // 27
};
+
/* ***********************************************************************
* called from: ability - beam - decks - item_use - misc - religion -
* spell - spells - spells1
* *********************************************************************** */
-bool potion_effect(potion_type pot_eff, int pow);
-
+bool potion_effect(potion_type pot_eff, int pow, bool was_known = true);
/* ***********************************************************************
* called from: item_use
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 9cd3474857..b3895f384a 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3591,9 +3591,9 @@ void drink( int slot )
item_slot = slot;
else
item_slot = prompt_invent_item( "Drink which item?",
- MT_INVLIST, OBJ_POTIONS,
- true, true, true, 0, NULL,
- OPER_QUAFF );
+ MT_INVLIST, OBJ_POTIONS,
+ true, true, true, 0, NULL,
+ OPER_QUAFF );
if (item_slot == PROMPT_ABORT)
{
canned_msg( MSG_OK );
@@ -3615,7 +3615,7 @@ void drink( int slot )
player_in_a_dangerous_place() && (you.experience_level > 1);
if (potion_effect(static_cast<potion_type>(you.inv[item_slot].sub_type),
- 40))
+ 40, alreadyknown))
{
set_ident_flags( you.inv[item_slot], ISFLAG_IDENT_MASK );
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index f17b412a85..3614af1c52 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -518,6 +518,7 @@ static const char* potion_type_name(int potiontype)
case POT_CURE_MUTATION: return "cure mutation";
case POT_MUTATION: return "mutation";
case POT_BLOOD: return "blood";
+ case POT_BLOOD_COAGULATED: return "coagulated blood";
case POT_RESISTANCE: return "resistance";
default: return "bugginess";
}
@@ -1285,17 +1286,7 @@ std::string item_def::name_aux( description_level_type desc,
}
if (know_type)
{
- buff << "potion of ";
-
- // rotting corpses don't get special dbnames, so neither do !blood
- if (this->sub_type == POT_BLOOD
- && this->special < 200
- && !dbname)
- {
- buff << "congealed ";
- }
-
- buff << potion_type_name(item_typ);
+ buff << "potion of " << potion_type_name(item_typ);
}
else
{
@@ -1320,15 +1311,10 @@ std::string item_def::name_aux( description_level_type desc,
(pqual < 0 || pqual >= PDQ_NQUALS)? "bug-filled "
: potion_qualifiers[pqual];
- const char *clr =
- (pcolour < 0 || pcolour >= PDC_NCOLOURS)? "bogus"
- : potion_colours[pcolour];
+ const char *clr = (pcolour < 0 || pcolour >= PDC_NCOLOURS)?
+ "bogus" : potion_colours[pcolour];
- if (this->sub_type == POT_BLOOD && this->special < 200)
- buff << "congealed ";
- else
- buff << qualifier;
- buff << clr << " potion";
+ buff << qualifier << clr << " potion";
}
break;
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index a518f8970e..b1420070d0 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -408,6 +408,12 @@ static food_def Food_prop[NUM_FOODS] =
// be accessed correctly.
void init_properties()
{
+ // compare with enum comments, to catch changes
+ COMPILE_CHECK(NUM_ARMOURS == 37, c1);
+ COMPILE_CHECK(NUM_WEAPONS == 48, c2);
+ COMPILE_CHECK(NUM_MISSILES == 9, c3);
+ COMPILE_CHECK(NUM_FOODS == 22, c4);
+
int i;
for (i = 0; i < NUM_ARMOURS; i++)
diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h
index 1ea474ce27..e140abd15f 100644
--- a/crawl-ref/source/itemprop.h
+++ b/crawl-ref/source/itemprop.h
@@ -18,45 +18,45 @@
enum armour_type
{
- ARM_ROBE,
+ ARM_ROBE, // 0
ARM_LEATHER_ARMOUR,
ARM_RING_MAIL,
ARM_SCALE_MAIL,
ARM_CHAIN_MAIL,
- ARM_SPLINT_MAIL,
+ ARM_SPLINT_MAIL, // 5
ARM_BANDED_MAIL,
ARM_PLATE_MAIL,
ARM_SHIELD,
ARM_CLOAK,
- ARM_HELMET,
+ ARM_HELMET, // 10
ARM_CAP,
ARM_WIZARD_HAT,
ARM_GLOVES,
ARM_BOOTS,
- ARM_BUCKLER,
+ ARM_BUCKLER, // 15
ARM_LARGE_SHIELD,
ARM_DRAGON_HIDE,
ARM_TROLL_HIDE,
ARM_CRYSTAL_PLATE_MAIL,
- ARM_DRAGON_ARMOUR,
+ ARM_DRAGON_ARMOUR, // 20
ARM_TROLL_LEATHER_ARMOUR,
ARM_ICE_DRAGON_HIDE,
ARM_ICE_DRAGON_ARMOUR,
ARM_STEAM_DRAGON_HIDE,
- ARM_STEAM_DRAGON_ARMOUR,
+ ARM_STEAM_DRAGON_ARMOUR, // 25
ARM_MOTTLED_DRAGON_HIDE,
ARM_MOTTLED_DRAGON_ARMOUR,
ARM_STORM_DRAGON_HIDE,
ARM_STORM_DRAGON_ARMOUR,
- ARM_GOLD_DRAGON_HIDE,
+ ARM_GOLD_DRAGON_HIDE, // 30
ARM_GOLD_DRAGON_ARMOUR,
ARM_ANIMAL_SKIN,
ARM_SWAMP_DRAGON_HIDE,
ARM_SWAMP_DRAGON_ARMOUR,
- ARM_CENTAUR_BARDING,
+ ARM_CENTAUR_BARDING, // 35
ARM_NAGA_BARDING,
- NUM_ARMOURS
+ NUM_ARMOURS // 37
};
enum armour_property_type
@@ -259,11 +259,11 @@ enum missile_type
MI_BOLT,
MI_DART,
MI_NEEDLE,
- MI_LARGE_ROCK,
+ MI_LARGE_ROCK, // 5
MI_SLING_BULLET,
MI_JAVELIN,
MI_THROWING_NET,
- NUM_MISSILES,
+ NUM_MISSILES, // 9
MI_NONE // was MI_EGGPLANT... used for launch type detection
};
@@ -465,8 +465,8 @@ enum weapon_type
WPN_KNIFE,
WPN_BLOWGUN,
WPN_FALCHION,
- WPN_BLESSED_BLADE, // 44
- WPN_LONGBOW,
+ WPN_BLESSED_BLADE,
+ WPN_LONGBOW, // 45
WPN_LAJATANG,
WPN_BARDICHE,
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index a62a5cf589..63f2ec5318 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1352,14 +1352,6 @@ bool items_stack( const item_def &item1, const item_def &item2,
{
return false;
}
-
- // Don't stack congealed potions of blood with non-congealed ones.
- if (item1.sub_type == POT_BLOOD
- && (item1.special < 200 && item2.special >= 200
- || item2.special < 200 && item1.special >= 200))
- {
- return false;
- }
}
// The inscriptions can differ if one of them is blank, but if they
@@ -1536,7 +1528,8 @@ int move_item_to_player( int obj, int quant_got, bool quiet )
}
if (mitm[obj].base_type == OBJ_POTIONS
- && mitm[obj].sub_type == POT_BLOOD)
+ && (mitm[obj].sub_type == POT_BLOOD
+ || mitm[obj].sub_type == POT_BLOOD_COAGULATED))
{
// use average age
int age = you.inv[m].special * you.inv[m].quantity
@@ -1745,7 +1738,9 @@ bool copy_item_to_grid( const item_def &item, int x_plos, int y_plos,
{
if (items_stack( item, mitm[i] ))
{
- if (item.base_type == OBJ_POTIONS && item.sub_type == POT_BLOOD)
+ if (item.base_type == OBJ_POTIONS
+ && (item.sub_type == POT_BLOOD
+ || item.sub_type == POT_BLOOD_COAGULATED))
{
// calculate average age
int age = mitm[i].special * mitm[i].quantity
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 54586977fb..4fb6754eb9 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2258,8 +2258,7 @@ static void generate_food_item(item_def& item, int force_quant, int force_type)
}
}
-static void generate_potion_item(item_def& item, int force_type,
- int item_level)
+static void generate_potion_item(item_def& item, int force_type, int item_level)
{
item.quantity = 1;
@@ -2274,7 +2273,8 @@ static void generate_potion_item(item_def& item, int force_type,
else
{
int stype;
- do {
+ do
+ {
stype = random_choose_weighted( 1407, POT_HEAL_WOUNDS,
2815, POT_HEALING,
222, POT_CURE_MUTATION,
@@ -2301,8 +2301,9 @@ static void generate_potion_item(item_def& item, int force_type,
278, POT_DEGENERATION,
10, POT_DECAY,
0);
- } while ( (stype == POT_POISON && item_level < 1) ||
- (stype == POT_STRONG_POISON && item_level < 11) );
+ }
+ while ( stype == POT_POISON && item_level < 1
+ || stype == POT_STRONG_POISON && item_level < 11 );
if ( stype == POT_GAIN_STRENGTH || stype == POT_GAIN_DEXTERITY ||
stype == POT_GAIN_INTELLIGENCE || stype == POT_EXPERIENCE ||
@@ -2312,6 +2313,7 @@ static void generate_potion_item(item_def& item, int force_type,
}
item.sub_type = stype;
}
+
if (item.sub_type == POT_BLOOD)
item.special = 1200;
else
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 25dd385c0e..9d7cd96864 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -205,7 +205,9 @@ void split_blood_potions_into_decay( int obj, int amount )
item_def potion = you.inv[obj];
ASSERT(is_valid_item(potion));
- ASSERT(potion.base_type == OBJ_POTIONS && potion.sub_type == POT_BLOOD);
+ ASSERT(potion.base_type == OBJ_POTIONS);
+ ASSERT(potion.sub_type == POT_BLOOD
+ || potion.sub_type == POT_BLOOD_COAGULATED);
ASSERT(amount <= potion.quantity);
if (amount <= 0)
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index d31395218e..84c1367556 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -246,7 +246,8 @@ bool curse_an_item( bool decay_potions )
// Potions of blood are vital to vampires, so make an exception for
// for them. (Come to think of it, this would work nicely for all
// other potion types as well.)
- if (you.inv[item].sub_type == POT_BLOOD)
+ if (you.inv[item].sub_type == POT_BLOOD
+ || you.inv[item].sub_type == POT_BLOOD_COAGULATED)
{
int amount = random2(you.inv[item].quantity) + 1;
split_blood_potions_into_decay(item, amount);
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:
diff --git a/crawl-ref/source/rltiles/dc-item.txt b/crawl-ref/source/rltiles/dc-item.txt
index a5689a47fa..b457665940 100644
--- a/crawl-ref/source/rltiles/dc-item.txt
+++ b/crawl-ref/source/rltiles/dc-item.txt
@@ -514,8 +514,9 @@ i-strong-poison POT_STRONG_POISON
i-berserk-rage POT_BERSERK_RAGE
i-cure-mutation POT_CURE_MUTATION
i-mutation POT_MUTATION
-i-blood POT_BLOOD
i-resistance POT_RESISTANCE
+i-blood POT_BLOOD
+i-coagulated-blood POT_BLOOD_COAGULATED
%back none
%rim 1
diff --git a/crawl-ref/source/rltiles/item/potion/i-blood.bmp b/crawl-ref/source/rltiles/item/potion/i-blood.bmp
index 0f9db052e6..43a837cde2 100644
--- a/crawl-ref/source/rltiles/item/potion/i-blood.bmp
+++ b/crawl-ref/source/rltiles/item/potion/i-blood.bmp
Binary files differ
diff --git a/crawl-ref/source/rltiles/item/potion/i-coagulated-blood.bmp b/crawl-ref/source/rltiles/item/potion/i-coagulated-blood.bmp
new file mode 100644
index 0000000000..0f9db052e6
--- /dev/null
+++ b/crawl-ref/source/rltiles/item/potion/i-coagulated-blood.bmp
Binary files differ
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index f80d11d5fd..6629a2a089 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -1137,6 +1137,7 @@ unsigned int item_value( item_def item, bool ident )
case POT_RESTORE_ABILITIES:
valued += 50;
break;
+ case POT_BLOOD:
case POT_BERSERK_RAGE:
case POT_HEAL_WOUNDS:
valued += 30;
@@ -1145,11 +1146,11 @@ unsigned int item_value( item_def item, bool ident )
case POT_SPEED:
valued += 25;
break;
- case POT_BLOOD:
case POT_HEALING:
case POT_LEVITATION:
valued += 20;
break;
+ case POT_BLOOD_COAGULATED:
case POT_PORRIDGE:
valued += 10;
break;
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 9a1b7c9cfc..50e6970e7b 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -332,7 +332,8 @@ void sublimation(int power)
dec_inv_item_quantity( wielded, 1 );
}
else if (you.inv[wielded].base_type == OBJ_POTIONS
- && you.inv[wielded].sub_type == POT_BLOOD)
+ && (you.inv[wielded].sub_type == POT_BLOOD
+ || you.inv[wielded].sub_type == POT_BLOOD_COAGULATED))
{
mprf("The blood within %s frothes and boils.",
you.inv[wielded].quantity == 1 ? "the flask you are holding"