diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-16 02:45:50 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-16 02:45:50 +0000 |
commit | 8e48f4a3c0706000a11fdeab803df67ceaf72a3c (patch) | |
tree | bd6c595467b028cb9c0cd0ab1d0206fa350e98b4 | |
parent | 69f34130bc2442fd59b5870e2d864c4f72f0d2e2 (diff) | |
download | crawl-ref-8e48f4a3c0706000a11fdeab803df67ceaf72a3c.tar.gz crawl-ref-8e48f4a3c0706000a11fdeab803df67ceaf72a3c.zip |
Fix bug 2430400: god-gift randart books having bad names.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7842 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/dat/database/randname.txt | 12 | ||||
-rw-r--r-- | crawl-ref/source/effects.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/spl-book.cc | 10 |
3 files changed, 19 insertions, 9 deletions
diff --git a/crawl-ref/source/dat/database/randname.txt b/crawl-ref/source/dat/database/randname.txt index f699730a98..3a4cb66c20 100644 --- a/crawl-ref/source/dat/database/randname.txt +++ b/crawl-ref/source/dat/database/randname.txt @@ -840,7 +840,7 @@ Magic Theurgy -the Arcane Arts +The Arcane Arts Rites and Rhymes @@ -861,15 +861,15 @@ Bewitchment %%%% level book -"@book_magic@ 101" +@book_magic@ 101 -"Easy @book_magic@" +Easy @book_magic@ -"@book_magic@ in Simple Steps" +@book_magic@ in Simple Steps -"Thorough Guide to @book_magic@" +Thorough Guide to @book_magic@ -"Last Secrets of @book_magic@" +Last Secrets of @book_magic@ %%%% # Book name should be set in make_book_level_randart() or # make_book_theme_randart(), so if this gets picked there's a bug. diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index d66b9d3d45..401ac27c9e 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1820,9 +1820,11 @@ bool acquirement(object_class_type class_wanted, int agent, thing.inscription = "god gift"; if (is_random_artefact(thing)) { - if (!is_unrandom_artefact(thing)) + if (!is_unrandom_artefact(thing) + && !thing.base_type == OBJ_BOOKS) { - // Give another name that takes god gift into account. + // Give another name that takes god gift into account; + // artefact books already do that. thing.props["randart_name"].get_string() = artefact_name(thing, false); } diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index 553f8341fb..377129fbe1 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -1944,7 +1944,15 @@ bool make_book_level_randart(item_def &book, int level, for (int i = 0; i < SPELLBOOK_SIZE; i++) spell_vec[i] = (long) chosen_spells[i]; - set_randart_name(book, getRandNameString("level book")); + std::string name = "\""; + + if (god != GOD_NO_GOD) + name += god_name(god, false) + "'s "; + + name += getRandNameString("level book"); + name += '"'; + + set_randart_name(book, name); return (true); } |