summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-08 13:41:04 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-08 13:41:04 +0000
commit25c3f067307476e39140d8477ce7024ff6f44d1d (patch)
treef60f02050f0bc464225885f36bfd824f02d7384b /crawl-ref/source/describe.cc
parent25f7b56428775b27b423ce8d5b6dd866c3c61e6d (diff)
downloadcrawl-ref-25c3f067307476e39140d8477ce7024ff6f44d1d.tar.gz
crawl-ref-25c3f067307476e39140d8477ce7024ff6f44d1d.zip
Print passive god abilities. Fixes [2483099].
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8329 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 11d5f7b2c1..c41c3826c9 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2877,16 +2877,18 @@ extern ability_type god_abilities[MAX_NUM_GODS][MAX_GOD_ABILITIES];
static bool _print_final_god_abil_desc(int god, const std::string &final_msg,
const ability_type abil)
{
- // If no message or ability then no power.
- if (!final_msg[0] || abil == ABIL_NON_ABILITY)
+ // If no message then no power.
+ if (final_msg.empty())
return (false);
std::ostringstream buf;
buf << final_msg;
- const int spacesleft = 79 - buf.str().length();
- const std::string cost = "(" + make_cost_description(abil) + ")";
- buf << std::setw(spacesleft) << cost;
-
+ if (abil != ABIL_NON_ABILITY)
+ {
+ const int spacesleft = 79 - buf.str().length();
+ const std::string cost = "(" + make_cost_description(abil) + ")";
+ buf << std::setw(spacesleft) << cost;
+ }
cprintf("%s\n", buf.str().c_str());
return (true);