From ed6970cf64309f5b1741304aa1c828cc0319b00d Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 4 Jun 2009 19:20:31 +0000 Subject: Add various fixes to the new spell memorization messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9890 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-book.cc | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'crawl-ref/source/spl-book.cc') diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index 39db6c5a9a..8f44dad1f7 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -1334,7 +1334,7 @@ static std::vector _get_mem_list() if (spells_in_book == 0) { - mprf(MSGCH_ERROR, "Spellbook \"%s\" contains no spells! Please " + mprf(MSGCH_ERROR, "Spellbook \"%s\" contains no spells! Please " "file a bug report.", book.name(DESC_PLAIN).c_str()); book_errors = true; } @@ -1413,48 +1413,54 @@ static std::vector _get_mem_list() if (num_memable) return (mem_spells); - // No spells to be memorized is indicated by an empty list. + // No spells to be memorised is indicated by an empty list. mem_spells.clear(); - // None of the spells can be memorized, tell the player why. + // None of the spells can be memorised; tell the player why. std::string prefix = - make_stringf("You cannot memorize any new spells. Out of %u " - "available spells ", all_spells.size()); + make_stringf("You cannot memorise any new spells. Out of %u " + "available spells, ", all_spells.size()); std::vector causes; if (num_known) - causes.push_back(make_stringf("you already known %u of them", + { + causes.push_back(make_stringf("you already know %u of them", num_known)); + } if (num_race) { - causes.push_back(make_stringf("%u cannot be memorized because of " + causes.push_back(make_stringf("%u cannot be memorised because of " "your race", num_race)); } if (num_low_xl) { - causes.push_back(make_stringf("%u cannot be memorized because of " - "your low experinece level", + causes.push_back(make_stringf("%u cannot be memorised because of " + "your low experience level", num_low_xl)); } if (num_low_levels) { - causes.push_back(make_stringf("%u cannot be memorized because you " + causes.push_back(make_stringf("%u cannot be memorised because you " "don't have enough free spell levels", num_low_levels)); } unsigned int total = num_known + num_race + num_low_xl + num_low_levels; if (total < all_spells.size()) + { causes.push_back(make_stringf("%u cannot be accounted for (please " "file a bug report)", all_spells.size() - total)); + } - mpr_comma_separated_list(prefix, causes, ", and ", ", ", MSGCH_PROMPT); + mpr_comma_separated_list(prefix, causes, " and ", ", ", MSGCH_PROMPT); if (num_unreadable) - mprf(MSGCH_PROMPT, "Additionally, %d of your spellbooks are beyond " + { + mprf(MSGCH_PROMPT, "Additionally, %u of your spellbooks are beyond " "your current level of understanding, and thus none of the " - "spells in them are avaible to you."); + "spells in them are available to you.", num_unreadable); + } return (mem_spells); } -- cgit v1.2.3-54-g00ecf