summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authordramsey <dramsey@serenity.example.org>2009-09-28 20:57:49 -0500
committerdramsey <dramsey@serenity.example.org>2009-09-28 20:57:49 -0500
commit3525d71174ca5fc1aa8ae417087d77006ea5cd2a (patch)
tree980cb13cb56caf3266d77aa7fb1c8d681d6bcd55 /crawl-ref/source/beam.cc
parent42722e92b1d2c4c60e8f9905b61e01eb71b8fcd2 (diff)
downloadcrawl-ref-3525d71174ca5fc1aa8ae417087d77006ea5cd2a.tar.gz
crawl-ref-3525d71174ca5fc1aa8ae417087d77006ea5cd2a.zip
Apply trunk r10543, r10544, r10547, r10572, r10756, and r10757 to 0.5,
and update the changelog.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc24
1 files changed, 20 insertions, 4 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 567b6c26e9..fd8d0fc2a9 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3714,12 +3714,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;
@@ -5056,7 +5072,7 @@ int bolt::range_used_on_hit(const actor* victim) const
used = 1;
// Assume we didn't hit, after all.
- if (is_tracer && used == BEAM_STOP)
+ if (is_tracer && beam_source == NON_MONSTER && used == BEAM_STOP)
return 1;
if (in_explosion_phase)