diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-03 11:08:23 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-03 11:08:23 +0000 |
commit | 2a26233126e10117267fc9393539af56f66b0116 (patch) | |
tree | 6e70d1b6ae6af35de0b48fe2134b8a74df4a297b /crawl-ref/source/beam.cc | |
parent | f19756c625c050717f9a86419de62cd99c5c468c (diff) | |
download | crawl-ref-2a26233126e10117267fc9393539af56f66b0116.tar.gz crawl-ref-2a26233126e10117267fc9393539af56f66b0116.zip |
Fix [2220297]: nonenchantment tracers were improperly doublecounting each
creature, once with and once without resistances.
Also reduced fireball foe_ratio to 60 to make fire giants more aggressive.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8879 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 43dea290e7..594f241155 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3988,6 +3988,18 @@ void bolt::update_hurt_or_helped(monsters *mon) void bolt::tracer_enchantment_affect_monster(monsters* mon) { + // Update friend or foe encountered. + if (!mons_atts_aligned(attitude, mons_attitude(mon))) + { + foe_info.count++; + foe_info.power += mons_power(mon->type); + } + else + { + friend_info.count++; + friend_info.power += mons_power(mon->type); + } + handle_stop_attack_prompt(mon); if (!beam_cancelled) { @@ -4099,9 +4111,15 @@ void bolt::tracer_nonenchantment_affect_monster(monsters* mon) // Counting foes is only important for monster tracers. if (!mons_atts_aligned(attitude, mons_attitude(mon))) + { foe_info.power += 2 * final * mons_power(mon->type) / preac; + foe_info.count++; + } else + { friend_info.power += 2 * final * mons_power(mon->type) / preac; + friend_info.count++; + } for (unsigned int i = 0; i < messages.size(); i++) mpr(messages[i].c_str(), MSGCH_MONSTER_DAMAGE); @@ -4135,18 +4153,6 @@ void bolt::tracer_affect_monster(monsters* mon) return; } - // Update friend or foe encountered. - if (!mons_atts_aligned(attitude, mons_attitude(mon))) - { - foe_info.count++; - foe_info.power += mons_power(mon->type); - } - else - { - friend_info.count++; - friend_info.power += mons_power(mon->type); - } - if (is_enchantment()) tracer_enchantment_affect_monster(mon); else |