summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-07 20:46:02 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-07 20:46:02 +0000
commita61eb00e7fc73fa51d23c84e2225816a9a9eebac (patch)
treef3f1c99c6afd93b738a9c874e09850aa8970d25b /crawl-ref/source/describe.cc
parentc0be5104be442e01833aa2d407233be2dbeb1235 (diff)
downloadcrawl-ref-a61eb00e7fc73fa51d23c84e2225816a9a9eebac.tar.gz
crawl-ref-a61eb00e7fc73fa51d23c84e2225816a9a9eebac.zip
Add more prayer-related fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7179 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index e185adf85d..08de024d85 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -3073,26 +3073,24 @@ void describe_god( god_type which_god, bool give_title )
god_protects_from_harm(which_god, false))
{
int prayer_prot = 0;
- if ((hpt == HPT_PRAYING || hpt == HPT_PRAYING_PLUS_ANYTIME)
- && you.piety >= piety_breakpoint(0))
- {
+
+ if (hpt == HPT_PRAYING || hpt == HPT_PRAYING_PLUS_ANYTIME)
prayer_prot = 100 - 3000/you.piety;
- }
int prot_chance = 10 + you.piety/10 + prayer_prot; // chance * 100
const char *how = (prot_chance >= 85) ? "carefully" :
(prot_chance >= 55) ? "often" :
- (prot_chance >= 25) ? "sometimes" :
- "occasionally";
+ (prot_chance >= 25) ? "sometimes"
+ : "occasionally";
const char *when =
(hpt == HPT_PRAYING) ? " during prayer" :
- (hpt == HPT_PRAYING_PLUS_ANYTIME) ? ", especially during prayer" :
- "";
+ (hpt == HPT_PRAYING_PLUS_ANYTIME) ? ", especially during prayer"
+ : "";
have_any = true;
cprintf("%s %s watches over you%s." EOL,
- god_name(which_god).c_str(), how, when );
+ god_name(which_god).c_str(), how, when);
}
if (which_god == GOD_ZIN)