summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.h
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2011-01-18 23:56:17 +0100
committerRaphael Langella <raphael.langella@gmail.com>2011-01-19 00:03:37 +0100
commit86f13bc905b15e990388d634829aac13b38f1f8d (patch)
tree806754c152a7586861860981d2d0328b69b98848 /crawl-ref/source/mon-act.h
parent44e800d20468f52640fd8f5a2f738aa3ef7bcf98 (diff)
downloadcrawl-ref-86f13bc905b15e990388d634829aac13b38f1f8d.tar.gz
crawl-ref-86f13bc905b15e990388d634829aac13b38f1f8d.zip
Better movement AI for ranged attackers.
When you leave the LOS of a monster with ranged attacks, it will try to regain a line of fire instead of coming straight after you. This is the end of the "duck behind a corner" strategy. Next CDO update is going to be fun ;) This is of course going to make all monsters with ranged attacks more dangerous, especially to melee. On the other hand, they are a bit easier to escape from (if too easy, reduce ideal_range to 3). To balance it we can make scrolls of fog more frequent and/or more effective. As it is my first time messing with monster AI, the code probably needs some review. I have cleared firing_pos in several places to be safe, but some may be useless. Also, the _set_firing_pos function is maybe a bit expensive, but it shouldn't be too much of an issue, as it is not called very often.
Diffstat (limited to 'crawl-ref/source/mon-act.h')
-rw-r--r--crawl-ref/source/mon-act.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-act.h b/crawl-ref/source/mon-act.h
index 040aa166f3..a44cd24caa 100644
--- a/crawl-ref/source/mon-act.h
+++ b/crawl-ref/source/mon-act.h
@@ -7,6 +7,8 @@
#ifndef MONACT_H
#define MONACT_H
+bool mon_can_move_to_pos(const monster* mons, const coord_def& delta,
+ bool just_check = false);
bool mons_can_move_towards_target(const monster* mon);
void handle_monsters(void);