diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-12 09:21:06 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-12 09:21:06 +0000 |
commit | e71a7771a4370a76859d1ace77c92e505cf8764f (patch) | |
tree | cbd9666b59a7946b512d261d3dae5e1ee44bac9d /crawl-ref/source/beam.cc | |
parent | 14f96d4f59e4c91915bb15d2f4ca845e6e2e459e (diff) | |
download | crawl-ref-e71a7771a4370a76859d1ace77c92e505cf8764f.tar.gz crawl-ref-e71a7771a4370a76859d1ace77c92e505cf8764f.zip |
beam.foe_count (and related members) weren't being updated when a monster
was in the path of a non-enchantment beam.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5758 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index fa521d8d17..d353b14f5d 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -4228,6 +4228,17 @@ static int _affect_monster(bolt &beam, monsters *mon, item_def *item) // Can't see this monster, ignore it. return 0; } + + if (!mons_atts_aligned(beam.attitude, mons_attitude(mon))) + { + beam.foe_count += 1; + beam.foe_power += mons_power(mons_type); + } + else + { + beam.fr_count += 1; + beam.fr_power += mons_power(mons_type); + } } else if ((beam.flavour == BEAM_DISINTEGRATION || beam.flavour == BEAM_NUKE) && mons_is_statue(mons_type) && !mons_is_icy(mons_type)) |