summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-13 20:34:46 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-13 20:34:46 +0000
commitdf31ea9fdcfedf252e62f6bf0c5cff53df4b93d0 (patch)
tree2d7966f0f0eac61f1c17fa7182aa2ea22490a98f /crawl-ref/source/describe.cc
parent0962c7818135807861f1f8d659a952a8ea8f4ddb (diff)
downloadcrawl-ref-df31ea9fdcfedf252e62f6bf0c5cff53df4b93d0.tar.gz
crawl-ref-df31ea9fdcfedf252e62f6bf0c5cff53df4b93d0.zip
Mixed commit of small additions/changes.
FR 1870139: output "Tele" among enchantment abbrevs when "about to teleport" FR 1834016: print item slots along with rotting message (I added an option for this as I personally don't need this.) Gods: * Add ^ line for Zin's mutation protection. * Modify protection from harm adjectives in ^ screen to make difference between Ely and Zin/TSO more obvious. Tiles: Bug 1870238: Show mimics to be "autopickuable" (green frame). * Smarter handling of L-click actions in inventory. * code clean-up git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3269 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc30
1 files changed, 22 insertions, 8 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 7484b9c8a3..0015d51be2 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2477,9 +2477,15 @@ void describe_god( god_type which_god, bool give_title )
if (harm_protection_type hpt =
god_protects_from_harm(which_god, false))
{
- const char *how = (you.piety >= 150) ? "carefully" :
- (you.piety >= 90) ? "often" :
- (you.piety >= 30) ? "sometimes" :
+ int prayer_prot = 0;
+ if (you.religion == GOD_ELYVILON && you.piety > 30)
+ 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";
const char *when =
(hpt == HPT_PRAYING) ? " during prayer" :
@@ -2491,14 +2497,22 @@ void describe_god( god_type which_god, bool give_title )
god_name(which_god).c_str(), how, when );
}
- if (which_god == GOD_ZIN && you.piety >= 30)
+ if (which_god == GOD_ZIN)
{
have_any = true;
- cprintf("Praying to %s will provide sustenance if starving."
- EOL, god_name(which_god).c_str());
+ if (you.piety >= 30)
+ cprintf("Praying to %s will provide sustenance if starving."
+ EOL, god_name(which_god).c_str());
+
+ const char *how = (you.piety >= 150) ? "carefully" : // res mut. 3
+ (you.piety >= 100) ? "often" :
+ (you.piety >= 50) ? "sometimes" :
+ "occasionally";
+
+ cprintf("%s %s shields you from mutagenic effects." EOL,
+ god_name(which_god).c_str(), how);
}
-
- if (which_god == GOD_TROG)
+ else if (which_god == GOD_TROG)
{
have_any = true;
cprintf("You can call upon %s to burn books in your surroundings."