summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-11-15 01:05:16 -0800
committerStefan O'Rear <stefanor@cox.net>2009-11-15 01:05:16 -0800
commit8c8da9371748f82fd91233206985e552b837de9a (patch)
treecc123553adf8fc4e9a57ebb3df4f8a85e49f1db6 /crawl-ref/source/beam.cc
parent872ec1e1965789675881f42b287a07e68ce9a1e1 (diff)
downloadcrawl-ref-8c8da9371748f82fd91233206985e552b837de9a.tar.gz
crawl-ref-8c8da9371748f82fd91233206985e552b837de9a.zip
Allow Corona to work in ranged combat
This also means that centaurs will have a much easier time shooting at paladins. Could become a problem.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 1c54f2914e..e35894dea9 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3718,6 +3718,9 @@ bool bolt::misses_player()
if (you.invisible() && !can_see_invis)
real_tohit /= 2;
+ if (you.backlit())
+ real_tohit += 2 + random2(8);
+
// Wow, what a horrid test. These cannot be blocked or dodged
if (!is_beam && !is_blockable())
return (false);
@@ -4885,6 +4888,9 @@ void bolt::affect_monster(monsters* mon)
if (mon->invisible() && !can_see_invis)
beam_hit /= 2;
+ if (mon->backlit())
+ beam_hit += 2 + random2(8);
+
defer_rand r;
int rand_ev = random2(mon->ev);
bool dmsl = mon->type == MONS_KIRKE;