summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-14 07:51:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-14 07:51:41 +0000
commitc237acf0e4896db40a40da1498048addcf4e4d16 (patch)
treee4cbb90c913ce2f4110c05bb623ebff45c74b7ea /crawl-ref/source/beam.cc
parent309c246160be3d3cdc6c39fcf089e8e3ad3a622e (diff)
downloadcrawl-ref-c237acf0e4896db40a40da1498048addcf4e4d16.tar.gz
crawl-ref-c237acf0e4896db40a40da1498048addcf4e4d16.zip
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
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc22
1 files changed, 19 insertions, 3 deletions
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;