diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2010-01-23 20:20:19 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-01-23 20:26:25 +0100 |
commit | 917cc2df17cdfefdf2bd9743804e0da21101d467 (patch) | |
tree | ea89ab73ec28703bbb5f4de476707e5feb1348b5 /crawl-ref/source/godconduct.h | |
parent | cfdaf57f2fb02ad5a3d220cc03d6636969ccc330 (diff) | |
download | crawl-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.h | 38 |
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 |