summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-17 23:14:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-17 23:14:03 +0000
commiteaebdf783c9f82f01854421b9825988824410684 (patch)
tree230ee9fa1d60c27e0672c931d2e9133732593c7b /crawl-ref/source/makeitem.cc
parent553b70383a7a4b48bf6483a91badab15ca5cd0fb (diff)
downloadcrawl-ref-eaebdf783c9f82f01854421b9825988824410684.tar.gz
crawl-ref-eaebdf783c9f82f01854421b9825988824410684.zip
Fix 2442018: excessive tomes of destruction.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7860 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index df03e7258d..98475447a5 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2420,7 +2420,8 @@ static void _generate_book_item(item_def& item, int allow_uniques,
if (!one_chance_in(100)
&& x_chance_in_y(book_rarity(item.sub_type)-1, item_level+1))
{
- item.sub_type = BOOK_DESTRUCTION; // continue trying
+ // If this book is really rare for this depth, continue trying.
+ continue;
}
}
while (book_rarity(item.sub_type) == 100);