summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-21 19:52:14 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-21 19:52:14 +0000
commit6fe9d2d6362915f3ab999971c87dd2f4d09e905f (patch)
tree3815ce19535e80e61c54ab53234616c885688d2a /crawl-ref/source/describe.cc
parent2846de53110f56c1732a3e9b2ab71b396af3c5a0 (diff)
downloadcrawl-ref-6fe9d2d6362915f3ab999971c87dd2f4d09e905f.tar.gz
crawl-ref-6fe9d2d6362915f3ab999971c87dd2f4d09e905f.zip
* Tweak spell number of randart books some more.
* Loosen restrictions on spell levels of unknown spells for normal books, so there are more matches even for untrained schools. * Add a new option dump_book_spells that, if set to true (default), will dump the spells even for non-randart book. Useful if you don't know the books' contents by heart and want to know spells at your disposal without checking some spoilers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9143 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 197de44d75..6147b21e21 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1632,7 +1632,7 @@ void append_spells(std::string &desc, const item_def &item)
desc += "$$Spells Type Level$";
- for (int j = 0; j < 8; j++)
+ for (int j = 0; j < SPELLBOOK_SIZE; j++)
{
spell_type stype = which_spell_in_book(item, j);
if (stype == SPELL_NO_SPELL)
@@ -1861,8 +1861,11 @@ std::string get_item_description( const item_def &item, bool verbose,
description << "$This book is beyond your current level of "
"understanding.";
}
- else if (!verbose && is_random_artefact( item ))
+ else if (!verbose
+ && (Options.dump_book_spells || is_random_artefact(item)))
{
+ mprf("book: %s, option: %s", item.name(DESC_PLAIN).c_str(),
+ Options.dump_book_spells ? "true" : "false");
append_spells( desc, item );
if (desc.empty())
need_extra_line = false;