From e71a7771a4370a76859d1ace77c92e505cf8764f Mon Sep 17 00:00:00 2001 From: zelgadis Date: Thu, 12 Jun 2008 09:21:06 +0000 Subject: 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 --- crawl-ref/source/beam.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/beam.cc') 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)) -- cgit v1.2.3-54-g00ecf