From df31ea9fdcfedf252e62f6bf0c5cff53df4b93d0 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 13 Jan 2008 20:34:46 +0000 Subject: 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 --- crawl-ref/source/describe.cc | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/describe.cc') 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." -- cgit v1.2.3-54-g00ecf