From c237acf0e4896db40a40da1498048addcf4e4d16 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 14 Aug 2009 07:51:41 +0000 Subject: Apply patch 2837206 by jokeserver to fix Agony dealing 1500 damage. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10543 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 9633e18119..5330fabb34 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3705,12 +3705,28 @@ void bolt::affect_player_enchantment() break; } - mpr("Pain shoots through your body!"); - if (aux_source.empty()) aux_source = "by nerve-wracking pain"; - internal_ouch(damage.roll()); + if (name.find("agony") != std::string::npos) + { + if (you.res_negative_energy()) // Agony has no effect with rN. + { + mpr("You are unaffected."); + break; + } + + mpr("Your body is wracked with pain!"); + + // On the player, Agony acts like single-target torment. + internal_ouch(std::max(0, you.hp / 2 - 1)); + } + else + { + mpr("Pain shoots through your body!"); + + internal_ouch(damage.roll()); + } obvious_effect = true; break; -- cgit v1.2.3-54-g00ecf