summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-18 17:56:33 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-18 17:56:33 +0000
commit468034182154a782ee368da983882595b50de550 (patch)
tree9a908659d8f5100443b09c0f2e85512271c94a61 /crawl-ref/source/ouch.cc
parentd6ed0679ee7d39d2bf597cbe92e4aebbcf2d0793 (diff)
downloadcrawl-ref-468034182154a782ee368da983882595b50de550.tar.gz
crawl-ref-468034182154a782ee368da983882595b50de550.zip
Apply my commits r6601, r6604 and r6605 to the 0.4 branch, excluding
purely cosmetic changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6606 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 3a49f7aee3..b9e509eead 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -562,7 +562,11 @@ void expose_items_to_element(beam_type flavour, int x, int y, int strength)
if (x_chance_in_y(strength, 100))
{
num_dest++;
- dec_mitm_item_quantity(si->index(), 1);
+ if (!dec_mitm_item_quantity(si->index(), 1)
+ && is_blood_potion(*si))
+ {
+ remove_oldest_blood_potion(*si);
+ }
}
}
}