diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/command.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 44 |
3 files changed, 33 insertions, 18 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index bb062ae723..1884ae2303 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -1256,9 +1256,7 @@ static bool _do_description(std::string key, std::string footer = "") std::string prefix, suffix; - int width = get_number_of_cols(); - if (width > 80) - width = 80; + int width = std::min(80, get_number_of_cols()); god_type which_god = string_to_god(key.c_str()); if (which_god != GOD_NO_GOD) diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 809394b94f..d0ad01ac01 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2856,7 +2856,8 @@ static int _piety_level() static void _detailed_god_description(god_type which_god) { clrscr(); - int width = std::min(80, get_number_of_cols()); + + const int width = std::min(80, get_number_of_cols()); std::string godname = god_name(which_god, true); int len = get_number_of_cols() - godname.length(); diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 10dc786da3..2c83871f20 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -454,6 +454,7 @@ std::string get_god_likes(god_type which_god, bool verbose) std::string text = god_name(which_god); std::vector<std::string> likes; + std::vector<std::string> really_likes; // Unique/unusual piety gain methods first. switch (which_god) @@ -463,8 +464,8 @@ std::string get_god_likes(god_type which_god, bool verbose) break; case GOD_TROG: - snprintf(info, INFO_SIZE, "destroy spellbooks (especially ones you've" - " never read)%s", + snprintf(info, INFO_SIZE, "destroy spellbooks (especially ones you've " + "never read)%s", verbose ? " via the <w>a</w> command" : ""); likes.push_back(info); @@ -539,6 +540,16 @@ std::string get_god_likes(god_type which_god, bool verbose) switch (which_god) { + case GOD_SHINING_ONE: + likes.push_back("kill living evil beings"); + break; + + default: + break; + } + + switch (which_god) + { case GOD_SHINING_ONE: case GOD_OKAWARU: case GOD_VEHUMET: case GOD_MAKHLEB: case GOD_LUGONU: likes.push_back("kill the undead"); @@ -568,43 +579,48 @@ std::string get_god_likes(god_type which_god, bool verbose) break; } - // Unusual kills. + // Especially appreciated kills. switch (which_god) { case GOD_ZIN: - likes.push_back("kill monsters which cause mutation or rotting"); - break; - - case GOD_SHINING_ONE: - likes.push_back("kill living evil beings"); + really_likes.push_back("kill monsters which cause mutation or rotting"); break; case GOD_YREDELEMNUL: - likes.push_back("kill holy beings"); + really_likes.push_back("kill holy beings"); break; case GOD_BEOGH: - likes.push_back("kill the priests of other religions"); + really_likes.push_back("kill the priests of other religions"); break; case GOD_TROG: - likes.push_back("kill wizards and other users of magic"); + really_likes.push_back("kill wizards and other users of magic"); break; default: break; } - if (likes.size() == 0) - { + if (likes.size() == 0 && really_likes.size() == 0) text += " %s doesn't like anything? This a bug; please report it."; - } else { text += " likes it when you "; text += comma_separated_line(likes.begin(), likes.end(), ", and ", ", "); text += "."; + + if (really_likes.size() > 0) + { + text += " "; + text += god_name(which_god); + + text += " especially likes it when you "; + text += comma_separated_line(really_likes.begin(), + really_likes.end(), ", and ", ", "); + text += "."; + } } return (text); |