diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-20 22:53:45 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-20 22:53:45 +0000 |
commit | 2846de53110f56c1732a3e9b2ab71b396af3c5a0 (patch) | |
tree | 70179e2b3f1b9a30606cd17a83da7b62b70d7a1f /crawl-ref/source/spl-book.cc | |
parent | 1fd9aa7314df4f54f5e3ca2240ee564d94a16508 (diff) | |
download | crawl-ref-2846de53110f56c1732a3e9b2ab71b396af3c5a0.tar.gz crawl-ref-2846de53110f56c1732a3e9b2ab71b396af3c5a0.zip |
* Lower randart probabilities for book acquirement.
* Lower number of spells in randart books.
* Fix acquirement generating manuals of (null).
* Lower chance of randart books being named after Pan lords.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9142 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-book.cc')
-rw-r--r-- | crawl-ref/source/spl-book.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index a70637fb47..4f0ee38e99 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -2440,6 +2440,7 @@ bool make_book_theme_randart(item_def &book, int disc1, int disc2, disc2 = 1 << max2; int highest_level = 0; + int lowest_level = 10; bool all_spells_disc1 = true; // Finally fill the spell vector. @@ -2449,6 +2450,8 @@ bool make_book_theme_randart(item_def &book, int disc1, int disc2, int diff = spell_difficulty(chosen_spells[i]); if (diff > highest_level) highest_level = diff; + else if (diff < lowest_level) + lowest_level = diff; if (all_spells_disc1 && is_valid_spell(chosen_spells[i]) && !spell_typematch( chosen_spells[i], disc1 )) @@ -2474,7 +2477,8 @@ bool make_book_theme_randart(item_def &book, int disc1, int disc2, owner = god_name(god, false); else if (god_gift && one_chance_in(3) || one_chance_in(5)) { - bool highlevel = (highest_level >= 6 + random2(3)); + bool highlevel = (highest_level >= 7 + random2(3) + && lowest_level > 1); if (disc1 != disc2) { |