summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-behv.h
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-01 01:55:04 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-01 01:55:04 -0700
commit204607ad3e8aecb32e01f303b1e86545d3d57f62 (patch)
tree02cbad03b0e787e266cf650414d56022d34d5f6a /crawl-ref/source/mon-behv.h
parent82ab217c80b03d6e85cf0547c84e919535eb6827 (diff)
downloadcrawl-ref-204607ad3e8aecb32e01f303b1e86545d3d57f62.tar.gz
crawl-ref-204607ad3e8aecb32e01f303b1e86545d3d57f62.zip
Split up monstuff.cc
A lot of monstuff.cc was moved into mon-abil.cc (monster abilities), mon-act.cc (the main monster loop), mon-behv.cc (monster behaviour) and mon-cast.cc (monster spells). mstuff2.cc was completely merged into other files.
Diffstat (limited to 'crawl-ref/source/mon-behv.h')
-rw-r--r--crawl-ref/source/mon-behv.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-behv.h b/crawl-ref/source/mon-behv.h
new file mode 100644
index 0000000000..9f3001657a
--- /dev/null
+++ b/crawl-ref/source/mon-behv.h
@@ -0,0 +1,52 @@
+/*
+ * File: mon-behv.h
+ * Summary: Monster behaviour functions.
+ * Written by: Linley Henzell
+ */
+
+#ifndef MONBEHV_H
+#define MONBEHV_H
+
+#include "enum.h"
+
+enum mon_event_type
+{
+ ME_EVAL, // 0, evaluate monster AI state
+ ME_DISTURB, // noisy
+ ME_ANNOY, // annoy at range
+ ME_ALERT, // alert to presence
+ ME_WHACK, // physical attack
+ ME_SCARE, // frighten monster
+ ME_CORNERED // cannot flee
+};
+
+class monsters;
+struct coord_def;
+
+void behaviour_event(monsters *mon, mon_event_type event_type,
+ int src = MHITNOT, coord_def src_pos = coord_def(),
+ bool allow_shout = true);
+
+// This function is somewhat low level; you should probably use
+// behaviour_event(mon, ME_EVAL) instead.
+void handle_behaviour(monsters *mon);
+
+void make_mons_stop_fleeing(monsters *mon);
+
+void set_random_target(monsters* mon);
+
+void make_mons_leave_level(monsters *mon);
+
+bool message_current_target(void);
+
+bool monster_can_hit_monster(monsters *monster, const monsters *targ);
+
+bool mons_avoids_cloud(const monsters *monster, cloud_type cl_type,
+ bool placement = false);
+
+// Like the above, but allow a monster to move from one damaging cloud
+// to another.
+bool mons_avoids_cloud(const monsters *monster, int cloud_num,
+ cloud_type *cl_type = NULL, bool placement = false);
+
+#endif