From 24dcf42aa81549a812a8a12372243877137460ad Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 18 Jan 2009 01:59:10 +0000 Subject: 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 --- crawl-ref/source/ouch.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/ouch.cc') 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) { -- cgit v1.2.3-54-g00ecf