summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.h
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2013-06-25 21:33:30 -0230
committerDracoOmega <draco_omega@live.com>2013-06-26 02:27:04 -0230
commit32214089a7f2ad95def87bbb73bb7299b19a37fc (patch)
tree14a61c98f12e3e676e22f9190a872aa47b14868d /crawl-ref/source/mon-act.h
parent3a60844e6e24ace31de068d8fcdef858728e91e7 (diff)
downloadcrawl-ref-32214089a7f2ad95def87bbb73bb7299b19a37fc.tar.gz
crawl-ref-32214089a7f2ad95def87bbb73bb7299b19a37fc.zip
Correct a major timing issue with monster battlespheres
Since the change to how monster turns are ordered (being interleaved based on speed/energy instead of consecutively based on index), monster battlesphere are no longer nearly guaranteed to act after their caster. This meant that, from the player's perspective, the battlesphere would fire one turn AFTER the spell that triggered it. Worse, it would be aimed at where the player was standing that turn, so it was possible to dodge by moving. I have addressed this by making monster battlesphere triggering reset the battlesphere to a full turn's worth of energy, and then reinsert it into the monster action queue. (This reinsertion is necessary since it is quite likely it would not be otherwise examined until the following turn, no matter how much energy it had.) I do not think that cases where two copies of the same monster end up in the queue at once will have any effect, as popped monsters with unsufficient or modified action energy are simply ignored.
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 2a764a5b46..303999b601 100644
--- a/crawl-ref/source/mon-act.h
+++ b/crawl-ref/source/mon-act.h
@@ -22,6 +22,8 @@ bool mons_can_move_towards_target(const monster* mon);
void handle_monsters(bool with_noise = false);
void handle_monster_move(monster* mon);
+void queue_monster_for_action(monster* mons);
+
#define ENERGY_SUBMERGE(entry) (max(entry->energy_usage.swim / 2, 1))
#endif