summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-21 07:30:33 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-21 07:30:33 +0000
commit9b55168648a4ddc1887d0ae560ec00d8f1ff3b23 (patch)
treee4c268b925a397f19f74cb6e4bbc3f6378a12c01 /crawl-ref/source/mon-util.cc
parent98e3c24887ee5a4670cf58eaa614084a720b5853 (diff)
downloadcrawl-ref-9b55168648a4ddc1887d0ae560ec00d8f1ff3b23.tar.gz
crawl-ref-9b55168648a4ddc1887d0ae560ec00d8f1ff3b23.zip
Fix 1941612: Zapping wands known to be empty shouldn't cost a turn, but
empty wands with unknown charges should cost a turn. Experimentally add a "Really fire through friendly creature?" prompt when a beam tracer passes through a friend. This currently uses the existing monster tracer and probably has huge problems because of this. In any case, it appears to only work sometimes, though consistently for wands in my testing, possibly because the range is fixed (?) when compared to spells. (This is part of FR 1962548.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5171 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 1b8d97a49b..c96fcbb0a1 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2071,17 +2071,16 @@ bool mons_should_fire(struct bolt &beam)
beam.smart_monster? "yes" : "no");
#endif
// use of foeRatio:
- // the higher this number, the more monsters
- // will _avoid_ collateral damage to their friends.
- // setting this to zero will in fact have all
- // monsters ignore their friends when considering
- // collateral damage.
+ // The higher this number, the more monsters will _avoid_
+ // collateral damage to their friends.
+ // Setting this to zero will in fact have all monsters ignore
+ // their friends when considering collateral damage.
- // quick check - did we in fact get any foes?
+ // Quick check - did we in fact get any foes?
if (beam.foe_count == 0)
return (false);
- // if we either hit no friends, or monster too dumb to care
+ // If we either hit no friends, or monster too dumb to care.
if (beam.fr_count == 0 || !beam.smart_monster)
return (true);
@@ -2091,10 +2090,9 @@ bool mons_should_fire(struct bolt &beam)
100));
}
-// returns true if the spell is something you wouldn't want done if
+// Returns true if the spell is something you wouldn't want done if
// you had a friendly target.. only returns a meaningful value for
-// non-beam spells
-
+// non-beam spells.
bool ms_direct_nasty(spell_type monspell)
{
return (spell_needs_foe(monspell)