summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc25
1 files changed, 20 insertions, 5 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 8a4ffc4942..ced682c33f 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -243,12 +243,27 @@ bool curse_an_item( bool decay_potions )
/* don't change you.inv_special (just for fun) */
if (you.inv[item].base_type == OBJ_POTIONS)
{
- // Xom is amused by useful potions being ruined.
- if (item_value(you.inv[item], true) / you.inv[item].quantity > 2)
- xom_is_stimulated(32 * you.inv[item].quantity);
+ // 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)
+ {
+ int amount = random2(you.inv[item].quantity) + 1;
+ split_blood_potions_into_decay(item, amount);
+
+ // Xom is amused if this happens to thirsty vampires
+ if (you.species == SP_VAMPIRE && you.hunger_state <= HS_HUNGRY)
+ xom_is_stimulated(32 * amount);
+ }
+ else
+ {
+ // Xom is amused by useful potions being ruined.
+ if (item_value(you.inv[item], true) / you.inv[item].quantity > 2)
+ xom_is_stimulated(32 * you.inv[item].quantity);
- you.inv[item].sub_type = POT_DECAY;
- unset_ident_flags( you.inv[item], ISFLAG_IDENT_MASK ); // all different
+ you.inv[item].sub_type = POT_DECAY;
+ unset_ident_flags( you.inv[item], ISFLAG_IDENT_MASK ); // all different
+ }
}
else
do_curse_item( you.inv[item] );