summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 01:59:10 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 01:59:10 +0000
commit24dcf42aa81549a812a8a12372243877137460ad (patch)
tree7e246fb591b68f3a3fa54bfee749a23c6703a575 /crawl-ref/source/ouch.cc
parent26bb11fa449a58903e147e57c6b44eeec9180ad3 (diff)
downloadcrawl-ref-24dcf42aa81549a812a8a12372243877137460ad.tar.gz
crawl-ref-24dcf42aa81549a812a8a12372243877137460ad.zip
Generalize the check for unchivalric attacks via cleansing flame.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8527 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 881216ee1a..2faca91b49 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -218,24 +218,27 @@ int check_your_resists(int hurted, beam_type flavour)
break;
case BEAM_HOLY:
+ {
// Cleansing flame.
- if (you.res_cleansing_flame() > 0)
+ const int rcf = you.res_cleansing_flame(NULL);
+ if (rcf > 0)
hurted = 0;
- else if (you.res_cleansing_flame() == 0)
+ else if (rcf == 0)
hurted /= 2;
- else if (you.res_cleansing_flame() < -1)
+ else if (rcf < -1)
hurted = (hurted * 3) / 2;
if (hurted == 0)
canned_msg(MSG_YOU_RESIST);
break;
+ }
default:
break;
} // end switch
return (hurted);
-} // end check_your_resists()
+}
void splash_with_acid(int acid_strength, bool corrode_items)
{