summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 12:09:51 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 12:09:51 +0000
commit487e54d8bfa380b66b3534376b34325c179cfca1 (patch)
treec0d26807dadcc66af38183380728d5ba6b4a9582 /crawl-ref/source/mon-util.cc
parent92b3ff72f2a55f6bdf776a693908772be8552e47 (diff)
downloadcrawl-ref-487e54d8bfa380b66b3534376b34325c179cfca1.tar.gz
crawl-ref-487e54d8bfa380b66b3534376b34325c179cfca1.zip
[2094133] All friendlies check for collateral damage for ranged attacks, not just smart monsters. Also add friend and foe power to tracer debug.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6883 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 703b9c343b..dd067b5b86 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2308,9 +2308,10 @@ bool mons_should_fire(struct bolt &beam)
{
#ifdef DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS,
- "tracer: foes %d, friends %d, foe_ratio: %d, smart: %s",
- beam.foe_count, beam.fr_count, beam.foe_ratio,
- beam.smart_monster ? "yes" : "no");
+ "tracer: foes %d (pow: %d), friends %d (pow: %d), "
+ "foe_ratio: %d, smart: %s",
+ beam.foe_count, beam.foe_power, beam.fr_count, beam.fr_power,
+ beam.foe_ratio, beam.smart_monster ? "yes" : "no");
#endif
// Use of foeRatio:
// The higher this number, the more monsters will _avoid_ collateral
@@ -2325,8 +2326,8 @@ bool mons_should_fire(struct bolt &beam)
if (is_sanctuary(you.pos()) || is_sanctuary(beam.source))
return (false);
- // If we either hit no friends, or monster too dumb to care.
- if (beam.fr_count == 0 || !beam.smart_monster)
+ // If we hit no friends, fire away.
+ if (beam.fr_count == 0)
return (true);
// Only fire if they do acceptably low collateral damage.