diff options
author | DracoOmega <draco_omega@live.com> | 2014-01-21 15:09:03 -0330 |
---|---|---|
committer | DracoOmega <draco_omega@live.com> | 2014-01-28 02:31:10 -0330 |
commit | 0d6be078a4445c9ad6efac7254384650a2756be0 (patch) | |
tree | 3ded0e1e8c03a550acf2a1ee1f6af46b97b4605c /crawl-ref/source/mon-movetarget.cc | |
parent | 4a95513685cd52e08a0870072e977854e10af435 (diff) | |
download | crawl-ref-0d6be078a4445c9ad6efac7254384650a2756be0.tar.gz crawl-ref-0d6be078a4445c9ad6efac7254384650a2756be0.zip |
A few more siren behavioral tweaks
Make sirens even more likely to prefer deep water than before (to
the point of being willing to move past the player to reach some, when
previously they never would if shallow was available closer to them).
Given how key it is to their offense, it seems important to prioritize
it further.
Also adjust siren pathfinding slightly so that they will attempt to
move around the player instead of stopping in front of them, if you
happen to bar their path.
Finally, remove siren's melee attack altogether. It almost never
works anyway and was harmless even when it did. It is better not to
give the illusion that she will actually hit something when she so
rarely does, I think.
Diffstat (limited to 'crawl-ref/source/mon-movetarget.cc')
-rw-r--r-- | crawl-ref/source/mon-movetarget.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-movetarget.cc b/crawl-ref/source/mon-movetarget.cc index 4a3551ea80..d09643bbe9 100644 --- a/crawl-ref/source/mon-movetarget.cc +++ b/crawl-ref/source/mon-movetarget.cc @@ -296,8 +296,8 @@ bool pacified_leave_level(monster* mon, vector<level_exit> e, int e_index) return false; } -// Counts deep water twice. -static int _count_water_neighbours(coord_def p) +// Counts deep water twice (and reports if any is found). +static int _count_water_neighbours(coord_def p, bool& deep) { int water_count = 0; for (adjacent_iterator ai(p); ai; ++ai) @@ -305,7 +305,10 @@ static int _count_water_neighbours(coord_def p) if (grd(*ai) == DNGN_SHALLOW_WATER) water_count++; else if (grd(*ai) == DNGN_DEEP_WATER) + { water_count += 2; + deep = true; + } } return water_count; } @@ -347,6 +350,8 @@ bool find_siren_water_target(monster* mon) coord_def best_target; bool first = true; + deep = false; + while (true) { int best_num = 0; @@ -362,7 +367,7 @@ bool find_siren_water_target(monster* mon) continue; // Counts deep water twice. - const int water_count = _count_water_neighbours(*ri); + const int water_count = _count_water_neighbours(*ri, deep); if (water_count < best_water_count) continue; @@ -389,7 +394,7 @@ bool find_siren_water_target(monster* mon) } } - if (!first || best_water_count > 0) + if (!first || deep) break; // Else start the second iteration. |