diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-25 21:28:10 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-25 21:28:10 +0000 |
commit | 71fc85edf61aed46b589a2ee5bc7b8ef55c5cc77 (patch) | |
tree | 28605521888e8692c3b12133bd39916fd8d1d6e7 /crawl-ref/source/ouch.cc | |
parent | db417e511fceb9c4f39cb8e563ef3308265af94b (diff) | |
download | crawl-ref-71fc85edf61aed46b589a2ee5bc7b8ef55c5cc77.tar.gz crawl-ref-71fc85edf61aed46b589a2ee5bc7b8ef55c5cc77.zip |
* A few corrections and changes to the tutorial.
* Reintroduce protection from harm while praying for Ely and Yred
(This weakens Ely's healing effect in comparison to Zin and TSO,
so maybe Ely should get both the 1/10 AND the prayer bonus.)
* FR 1829904: add '%' shortcut to character selection menu
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2914 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 6e6e35dffd..2459ee687c 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -785,10 +785,12 @@ void ouch( int dam, int death_source, kill_method_type death_type, if (dam > -9000) // that is, a "death" caused by hp loss {dlb} { - if (god_protects_from_harm(you.religion)) + if (dam >= you.hp && god_protects_from_harm(you.religion)) { - if (dam >= you.hp - && (one_chance_in(10) || you.piety > random2(1000))) + if ((you.religion == GOD_ZIN || you.religion == GOD_SHINING_ONE) + && (one_chance_in(10) || you.piety > random2(1000)) + || (you.religion == GOD_ELYVILON || you.religion == GOD_YREDELEMNUL) + && you.duration[DUR_PRAYER] && random2(you.piety) >= 30) { simple_god_message( " protects you from harm!" ); return; |