summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godconduct.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2010-01-23 20:20:19 +0100
committerRobert Vollmert <rvollmert@gmx.net>2010-01-23 20:26:25 +0100
commit917cc2df17cdfefdf2bd9743804e0da21101d467 (patch)
treeea89ab73ec28703bbb5f4de476707e5feb1348b5 /crawl-ref/source/godconduct.h
parentcfdaf57f2fb02ad5a3d220cc03d6636969ccc330 (diff)
downloadcrawl-ref-917cc2df17cdfefdf2bd9743804e0da21101d467.tar.gz
crawl-ref-917cc2df17cdfefdf2bd9743804e0da21101d467.zip
Split out did_god_conduct and some other things to godconduct.{h,cc}.
Diffstat (limited to 'crawl-ref/source/godconduct.h')
-rw-r--r--crawl-ref/source/godconduct.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/crawl-ref/source/godconduct.h b/crawl-ref/source/godconduct.h
new file mode 100644
index 0000000000..36da6cf984
--- /dev/null
+++ b/crawl-ref/source/godconduct.h
@@ -0,0 +1,38 @@
+/*
+ * File: godconduct.h
+ * Summary: Stuff related to conducts.
+ */
+
+#ifndef GODCONDUCT_H
+#define GODCONDUCT_H
+
+// Calls did_god_conduct() when the object goes out of scope.
+struct god_conduct_trigger
+{
+ conduct_type conduct;
+ int pgain;
+ bool known;
+ bool enabled;
+ std::auto_ptr<monsters> victim;
+
+ god_conduct_trigger(conduct_type c = NUM_CONDUCTS,
+ int pg = 0,
+ bool kn = true,
+ const monsters *vict = NULL);
+
+ void set(conduct_type c = NUM_CONDUCTS,
+ int pg = 0,
+ bool kn = true,
+ const monsters *vict = NULL);
+
+ ~god_conduct_trigger();
+};
+
+bool did_god_conduct(conduct_type thing_done, int level, bool known = true,
+ const monsters *victim = NULL);
+void set_attack_conducts(god_conduct_trigger conduct[3], const monsters *mon,
+ bool known = true);
+void enable_attack_conducts(god_conduct_trigger conduct[3]);
+void disable_attack_conducts(god_conduct_trigger conduct[3]);
+
+#endif